mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Set the role type to SYSTEM for auto generated roles, which is similar to the default behavior
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user