Browse Source
fix: Check if applyPolicies exists in the config (#367)
pull/418/head
v2.13.1
Jonhatan Fajardo
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
src/keycloak/authorization/__init__.py
|
|
@ -86,8 +86,9 @@ class Authorization: |
|
|
|
|
|
|
|
permission.scopes = ast.literal_eval(pol["config"]["scopes"]) |
|
|
|
|
|
|
|
for policy_name in ast.literal_eval(pol["config"]["applyPolicies"]): |
|
|
|
self.policies[policy_name].add_permission(permission) |
|
|
|
if "applyPolicies" in pol["config"]: |
|
|
|
for policy_name in ast.literal_eval(pol["config"]["applyPolicies"]): |
|
|
|
self.policies[policy_name].add_permission(permission) |
|
|
|
|
|
|
|
if pol["type"] == "resource": |
|
|
|
permission = Permission( |
|
|
|