summaryrefslogtreecommitdiff
path: root/docs/gl_objects/groups.rst
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:56 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:56 -0800
commitb3b0b5f1da5b9da9bf44eac33856ed6eadf37dd6 (patch)
tree51d07a20421b89642f263c08f5cea61ca4924e61 /docs/gl_objects/groups.rst
parent6b8067e668b6a37a19e07d84e9a0d2d2a99b4d31 (diff)
downloadgitlab-jlvillal/const_explicit.tar.gz
docs: update docs to use gitlab.const for constantsjlvillal/const_explicit
Update the docs to use gitlab.const to access constants.
Diffstat (limited to 'docs/gl_objects/groups.rst')
-rw-r--r--docs/gl_objects/groups.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/gl_objects/groups.rst b/docs/gl_objects/groups.rst
index 549fe53..435835f 100644
--- a/docs/gl_objects/groups.rst
+++ b/docs/gl_objects/groups.rst
@@ -80,7 +80,7 @@ Remove a group::
Share/unshare the group with a group::
- group.share(group2.id, gitlab.DEVELOPER_ACCESS)
+ group.share(group2.id, gitlab.const.DEVELOPER_ACCESS)
group.unshare(group2.id)
Import / Export
@@ -237,11 +237,11 @@ Group members
The following constants define the supported access levels:
-* ``gitlab.GUEST_ACCESS = 10``
-* ``gitlab.REPORTER_ACCESS = 20``
-* ``gitlab.DEVELOPER_ACCESS = 30``
-* ``gitlab.MAINTAINER_ACCESS = 40``
-* ``gitlab.OWNER_ACCESS = 50``
+* ``gitlab.const.GUEST_ACCESS = 10``
+* ``gitlab.const.REPORTER_ACCESS = 20``
+* ``gitlab.const.DEVELOPER_ACCESS = 30``
+* ``gitlab.const.MAINTAINER_ACCESS = 40``
+* ``gitlab.const.OWNER_ACCESS = 50``
Reference
---------
@@ -284,11 +284,11 @@ Get a member of a group, including members inherited through ancestor groups::
Add a member to the group::
member = group.members.create({'user_id': user_id,
- 'access_level': gitlab.GUEST_ACCESS})
+ 'access_level': gitlab.const.GUEST_ACCESS})
Update a member (change the access level)::
- member.access_level = gitlab.DEVELOPER_ACCESS
+ member.access_level = gitlab.const.DEVELOPER_ACCESS
member.save()
Remove a member from the group::
@@ -316,7 +316,7 @@ LDAP group links
Add an LDAP group link to an existing GitLab group::
- group.add_ldap_group_link(ldap_group_cn, gitlab.DEVELOPER_ACCESS, 'ldapmain')
+ group.add_ldap_group_link(ldap_group_cn, gitlab.const.DEVELOPER_ACCESS, 'ldapmain')
Remove a link::