From 772e79a4c47826c26f96b39a2fd6786a1cd6c2a7 Mon Sep 17 00:00:00 2001 From: Andrew Larssen Date: Fri, 24 Sep 2021 16:02:45 +0100 Subject: [PATCH] feat(api): Add support for query ldap groups links --- gitlab/v4/objects/groups.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index b675a39ee..792bb0a8d 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -38,6 +38,8 @@ "GroupDescendantGroupManager", "GroupSubgroup", "GroupSubgroupManager", + "GroupLdapLinks", + "GroupLdapLinksManager", ] @@ -71,6 +73,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): subgroups: "GroupSubgroupManager" variables: GroupVariableManager wikis: GroupWikiManager + ldap_group_links: "GroupLdapLinksManager" @cli.register_custom_action("Group", ("project_id",)) @exc.on_http_error(exc.GitlabTransferProjectError) @@ -320,6 +323,16 @@ class GroupSubgroupManager(ListMixin, RESTManager): _types = {"skip_groups": types.ListAttribute} +class GroupLdapLinks(RESTObject): + pass + + +class GroupLdapLinksManager(ListMixin, RESTManager): + _path = "/groups/%(group_id)s/ldap_group_links" + _obj_cls = GroupLdapLinks + _from_parent_attrs = {"group_id": "id"} + + class GroupDescendantGroup(RESTObject): pass