summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2016-03-22 21:14:58 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2016-03-22 21:14:58 +0100
commit61bc24fd341e53718f8b9c06c3ac1bbcd55d2530 (patch)
treeee2a96f30fe12cdac37b09a986cfc12d62ccd29b /gitlab/objects.py
parent9a9a4c41c02072bd7fad18f75702ec7bb7407ac6 (diff)
downloadgitlab-61bc24fd341e53718f8b9c06c3ac1bbcd55d2530.tar.gz
Add missing group creation parameters
description and visibility_level are optional parameters for group creation.
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 8b9e275..2ceb37f 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -664,6 +664,7 @@ class Group(GitlabObject):
canUpdate = False
_constructorTypes = {'projects': 'Project'}
requiredCreateAttrs = ['name', 'path']
+ optionalCreateAttrs = ['description', 'visibility_level']
shortPrintAttr = 'name'
managers = [('members', GroupMemberManager, [('group_id', 'id')])]
@@ -673,6 +674,10 @@ class Group(GitlabObject):
MASTER_ACCESS = 40
OWNER_ACCESS = 50
+ VISIBILITY_PRIVATE = 0
+ VISIBILITY_INTERNAL = 10
+ VISIBILITY_PUBLIC = 20
+
def Member(self, id=None, **kwargs):
warnings.warn("`Member` is deprecated, use `members` instead",
DeprecationWarning)