Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
code-generic
code-webis-cmd
Commits
e21fc26e
Commit
e21fc26e
authored
Nov 25, 2020
by
Johannes Kiesel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maintainer Access for groups
parent
2bfd7837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tools/git/onboard.py
tools/git/onboard.py
+2
-2
No files found.
tools/git/onboard.py
View file @
e21fc26e
...
...
@@ -75,13 +75,13 @@ def confirm_group_access_prompt(group, users):
def
add_to_group
(
user
,
group
):
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
):
member
=
group
.
members
.
get
(
user
.
id
)
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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment