From 86ac9ca9562dae2cdc56048f2deb80de4df82f7b Mon Sep 17 00:00:00 2001 From: Oleg Zharkov Date: Thu, 11 Feb 2021 16:00:18 +0100 Subject: [PATCH] first implementation --- .../LibraryFolder/LibraryFolder.vue | 2 +- .../LibraryFolderDatasetPermissions.vue | 148 ++++++++++++++++++ .../LibraryFolderPermissions.vue | 127 +++++---------- .../LibraryPermissionsWarning.vue | 25 +++ .../PermissionsInputField.vue | 71 ++++++--- .../LibraryFolderPermissions/services.js | 23 ++- .../LibraryFolderPermissions/utils.js | 9 ++ .../LibraryFolder/LibraryFolderRouter.vue | 9 +- client/src/entry/analysis/AnalysisRouter.js | 1 + lib/galaxy/webapps/galaxy/buildapp.py | 1 + 10 files changed, 308 insertions(+), 108 deletions(-) create mode 100644 client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderDatasetPermissions.vue create mode 100644 client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryPermissionsWarning.vue create mode 100644 client/src/components/LibraryFolder/LibraryFolderPermissions/utils.js diff --git a/client/src/components/LibraryFolder/LibraryFolder.vue b/client/src/components/LibraryFolder/LibraryFolder.vue index 10248d84889..432402730e7 100644 --- a/client/src/components/LibraryFolder/LibraryFolder.vue +++ b/client/src/components/LibraryFolder/LibraryFolder.vue @@ -461,7 +461,7 @@ export default { else if (element.type === "folder") return `${this.root}library/folders/${element.id}`; }, navigateToPermission(element) { - if (element.type === "file") window.location.replace(`${this.createContentLink(element)}/permissions`); + if (element.type === "file") this.$router.push({ path: `/permissions/${this.folder_id}/dataset/${element.id}` }) else if (element.type === "folder") this.$router.push({ path: `/permissions/${element.id}` }); }, getMessage(element) { diff --git a/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderDatasetPermissions.vue b/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderDatasetPermissions.vue new file mode 100644 index 00000000000..c5abd0db36b --- /dev/null +++ b/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderDatasetPermissions.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderPermissions.vue b/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderPermissions.vue index 982ef7bd18e..8f1340681e2 100644 --- a/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderPermissions.vue +++ b/client/src/components/LibraryFolder/LibraryFolderPermissions/LibraryFolderPermissions.vue @@ -9,77 +9,44 @@
{{ folder.name }}
-
-
- - You are logged in as an administrator therefore you can manage any folder on - this Galaxy instance. Please make sure you understand the consequences. - - - You can assign any number of roles to any of the following permission types. However please read - carefully the implications of such actions. - -
-
+
-

Folder permissions

-

- Roles that can manage permissions on this folder -

- - - - - - User with any of these roles can manage permissions on this folder. - - - -

- Roles that can add items to this folder -

- - - - - - User with any of these roles can add items to this folder (folders and - datasets). - - - -

- Roles that can modify this folder -

- - - - - - User with any of these roles can modify this folder (name, etc.). - - +

Folder permissions

+ + + + +