From ebf822cef7e686d8a198dcf419c20b1bfb88dea3 Mon Sep 17 00:00:00 2001 From: Gauvain Pocentek Date: Wed, 13 Jun 2018 22:01:48 +0200 Subject: Add support for the LDAP gorups API --- docs/gl_objects/groups.rst | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'docs/gl_objects') diff --git a/docs/gl_objects/groups.rst b/docs/gl_objects/groups.rst index 9eddcd9..5ef5469 100644 --- a/docs/gl_objects/groups.rst +++ b/docs/gl_objects/groups.rst @@ -177,12 +177,23 @@ LDAP group links Add an LDAP group link to an existing GitLab group:: - group.add_ldap_group_link(ldap_group_cn, gitlab.DEVELOPER_ACCESS, 'main') + group.add_ldap_group_link(ldap_group_cn, gitlab.DEVELOPER_ACCESS, 'ldapmain') Remove a link:: - group.delete_ldap_group_link(ldap_group_cn, 'main') + group.delete_ldap_group_link(ldap_group_cn, 'ldapmain') Sync the LDAP groups:: group.ldap_sync() + +You can use the ``ldapgroups`` manager to list available LDAP groups:: + + # listing (supports pagination) + ldap_groups = gl.ldapgroups.list() + + # filter using a group name + ldap_groups = gl.ldapgroups.list(search='foo') + + # list the groups for a specific LDAP provider + ldap_groups = gl.ldapgroups.list(search='foo', provider='ldapmain') -- cgit v1.2.1