diff --git a/lib/galaxy/files/__init__.py b/lib/galaxy/files/__init__.py index b13b2e1db8c8..d2c08059548d 100644 --- a/lib/galaxy/files/__init__.py +++ b/lib/galaxy/files/__init__.py @@ -396,7 +396,15 @@ def preferences(self): def role_names(self) -> Set[str]: """The set of role names of this user.""" user = self.trans.user - return {ura.role.name for ura in user.roles} if user else set() + role_names = {ura.role.name for ura in user.roles} if user else set() + # Exclude generic role names + # TODO refactor to use Role.default_name (can't import Role) + sharing_role = "sharing role" + private_role = "private role" + role_names = role_names - {sharing_role, private_role} + # Add user email to identify their private role + role_names.add(user.email) + return role_names @property def group_names(self) -> Set[str]: