Skip to content

Commit f5cdfa0

Browse files
committed
feat(groups): add a list_ldap_group_links to go along with the pre existing add_ldap_group_link and delete_ldap_group_link
1 parent 9bd433a commit f5cdfa0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

gitlab/v4/objects/groups.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,21 @@ def delete_ldap_group_link(
194194
path += f"/{cn}"
195195
self.manager.gitlab.http_delete(path, **kwargs)
196196

197+
@cli.register_custom_action("Group")
198+
@exc.on_http_error(exc.GitlabGetError)
199+
def list_ldap_group_links(self, **kwargs):
200+
"""Add an LDAP group link.
201+
202+
Args:
203+
**kwargs: Extra options to send to the server (e.g. sudo)
204+
205+
Raises:
206+
GitlabAuthenticationError: If authentication is not correct
207+
GitlabGetError: If the server cannot perform the request
208+
"""
209+
path = "/groups/%s/ldap_group_links" % self.get_id()
210+
return self.manager.gitlab.http_get(path, **kwargs)
211+
197212
@cli.register_custom_action("Group")
198213
@exc.on_http_error(exc.GitlabCreateError)
199214
def ldap_sync(self, **kwargs: Any) -> None:

0 commit comments

Comments
 (0)