Skip to content

Commit

Permalink
It's the same, but nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Sep 20, 2023
1 parent 0e3a121 commit 547bc97
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions authlib/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@


def allow_deny_globs(user, perm, obj, allow=(), deny=()):
for rule in deny:
if fnmatch(perm, rule):
raise PermissionDenied
if any(fnmatch(perm, rule) for rule in deny):
raise PermissionDenied
return any(fnmatch(perm, rule) for rule in allow)


Expand Down

0 comments on commit 547bc97

Please sign in to comment.