Commit e21fc26e authored by Johannes Kiesel's avatar Johannes Kiesel
Browse files

Maintainer Access for groups

parent 2bfd7837
...@@ -75,13 +75,13 @@ def confirm_group_access_prompt(group, users): ...@@ -75,13 +75,13 @@ def confirm_group_access_prompt(group, users):
def add_to_group(user, group): def add_to_group(user, group):
logger.info("Adding new member '{}' to '{}'".format(user.username, group.full_path)) logger.info("Adding new member '{}' to '{}'".format(user.username, group.full_path))
group.members.create({'user_id': user.id, 'access_level': gitlab.GUEST_ACCESS}) group.members.create({'user_id': user.id, 'access_level': gitlab.MAINTAINER_ACCESS})
def set_access_for_existing(user, group): def set_access_for_existing(user, group):
member = group.members.get(user.id) member = group.members.get(user.id)
logger.info("Granting access to '{}' for '{}'".format(group.full_path, user.username)) logger.info("Granting access to '{}' for '{}'".format(group.full_path, user.username))
member.access_level = gitlab.GUEST_ACCESS member.access_level = gitlab.MAINTAINER_ACCESS
member.save() member.save()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment