diff --git a/lib/galaxy/managers/rbac_secured.py b/lib/galaxy/managers/rbac_secured.py index a63cd036447b..41f24da24809 100644 --- a/lib/galaxy/managers/rbac_secured.py +++ b/lib/galaxy/managers/rbac_secured.py @@ -42,10 +42,10 @@ def error_unless_permitted(self, item, user, trans=None): error_info = dict(model_class=item.__class__, id=getattr(item, "id", None)) raise self.permission_failed_error_class(**error_info) - def grant(self, item, user, flush=True): + def grant(self, item, user, flush: bool = True): raise NotImplementedError("abstract parent class") - def revoke(self, item, user, flush=True): + def revoke(self, item, user, flush: bool = True): raise NotImplementedError("abstract parent class") def _role_is_permitted(self, item, role): @@ -197,13 +197,13 @@ def is_permitted(self, dataset, user, trans=None): return True return False - def grant(self, dataset, user, flush=True): + def grant(self, item, user, flush: bool = True): private_role = self._user_private_role(user) - return self._grant_role(dataset, private_role, flush=flush) + return self._grant_role(item, private_role, flush=flush) - def revoke(self, dataset, user, flush=True): + def revoke(self, item, user, flush: bool = True): private_role = self._user_private_role(user) - return self._revoke_role(dataset, private_role, flush=flush) + return self._revoke_role(item, private_role, flush=flush) # ---- private def _role_is_permitted(self, dataset, role): @@ -253,13 +253,13 @@ def is_permitted(self, dataset, user, trans=None): or self._user_has_all_roles(user, current_roles) ) - def grant(self, item, user): + def grant(self, item, user, flush: bool = True): pass # not so easy # need to check for a sharing role # then add the new user to it - def revoke(self, item, user): + def revoke(self, item, user, flush: bool = True): pass # not so easy