diff options
| author | Ray <1338507+rayisbadat@users.noreply.github.com> | 2022-11-16 14:35:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 21:35:50 +0100 |
| commit | ad7c8fafd56866002aa6723ceeba4c4bc071ca0d (patch) | |
| tree | 79c8cde65c170a5c8ce0769326eb77da9975ca18 /gitlab | |
| parent | a0553c29899f091209afe6366e8fb75fb9edef40 (diff) | |
| download | gitlab-ad7c8fafd56866002aa6723ceeba4c4bc071ca0d.tar.gz | |
feat(groups): add support for listing ldap_group_links (#2371)
Diffstat (limited to 'gitlab')
| -rw-r--r-- | gitlab/v4/objects/groups.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index 9a6c473..93321a1 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -195,6 +195,23 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): self.manager.gitlab.http_delete(path, **kwargs) @cli.register_custom_action("Group") + @exc.on_http_error(exc.GitlabGetError) + def list_ldap_group_links( + self, **kwargs: Any + ) -> Union[gitlab.GitlabList, List[Dict[str, Any]]]: + """List LDAP group links. + + Args: + **kwargs: Extra options to send to the server (e.g. sudo) + + Raises: + GitlabAuthenticationError: If authentication is not correct + GitlabGetError: If the server cannot perform the request + """ + path = f"/groups/{self.encoded_id}/ldap_group_links" + return self.manager.gitlab.http_list(path, **kwargs) + + @cli.register_custom_action("Group") @exc.on_http_error(exc.GitlabCreateError) def ldap_sync(self, **kwargs: Any) -> None: """Sync LDAP groups. |
