Skip to content

Commit

Permalink
Merge pull request #2414 from auslin-aot/fwf-4084-return-groups-on-mu…
Browse files Browse the repository at this point in the history
…ltitenant

FWF-4084: Update group_or_roles to  return groups in multitenant
  • Loading branch information
arun-s-aot authored Dec 12, 2024
2 parents 98b3201 + 3ca8ac6 commit 645b337
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ def groups(self) -> List[str]:
@property
def group_or_roles(self) -> List[str]:
"""Return groups is env is using groups, else roles."""
return (
self._roles
if current_app.config.get("KEYCLOAK_ENABLE_CLIENT_AUTH")
else self._groups
)
if current_app.config.get(
"KEYCLOAK_ENABLE_CLIENT_AUTH"
) and not current_app.config.get("MULTI_TENANCY_ENABLED"):
return self._roles
else:
return self._groups


def user_context(function):
Expand Down

0 comments on commit 645b337

Please sign in to comment.