Skip to content

Commit

Permalink
Merge pull request #11744 from archesproject/11743-cbyrd-has_perm-sup…
Browse files Browse the repository at this point in the history
…eruser-escape-hatch

adds superuser escape hatch to has_perm #11743
  • Loading branch information
chrabyrd authored Jan 23, 2025
2 parents 17f03c5 + 703c290 commit 4b44911
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arches/app/permissions/arches_permission_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ def has_perm(self, user_obj: User, perm: str, obj: Model | None = None) -> bool:
"given obj has '%s'" % (app_label, obj._meta.app_label)
)

if user_obj.is_superuser:
return True

obj_checker: ObjectPermissionChecker = CachedObjectPermissionChecker(
user_obj, obj
)
Expand Down

0 comments on commit 4b44911

Please sign in to comment.