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
parent
commit
138baf0a3a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/keycloak/authorization/__init__.py

1
src/keycloak/authorization/__init__.py

@ -86,6 +86,7 @@ class Authorization:
permission.scopes = ast.literal_eval(pol["config"]["scopes"]) permission.scopes = ast.literal_eval(pol["config"]["scopes"])
if "applyPolicies" in pol["config"]:
for policy_name in ast.literal_eval(pol["config"]["applyPolicies"]): for policy_name in ast.literal_eval(pol["config"]["applyPolicies"]):
self.policies[policy_name].add_permission(permission) self.policies[policy_name].add_permission(permission)

Loading…
Cancel
Save