Commit 2d9b8030 authored by mvdbeek's avatar mvdbeek
Browse files

Use UserRoleAssociation to get private roles

If I understand this correctly this should work even if the user email
parent 02c17715
......@@ -766,7 +766,8 @@ class GalaxyRBACAgent(RBACAgent):
def get_private_user_role(self, user, auto_create=False):
role = self.sa_session.query(self.model.Role) \
.filter(and_( ==,
.filter(and_(self.model.UserRoleAssociation.table.c.user_id ==, == self.model.UserRoleAssociation.table.c.role_id,
self.model.Role.table.c.type == self.model.Role.types.PRIVATE)) \
if not role:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment