|
|
@ -1307,7 +1307,7 @@ class KeycloakAdmin: |
|
|
|
data_raw = self.connection.raw_get(urls_patterns.URL_ADMIN_GROUP.format(**params_path)) |
|
|
|
return raise_error_from_response(data_raw, KeycloakGetError) |
|
|
|
|
|
|
|
def get_child_groups(self, group_id): |
|
|
|
def get_child_groups(self, group_id, query=None): |
|
|
|
"""Get child groups by parent id. |
|
|
|
|
|
|
|
Returns children of Parentgroup |
|
|
@ -1317,12 +1317,18 @@ class KeycloakAdmin: |
|
|
|
|
|
|
|
:param group_id: The parents group id |
|
|
|
:type group_id: str |
|
|
|
:param query: Additional query options |
|
|
|
:type query: dict |
|
|
|
:return: Keycloak server response (List of GroupRepresentation) |
|
|
|
:rtype: list |
|
|
|
""" |
|
|
|
query = query or {} |
|
|
|
params_path = {"realm-name": self.connection.realm_name, "id": group_id} |
|
|
|
data_raw = self.connection.raw_get(urls_patterns.URL_ADMIN_GROUP_CHILD.format(**params_path)) |
|
|
|
return raise_error_from_response(data_raw, KeycloakGetError) |
|
|
|
url = urls_patterns.URL_ADMIN_GROUPS.format(**params_path) |
|
|
|
if "first" in query or "max" in query: |
|
|
|
return self.__fetch_paginated(url, query) |
|
|
|
|
|
|
|
return self.__fetch_all(url, query) |
|
|
|
|
|
|
|
def get_subgroups(self, group, path): |
|
|
|
"""Get subgroups. |
|
|
|