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. 5
      src/keycloak/authorization/__init__.py

5
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(

Loading…
Cancel
Save