Merge branch '16848-token-handling-improvements'
authorLucas Di Pentima <lucas@di-pentima.com.ar>
Thu, 11 Mar 2021 17:54:37 +0000 (14:54 -0300)
committerLucas Di Pentima <lucas@di-pentima.com.ar>
Thu, 11 Mar 2021 17:54:37 +0000 (14:54 -0300)
Closes #16848

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>

cypress/integration/favorites.spec.js
cypress/integration/sharing.spec.js [new file with mode: 0644]
cypress/support/commands.js
src/components/tree/virtual-tree.tsx
src/views/run-process-panel/inputs/file-input.tsx
src/views/run-process-panel/run-process-inputs-form.tsx

index eca35bc4e0a0be6b148225b5f02301e761a9cd15..2afdf92e5c4c11229a16009206e01027fd5e1490 100644 (file)
@@ -26,16 +26,11 @@ describe('Favorites tests', function () {
     beforeEach(function () {
         cy.clearCookies()
         cy.clearLocalStorage()
-    })
-
-    it('checks that Public favorites does not appear under shared with me', function () {
-        cy.loginAs(adminUser);
-        cy.contains('Shared with me').click();
-        cy.get('main').contains('Public favorites').should('not.exist');
     });
 
     it('creates and removes a public favorite', function () {
         cy.loginAs(adminUser);
+
         cy.createGroup(adminUser.token, {
             name: `my-favorite-project`,
             group_class: 'project',
@@ -51,46 +46,79 @@ describe('Favorites tests', function () {
         });
     });
 
-    it('can copy collection to favorites', () => {
+    it('can copy selected into the collection', () => {
         cy.loginAs(adminUser);
 
-        cy.createGroup(adminUser.token, {
-            name: `my-shared-writable-project ${Math.floor(Math.random() * 999999)}`,
-            group_class: 'project',
-        }).as('mySharedWritableProject').then(function (mySharedWritableProject) {
-            cy.contains('Refresh').click();
-            cy.get('main').contains(mySharedWritableProject.name).rightclick();
-            cy.get('[data-cy=context-menu]').within(() => {
-                cy.contains('Share').click();
+        cy.createCollection(adminUser.token, {
+            name: `Test source collection ${Math.floor(Math.random() * 999999)}`,
+            manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
+        })
+            .as('testSourceCollection').then(function (testSourceCollection) {
+                cy.shareWith(adminUser.token, activeUser.user.uuid, testSourceCollection.uuid, 'can_read');
             });
-            cy.get('[id="select-permissions"]').as('selectPermissions');
-            cy.get('@selectPermissions').click();
-            cy.contains('Write').click();
-            cy.get('.sharing-dialog').as('sharingDialog');
-            cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
-            cy.get('[role=tooltip]').click();
-            cy.get('@sharingDialog').contains('Save').click();
-        });
 
-        cy.createGroup(adminUser.token, {
-            name: `my-shared-readonly-project ${Math.floor(Math.random() * 999999)}`,
-            group_class: 'project',
-        }).as('mySharedReadonlyProject').then(function (mySharedReadonlyProject) {
-            cy.contains('Refresh').click();
-            cy.get('main').contains(mySharedReadonlyProject.name).rightclick();
-            cy.get('[data-cy=context-menu]').within(() => {
-                cy.contains('Share').click();
+        cy.createCollection(adminUser.token, {
+            name: `Test target collection ${Math.floor(Math.random() * 999999)}`,
+        })
+            .as('testTargetCollection').then(function (testTargetCollection) {
+                cy.shareWith(adminUser.token, activeUser.user.uuid, testTargetCollection.uuid, 'can_write');
             });
-            cy.get('.sharing-dialog').as('sharingDialog');
-            cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
-            cy.get('[role=tooltip]').click();
-            cy.get('@sharingDialog').contains('Save').click();
-        });
 
-        cy.createGroup(activeUser.token, {
-            name: `my-project ${Math.floor(Math.random() * 999999)}`,
-            group_class: 'project',
-        }).as('myProject1');
+        cy.getAll('@testSourceCollection', '@testTargetCollection')
+            .then(function ([testSourceCollection, testTargetCollection]) {
+                cy.loginAs(activeUser);
+
+                cy.get('.layout-pane-primary')
+                    .contains('Projects').click();
+
+                cy.addToFavorites(activeUser.token, activeUser.user.uuid, testTargetCollection.uuid);
+
+                cy.get('main').contains(testSourceCollection.name).click();
+                cy.get('[data-cy=collection-files-panel]').contains('bar');
+                cy.get('[data-cy=collection-files-panel]').find('input[type=checkbox]').click({ force: true });
+                cy.get('[data-cy=collection-files-panel-options-btn]').click();
+                cy.get('[data-cy=context-menu]')
+                    .contains('Copy selected into the collection').click();
+
+                cy.get('[data-cy=projects-tree-favourites-tree-picker]')
+                    .find('i')
+                    .click();
+
+                cy.get('[data-cy=projects-tree-favourites-tree-picker]')
+                    .contains(testTargetCollection.name)
+                    .click();
+
+                cy.get('[data-cy=form-submit-btn]').click();
+
+                cy.get('.layout-pane-primary')
+                    .contains('Projects').click();
+
+                cy.get('main').contains(testTargetCollection.name).click();
+
+                cy.get('[data-cy=collection-files-panel]').contains('bar');
+            });
+    });
+
+    it('can copy collection to favorites', () => {
+        cy.createProject({
+            owningUser: adminUser,
+            targetUser: activeUser,
+            projectName: 'mySharedWritableProject',
+            canWrite: true,
+            addToFavorites: true
+        });
+        cy.createProject({
+            owningUser: adminUser,
+            targetUser: activeUser,
+            projectName: 'mySharedReadonlyProject',
+            canWrite: false,
+            addToFavorites: true
+        });
+        cy.createProject({
+            owningUser: activeUser,
+            projectName: 'myProject1',
+            addToFavorites: true
+        });
 
         cy.createCollection(adminUser.token, {
             name: `Test collection ${Math.floor(Math.random() * 999999)}`,
@@ -103,25 +131,8 @@ describe('Favorites tests', function () {
             .then(function ([mySharedWritableProject, mySharedReadonlyProject, myProject1, testCollection]) {
                 cy.loginAs(activeUser);
 
-                cy.contains('Shared with me').click();
-
-                cy.get('main').contains(mySharedWritableProject.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Add to favorites').click();
-                });
-
-                cy.get('main').contains(mySharedReadonlyProject.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Add to favorites').click();
-                });
-
                 cy.doSearch(`${activeUser.user.uuid}`);
 
-                cy.get('main').contains(myProject1.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Add to favorites').click();
-                });
-
                 cy.contains(testCollection.name).rightclick();
                 cy.get('[data-cy=context-menu]').within(() => {
                     cy.contains('Move to').click();
@@ -142,81 +153,58 @@ describe('Favorites tests', function () {
             });
     });
 
-    it('can copy selected into the collection', () => {
-        cy.loginAs(adminUser);
-
-        cy.createCollection(adminUser.token, {
-            name: `Test source collection ${Math.floor(Math.random() * 999999)}`,
-            manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
-        })
-            .as('testSourceCollection').then(function (testSourceCollection) {
-                cy.contains('Refresh').click();
-                cy.get('main').contains(testSourceCollection.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Share').click();
-                });
-                cy.get('[id="select-permissions"]').as('selectPermissions');
-                cy.get('@selectPermissions').click();
-                cy.contains('Write').click();
-                cy.get('.sharing-dialog').as('sharingDialog');
-                cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
-                cy.get('[role=tooltip]').click();
-                cy.get('@sharingDialog').contains('Save').click();
-            });
-
-        cy.createCollection(adminUser.token, {
-            name: `Test target collection ${Math.floor(Math.random() * 999999)}`,
-        })
-            .as('testTargetCollection').then(function (testTargetCollection) {
-                cy.contains('Refresh').click();
-                cy.get('main').contains(testTargetCollection.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Share').click();
-                });
-                cy.get('[id="select-permissions"]').as('selectPermissions');
-                cy.get('@selectPermissions').click();
-                cy.contains('Write').click();
-                cy.get('.sharing-dialog').as('sharingDialog');
-                cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
-                cy.get('[role=tooltip]').click();
-                cy.get('@sharingDialog').contains('Save').click();
-            });
+    it('can view favourites in workflow', () => {
+        cy.createProject({
+            owningUser: adminUser,
+            targetUser: activeUser,
+            projectName: 'mySharedWritableProject',
+            canWrite: true,
+            addToFavorites: true
+        });
+        cy.createProject({
+            owningUser: adminUser,
+            targetUser: activeUser,
+            projectName: 'mySharedReadonlyProject',
+            canWrite: false,
+            addToFavorites: true
+        });
+        cy.createProject({
+            owningUser: activeUser,
+            projectName: 'myProject1',
+            addToFavorites: true
+        });
 
-        cy.getAll('@testSourceCollection', '@testTargetCollection')
-            .then(function ([testSourceCollection, testTargetCollection]) {
+        cy.getAll('@mySharedWritableProject', '@mySharedReadonlyProject', '@myProject1')
+            .then(function ([mySharedWritableProject, mySharedReadonlyProject, myProject1]) {
                 cy.loginAs(activeUser);
 
-                cy.get('.layout-pane-primary')
-                    .contains('Projects').click();
-
-                cy.get('main').contains(testTargetCollection.name).rightclick();
-                cy.get('[data-cy=context-menu]').within(() => {
-                    cy.contains('Add to favorites').click();
-                });
-
-                cy.get('main').contains(testSourceCollection.name).click();
-                cy.get('[data-cy=collection-files-panel]').contains('bar');
-                cy.get('[data-cy=collection-files-panel]').find('input[type=checkbox]').click({ force: true });
-                cy.get('[data-cy=collection-files-panel-options-btn]').click();
-                cy.get('[data-cy=context-menu]')
-                    .contains('Copy selected into the collection').click();
+                cy.createWorkflow(adminUser.token, {
+                    name: `TestWorkflow${Math.floor(Math.random() * 999999)}.cwl`,
+                    definition: "{\n    \"$graph\": [\n        {\n            \"class\": \"Workflow\",\n            \"doc\": \"Reverse the lines in a document, then sort those lines.\",\n            \"hints\": [\n                {\n                    \"acrContainerImage\": \"99b0201f4cade456b4c9d343769a3b70+261\",\n                    \"class\": \"http://arvados.org/cwl#WorkflowRunnerResources\"\n                }\n            ],\n            \"id\": \"#main\",\n            \"inputs\": [\n                {\n                    \"default\": null,\n                    \"doc\": \"The input file to be processed.\",\n                    \"id\": \"#main/input\",\n                    \"type\": \"File\"\n                },\n                {\n                    \"default\": true,\n                    \"doc\": \"If true, reverse (decending) sort\",\n                    \"id\": \"#main/reverse_sort\",\n                    \"type\": \"boolean\"\n                }\n            ],\n            \"outputs\": [\n                {\n                    \"doc\": \"The output with the lines reversed and sorted.\",\n                    \"id\": \"#main/output\",\n                    \"outputSource\": \"#main/sorted/output\",\n                    \"type\": \"File\"\n                }\n            ],\n            \"steps\": [\n                {\n                    \"id\": \"#main/rev\",\n                    \"in\": [\n                        {\n                            \"id\": \"#main/rev/input\",\n                            \"source\": \"#main/input\"\n                        }\n                    ],\n                    \"out\": [\n                        \"#main/rev/output\"\n                    ],\n                    \"run\": \"#revtool.cwl\"\n                },\n                {\n                    \"id\": \"#main/sorted\",\n                    \"in\": [\n                        {\n                            \"id\": \"#main/sorted/input\",\n                            \"source\": \"#main/rev/output\"\n                        },\n                        {\n                            \"id\": \"#main/sorted/reverse\",\n                            \"source\": \"#main/reverse_sort\"\n                        }\n                    ],\n                    \"out\": [\n                        \"#main/sorted/output\"\n                    ],\n                    \"run\": \"#sorttool.cwl\"\n                }\n            ]\n        },\n        {\n            \"baseCommand\": \"rev\",\n            \"class\": \"CommandLineTool\",\n            \"doc\": \"Reverse each line using the `rev` command\",\n            \"hints\": [\n                {\n                    \"class\": \"ResourceRequirement\",\n                    \"ramMin\": 8\n                }\n            ],\n            \"id\": \"#revtool.cwl\",\n            \"inputs\": [\n                {\n                    \"id\": \"#revtool.cwl/input\",\n                    \"inputBinding\": {},\n                    \"type\": \"File\"\n                }\n            ],\n            \"outputs\": [\n                {\n                    \"id\": \"#revtool.cwl/output\",\n                    \"outputBinding\": {\n                        \"glob\": \"output.txt\"\n                    },\n                    \"type\": \"File\"\n                }\n            ],\n            \"stdout\": \"output.txt\"\n        },\n        {\n            \"baseCommand\": \"sort\",\n            \"class\": \"CommandLineTool\",\n            \"doc\": \"Sort lines using the `sort` command\",\n            \"hints\": [\n                {\n                    \"class\": \"ResourceRequirement\",\n                    \"ramMin\": 8\n                }\n            ],\n            \"id\": \"#sorttool.cwl\",\n            \"inputs\": [\n                {\n                    \"id\": \"#sorttool.cwl/reverse\",\n                    \"inputBinding\": {\n                        \"position\": 1,\n                        \"prefix\": \"-r\"\n                    },\n                    \"type\": \"boolean\"\n                },\n                {\n                    \"id\": \"#sorttool.cwl/input\",\n                    \"inputBinding\": {\n                        \"position\": 2\n                    },\n                    \"type\": \"File\"\n                }\n            ],\n            \"outputs\": [\n                {\n                    \"id\": \"#sorttool.cwl/output\",\n                    \"outputBinding\": {\n                        \"glob\": \"output.txt\"\n                    },\n                    \"type\": \"File\"\n                }\n            ],\n            \"stdout\": \"output.txt\"\n        }\n    ],\n    \"cwlVersion\": \"v1.0\"\n}",
+                    owner_uuid: myProject1.uuid,
+                })
+                    .as('testWorkflow');
 
-                cy.get('[data-cy=projects-tree-favourites-tree-picker]')
-                    .find('i')
-                    .click();
+                cy.contains('Shared with me').click();
 
-                cy.get('[data-cy=projects-tree-favourites-tree-picker]')
-                    .contains(testTargetCollection.name)
-                    .click();
+                cy.doSearch(`${activeUser.user.uuid}`);
 
-                cy.get('[data-cy=form-submit-btn]').click();
+                cy.get('main').contains(myProject1.name).click();
 
-                cy.get('.layout-pane-primary')
-                    .contains('Projects').click();
+                cy.get('[data-cy=side-panel-button]').click();
 
-                cy.get('main').contains(testTargetCollection.name).click();
+                cy.get('#aside-menu-list').contains('Run a process').click();
 
-                cy.get('[data-cy=collection-files-panel]').contains('bar');
+                cy.get('@testWorkflow')
+                    .then((testWorkflow) => {
+                        cy.get('main').contains(testWorkflow.name).click();
+                        cy.get('[data-cy=run-process-next-button]').click();
+                        cy.get('[readonly]').click();
+                        cy.get('[data-cy=choose-a-file-dialog]').as('chooseFileDialog');
+                        cy.get('[data-cy=projects-tree-favourites-tree-picker]').contains('Favorites').closest('ul').find('i').click();
+                        cy.get('@chooseFileDialog').find(`[data-id=${mySharedWritableProject.uuid}]`);
+                        cy.get('@chooseFileDialog').find(`[data-id=${mySharedReadonlyProject.uuid}]`);
+                    });
             });
     });
 });
\ No newline at end of file
diff --git a/cypress/integration/sharing.spec.js b/cypress/integration/sharing.spec.js
new file mode 100644 (file)
index 0000000..5786c41
--- /dev/null
@@ -0,0 +1,81 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+describe('Sharing tests', function () {
+    let activeUser;
+    let adminUser;
+
+    before(function () {
+        // Only set up common users once. These aren't set up as aliases because
+        // aliases are cleaned up after every test. Also it doesn't make sense
+        // to set the same users on beforeEach() over and over again, so we
+        // separate a little from Cypress' 'Best Practices' here.
+        cy.getUser('admin', 'Admin', 'User', true, true)
+            .as('adminUser').then(function () {
+                adminUser = this.adminUser;
+            }
+            );
+        cy.getUser('collectionuser1', 'Collection', 'User', false, true)
+            .as('activeUser').then(function () {
+                activeUser = this.activeUser;
+            }
+            );
+    })
+
+    beforeEach(function () {
+        cy.clearCookies()
+        cy.clearLocalStorage()
+    });
+
+    it('can share projects to other users', () => {
+        cy.loginAs(adminUser);
+
+        cy.createGroup(adminUser.token, {
+            name: `my-shared-writable-project ${Math.floor(Math.random() * 999999)}`,
+            group_class: 'project',
+        }).as('mySharedWritableProject').then(function (mySharedWritableProject) {
+            cy.contains('Refresh').click();
+            cy.get('main').contains(mySharedWritableProject.name).rightclick();
+            cy.get('[data-cy=context-menu]').within(() => {
+                cy.contains('Share').click();
+            });
+            cy.get('[id="select-permissions"]').as('selectPermissions');
+            cy.get('@selectPermissions').click();
+            cy.contains('Write').click();
+            cy.get('.sharing-dialog').as('sharingDialog');
+            cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
+            cy.get('[role=tooltip]').click();
+            cy.get('@sharingDialog').contains('Save').click();
+        });
+
+        cy.createGroup(adminUser.token, {
+            name: `my-shared-readonly-project ${Math.floor(Math.random() * 999999)}`,
+            group_class: 'project',
+        }).as('mySharedReadonlyProject').then(function (mySharedReadonlyProject) {
+            cy.contains('Refresh').click();
+            cy.get('main').contains(mySharedReadonlyProject.name).rightclick();
+            cy.get('[data-cy=context-menu]').within(() => {
+                cy.contains('Share').click();
+            });
+            cy.get('.sharing-dialog').as('sharingDialog');
+            cy.get('[data-cy=invite-people-field]').find('input').type(activeUser.user.email);
+            cy.get('[role=tooltip]').click();
+            cy.get('@sharingDialog').contains('Save').click();
+        });
+
+        cy.getAll('@mySharedWritableProject', '@mySharedReadonlyProject')
+            .then(function ([mySharedWritableProject, mySharedReadonlyProject]) {
+                cy.loginAs(activeUser);
+
+                cy.contains('Shared with me').click();
+
+                cy.get('main').contains(mySharedWritableProject.name).rightclick();
+                cy.get('[data-cy=context-menu]').should('contain', 'Move to trash');
+                cy.get('[data-cy=context-menu]').contains('Move to trash').click();
+
+                cy.get('main').contains(mySharedReadonlyProject.name).rightclick();
+                cy.get('[data-cy=context-menu]').should('not.contain', 'Move to trash');
+            });
+    });
+});
\ No newline at end of file
index 24e4b73a3265962f6dec09cdf68025d28d63b03c..8dc003fee1288f8b10cd76ec8bee7d27f1a17fc8 100644 (file)
@@ -196,4 +196,46 @@ Cypress.Commands.add('getAll', (...elements) => {
     }
 
     return promise
-})
\ No newline at end of file
+})
+
+Cypress.Commands.add('shareWith', (srcUserToken, targetUserUUID, itemUUID, permission = 'can_write') => {
+    cy.createLink(srcUserToken, {
+        name: permission,
+        link_class: 'permission',
+        head_uuid: itemUUID,
+        tail_uuid: targetUserUUID
+    });
+})
+
+Cypress.Commands.add('addToFavorites', (activeUserToken, activeUserUUID, itemUUID) => {
+    cy.createLink(activeUserToken, {
+        head_uuid: itemUUID,
+        link_class: 'star',
+        name: '',
+        owner_uuid: activeUserUUID,
+        tail_uuid: activeUserUUID,
+    });
+})
+
+Cypress.Commands.add('createProject', ({
+    owningUser,
+    targetUser,
+    projectName,
+    canWrite,
+    addToFavorites
+}) => {
+    const writePermission = canWrite ? 'can_write' : 'can_read';
+
+    cy.createGroup(owningUser.token, {
+        name: `${projectName} ${Math.floor(Math.random() * 999999)}`,
+        group_class: 'project',
+    }).as(`${projectName}`).then((project) => {
+        if (targetUser && targetUser !== owningUser) {
+            cy.shareWith(owningUser.token, targetUser.user.uuid, project.uuid, writePermission);
+        }
+        if (addToFavorites) {
+            const user = targetUser ? targetUser : owningUser;
+            cy.addToFavorites(user.token, user.user.uuid, project.uuid);
+        }
+    });
+});
\ No newline at end of file
index 54938969ffded1d38c47cf1172d1fc160a7f1990..52867a836cdab2b971ad00198f45f950af51c659 100644 (file)
@@ -24,12 +24,18 @@ type CssRules = 'list'
     | 'iconOpen'
     | 'toggableIcon'
     | 'checkbox'
+    | 'virtualFileTree'
     | 'virtualizedList';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     list: {
         padding: '3px 0px',
     },
+    virtualFileTree: {
+        "&:last-child": {
+            paddingBottom: 20
+          }
+    },
     virtualizedList: {
         height: '200px',
     },
@@ -84,7 +90,7 @@ export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProp
         const it = itemList[index];
         const level = it.level || 0;
         const { toggleItemActive, disableRipple, currentItemUuid, useRadioButtons } = treeProps;
-        const { listItem, loader, toggableIconContainer, renderContainer } = classes;
+        const { listItem, loader, toggableIconContainer, renderContainer, virtualFileTree } = classes;
         const { levelIndentation = 20, itemRightPadding = 20 } = treeProps;
 
         const showSelection = typeof treeProps.showSelection === 'function'
@@ -130,7 +136,7 @@ export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProp
                 : undefined;
         };
 
-        return <div data-cy='virtual-file-tree' style={style}>
+        return <div className={virtualFileTree} data-cy='virtual-file-tree' style={style}>
             <ListItem button className={listItem}
                 style={{
                     paddingLeft: (level + 1) * levelIndentation,
index 66070f77bfc05adafbe9dea37428942d747dabe4..0b80050d56533780152009e240783034b4430ba9 100644 (file)
@@ -23,14 +23,18 @@ import { CollectionFile, CollectionFileType } from '~/models/collection-file';
 
 export interface FileInputProps {
     input: FileCommandInputParameter;
+    options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
 }
-export const FileInput = ({ input }: FileInputProps) =>
+export const FileInput = ({ input, options }: FileInputProps) =>
     <Field
         name={input.id}
         commandInput={input}
         component={FileInputComponent}
         format={format}
         parse={parse}
+        {...{
+            options
+        }}
         validate={getValidation(input)} />;
 
 const format = (value?: File) => value ? value.basename : '';
@@ -54,7 +58,9 @@ interface FileInputComponentState {
 }
 
 const FileInputComponent = connect()(
-    class FileInputComponent extends React.Component<GenericInputProps & DispatchProp, FileInputComponentState> {
+    class FileInputComponent extends React.Component<GenericInputProps & DispatchProp & {
+        options?: { showOnlyOwned: boolean, showOnlyWritable: boolean };
+    }, FileInputComponentState> {
         state: FileInputComponentState = {
             open: false,
         };
@@ -119,6 +125,7 @@ const FileInputComponent = connect()(
                         pickerId={this.props.commandInput.id}
                         includeCollections
                         includeFiles
+                        options={this.props.options}
                         toggleItemActive={this.setFile} />
                 </DialogContent>
                 <DialogActions>
index 45b971179384671f6c3175e2544c19c60cec1fd9..3a0afd34868c91fc7ce86727b84f3e7112e7f9b8 100644 (file)
@@ -89,7 +89,7 @@ const getInputComponent = (input: CommandInputParameter) => {
             return <StringInput input={input as StringCommandInputParameter} />;
 
         case isPrimitiveOfType(input, CWLType.FILE):
-            return <FileInput input={input as FileCommandInputParameter} />;
+            return <FileInput options={{ showOnlyOwned: false, showOnlyWritable: false }} input={input as FileCommandInputParameter} />;
 
         case isPrimitiveOfType(input, CWLType.DIRECTORY):
             return <DirectoryInput input={input as DirectoryCommandInputParameter} />;