Commit 1103fb26 authored by Janek Bevendorff's avatar Janek Bevendorff

Exclude private groups from onboarding

parent 87db37ae
......@@ -50,7 +50,7 @@ if len(selected_ids) < 1:
prompt = ["Give", str(len(selected_ids)),
"user{}".format('s' if len(selected_ids) > 1 else ''),
"MASTER access to all groups?"]
"MASTER access to all public and internal groups?"]
if not confirm_prompt(" ".join(prompt)):
sys.exit(0)
......@@ -58,7 +58,7 @@ if not confirm_prompt(" ".join(prompt)):
users_by_id = {u.id: u for u in external_users}
#groups_to_add = [gl.groups.get(GROUP_ID_WEBISSTUD), gl.groups.get(GROUP_ID_THIRDPARTY)]
groups_to_add = gl.groups.list(all=True)
groups_to_add = [g for g in gl.groups.list(all=True) if g.visibility != 'private']
def add_to_group(uid, g):
lInfo("Adding new member {} to {}".format(u.username, g.name))
......
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