From 73d83b73048867d725f1c442bef5dd7695bfaee4 Mon Sep 17 00:00:00 2001 From: Brett Rowan <121075405+b-rowan@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:37:43 -0600 Subject: [PATCH] Update goosebit/auth/__init__.py Co-authored-by: Ezra Buehler --- goosebit/auth/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goosebit/auth/__init__.py b/goosebit/auth/__init__.py index 22307353..e0c7d3f4 100644 --- a/goosebit/auth/__init__.py +++ b/goosebit/auth/__init__.py @@ -117,7 +117,7 @@ def validate_user_permissions( def compare_permissions(scopes: list[str] | None, permissions: set[str]) -> bool: - deny_permissions = [p.replace("!", "") for p in permissions if p.startswith("!")] + deny_permissions = list(map(lambda x: x.lstrip("!"), permissions)) allow_permissions = [p for p in permissions if not p.startswith("!")] if scopes is None: return True