Skip to content

Additional functionality #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
johnbritto1 opened this issue Oct 29, 2018 · 1 comment
Open

Additional functionality #9

johnbritto1 opened this issue Oct 29, 2018 · 1 comment

Comments

@johnbritto1
Copy link

johnbritto1 commented Oct 29, 2018

Hello,

The pain part is when we have to add a new user to 30+ group. At present, there is no single solution from Gitlab on achieving this without 30+ clicks in GUI.
Could you add a functionality to add a user to N number of groups ID's and Project ID's.

Thanks,

@cClaude
Copy link
Owner

cClaude commented Nov 20, 2021

You can use:

./glCreateUser.sh USER_NAME 'USER_FULLNAME' 'USER_EMAIL'

Let say, you have a JSON like this:

[
  { "name": "name1", "email": "[email protected]" },
  { "name": "name2", "email": "[email protected]" }
]

Then just adapt create a script like this:

echo '[{"name":"name1","email":"[email protected]"},{"name":"name2","email":"[email protected]"}]' | 
  jq -c .[] | 
  while read -r entry ; do 
    name="$( jq .name <<<"${entry}" ) "
    email="$( jq .email <<<"${entry}" )" 
    echo "Add '${name}' '${email}'"
    # ./glCreateUser.sh "${name}" "${name}" "${email}"
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants