Skip to content

Commit

Permalink
refactor: rename MASTER_ACCESS
Browse files Browse the repository at this point in the history
to MAINTAINER_ACCESS to follow GitLab 11.0 docs

See:
https://docs.gitlab.com/ce/user/permissions.html#project-members-permissions
  • Loading branch information
max-wittig committed Oct 6, 2018
1 parent 32b5122 commit c38775a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/gl_objects/access_requests.rst
Expand Up @@ -10,7 +10,7 @@ following constants are provided to represent the access levels:
* ``gitlab.GUEST_ACCESS``: ``10``
* ``gitlab.REPORTER_ACCESS``: ``20``
* ``gitlab.DEVELOPER_ACCESS``: ``30``
* ``gitlab.MASTER_ACCESS``: ``40``
* ``gitlab.MAINTAINER_ACCESS``: ``40``
* ``gitlab.OWNER_ACCESS``: ``50``

References
Expand Down Expand Up @@ -43,7 +43,7 @@ Create an access request::
Approve an access request::

ar.approve() # defaults to DEVELOPER level
ar.approve(access_level=gitlab.MASTER_ACCESS) # explicitly set access level
ar.approve(access_level=gitlab.MAINTAINER_ACCESS) # explicitly set access level

Deny (delete) an access request::

Expand Down
2 changes: 1 addition & 1 deletion docs/gl_objects/groups.rst
Expand Up @@ -142,7 +142,7 @@ The following constants define the supported access levels:
* ``gitlab.GUEST_ACCESS = 10``
* ``gitlab.REPORTER_ACCESS = 20``
* ``gitlab.DEVELOPER_ACCESS = 30``
* ``gitlab.MASTER_ACCESS = 40``
* ``gitlab.MAINTAINER_ACCESS = 40``
* ``gitlab.OWNER_ACCESS = 50``

Reference
Expand Down
2 changes: 1 addition & 1 deletion docs/gl_objects/projects.rst
Expand Up @@ -493,7 +493,7 @@ Add a project member::

Modify a project member (change the access level)::

member.access_level = gitlab.MASTER_ACCESS
member.access_level = gitlab.MAINTAINER_ACCESS
member.save()

Remove a member from the project team::
Expand Down
2 changes: 1 addition & 1 deletion docs/gl_objects/protected_branches.rst
Expand Up @@ -32,7 +32,7 @@ Create a protected branch::
p_branch = project.protectedbranches.create({
'name': '*-stable',
'merge_access_level': gitlab.DEVELOPER_ACCESS,
'push_access_level': gitlab.MASTER_ACCESS
'push_access_level': gitlab.MAINTAINER_ACCESS
})

Delete a protected branch::
Expand Down
3 changes: 2 additions & 1 deletion gitlab/const.py
Expand Up @@ -18,7 +18,8 @@
GUEST_ACCESS = 10
REPORTER_ACCESS = 20
DEVELOPER_ACCESS = 30
MASTER_ACCESS = 40
MAINTAINER_ACCESS = 40
MASTER_ACCESS = MAINTAINER_ACCESS
OWNER_ACCESS = 50

VISIBILITY_PRIVATE = 0
Expand Down

0 comments on commit c38775a

Please sign in to comment.