From be02063c3fbec79a7e146ef87dbc6e99c80e7754 Mon Sep 17 00:00:00 2001 From: Jelle Scholtalbers Date: Fri, 16 Mar 2018 11:56:05 +0100 Subject: [PATCH] Set the role type to SYSTEM for auto generated roles, which is similar to the default behavior --- lib/galaxy/security/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/security/__init__.py b/lib/galaxy/security/__init__.py index 721c31d53b4..4b26ed13c82 100644 --- a/lib/galaxy/security/__init__.py +++ b/lib/galaxy/security/__init__.py @@ -777,7 +777,7 @@ class GalaxyRBACAgent(RBACAgent): return role def get_role(self, name, type=None): - type = type or self.model.Role.types.ADMIN + type = type or self.model.Role.types.SYSTEM # will raise exception if not found return self.sa_session.query(self.model.Role) \ .filter(and_(self.model.Role.table.c.name == name, @@ -785,7 +785,7 @@ class GalaxyRBACAgent(RBACAgent): .one() def create_role(self, name, description, in_users, in_groups, create_group_for_role=False, type=None): - type = type or self.model.Role.types.ADMIN + type = type or self.model.Role.types.SYSTEM role = self.model.Role(name=name, description=description, type=type) self.sa_session.add(role) # Create the UserRoleAssociations