Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBS-27 Get all roles for a user #13

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auth_checker/plugins/authorize/casbin_pl.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def authorize(self, *args) -> bool:
def roles_for_user(self, *args) -> list[str]:
if args:
subject = args[0]
return self.enforcer.get_roles_for_user(subject)
return self.enforcer.get_implicit_roles_for_user(subject)
return []

def permissions_for_user(self, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions auth_checker/util/authorization_roles.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
DEV_ROLES = ["dev"]
ADMIN_ROLES = ["admin"] + DEV_ROLES
READ_WRITE_ROLES = ["staff"] + ADMIN_ROLES
SERVICE_ROLES = ["service"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "auth-checker"
version = "2.0.7"
version = "2.0.8"
authors = [
{ name="Ryan Semmler", email="[email protected]" },
{ name="Luc Sanchez", email="[email protected]" },
Expand Down
Loading