From f682307d19374cf6755c73ea9411703b7002fa7c Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 7 Jan 2020 09:23:13 -0500 Subject: [PATCH] Fix tool shed tests for #9168. --- lib/galaxy/webapps/tool_shed/security/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/galaxy/webapps/tool_shed/security/__init__.py b/lib/galaxy/webapps/tool_shed/security/__init__.py index 17fc5bd5afe..b212e674e6e 100644 --- a/lib/galaxy/webapps/tool_shed/security/__init__.py +++ b/lib/galaxy/webapps/tool_shed/security/__init__.py @@ -34,6 +34,9 @@ class RBACAgent(object): """ return [x for x in [self.permitted_actions.get(action_string) for action_string in permitted_action_strings] if x is not None] + def create_user_role(self, user, app): + raise Exception("Unimplemented Method") + def create_private_user_role(self, user): raise Exception("Unimplemented Method") @@ -128,6 +131,9 @@ class CommunityRBACAgent(RBACAgent): self.associate_components(role=role, user=user) return role + def create_user_role(self, user, app): + self.get_private_user_role(user, auto_create=True) + def get_item_actions(self, action, item): # item must be one of: Dataset, Library, LibraryFolder, LibraryDataset, LibraryDatasetDatasetAssociation return [permission for permission in item.actions if permission.action == action.action]