Richard Nemeth
3 years ago
No known key found for this signature in database
GPG Key ID: 21C39470DF3DEC39
1 changed files with
8 additions and
4 deletions
-
src/keycloak/keycloak_admin.py
|
@ -1361,9 +1361,11 @@ class KeycloakAdmin: |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
if skip_exists: |
|
|
if skip_exists: |
|
|
res = self.get_client_role(client_id=client_role_id, role_name=payload["name"]) |
|
|
|
|
|
if res: |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
res = self.get_client_role(client_id=client_role_id, role_name=payload["name"]) |
|
|
return res["name"] |
|
|
return res["name"] |
|
|
|
|
|
except KeycloakGetError: |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
params_path = {"realm-name": self.realm_name, "id": client_role_id} |
|
|
params_path = {"realm-name": self.realm_name, "id": client_role_id} |
|
|
data_raw = self.raw_post( |
|
|
data_raw = self.raw_post( |
|
@ -1480,9 +1482,11 @@ class KeycloakAdmin: |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
if skip_exists: |
|
|
if skip_exists: |
|
|
role = self.get_realm_role(role_name=payload["name"]) |
|
|
|
|
|
if role is not None: |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
role = self.get_realm_role(role_name=payload["name"]) |
|
|
return role["name"] |
|
|
return role["name"] |
|
|
|
|
|
except KeycloakGetError: |
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
params_path = {"realm-name": self.realm_name} |
|
|
params_path = {"realm-name": self.realm_name} |
|
|
data_raw = self.raw_post( |
|
|
data_raw = self.raw_post( |
|
|