Skip to content

Commit b64545e

Browse files
committed
Finished implementing the user group memberships part.
New Gitlab option "newMemberAccessLevel" to determine the access level to use when adding users to groups. (Default 30: Developer.) Renamed "sync" to "update" in the sync arrays to avoid confusion. Removed some pointless messages. You can now all test this out if you like but please use the dry run option `-d` in your command to prevent writing changes to your Gitlab instances. (Yes I know it's Christmas day... Just committing in that gap between family visits and very dinner.)
1 parent 214a907 commit b64545e

File tree

3 files changed

+188
-37
lines changed

3 files changed

+188
-37
lines changed

README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ Though this functionality is available out of the box with Gitlab enterprise edi
66

77
As a bonus it can also do a light rake of LDAP users not currently in Gitlab, so those that haven't signed in for their first time can still have projects and permissions assigned to them. **This may make the tool unsuitable git Gitlab-EE as this would certainly impact its licensing fees!**
88

9-
## **THIS TOOL IS NOT COMPLETED YET. DO NOT USE IT IN A PRODUCTION ENVIRONMENT.**
9+
## **THIS TOOL IS NOT QUALITY ASSURED YET. DO NOT USE IT IN A PRODUCTION ENVIRONMENT.**
1010

11-
**Seriously. Only use this on test Gitlab CE instances.**
11+
**Seriously.**
1212

13-
What is complete:
13+
Though all of this tool's features are now implemented, very limited testing has happened, so don't expect a perfect experience. You should therefore only use this on test Gitlab CE instances, or if you must use this on your production environment, at the very least take a backup of your Gitlab data before using this.
14+
15+
Features implemented:
1416

1517
* Reading users from LDAP
1618
* Reading groups from LDAP
1719
* Synchronising users to Gitlab
1820
* Synchronising groups to Gitlab
21+
* Synchronising Gitlab group memberships based on LDAP group memberships
1922

20-
What is left to-do:
21-
22-
* Synchronising group memberships to Gitlab
23+
If in doubt use the dry run `-d` option to prevent writing to Gitlab first, combined with `-vv` to see exactly what would happen.
2324

24-
**If in doubt use the dry run `-d` option to prevent writing to Gitlab first, combined with `-vv` to see exactly what would happen. You have been warned.**
25+
**You have been warned!**
2526

2627
## Getting Started
2728

@@ -258,6 +259,20 @@ Only empty Gitlab groups will ever be deleted. If there are extra groups with me
258259

259260
Default: *false*
260261

262+
##### newMemberAccessLevel *(integer|null)*
263+
264+
The access level to provide users when added to groups.
265+
266+
* 10: Guest
267+
* 20: Reporter
268+
* 30: Developer
269+
* 40: Maintainer
270+
* 50: Owner
271+
272+
This will not interfere with existing group members, so you can adjust user permissions in Gitlab later on.
273+
274+
Default: 30
275+
261276
##### groupNamesOfAdministrators *(array|null)*
262277

263278
Specify a list of group names of which members should be granted administrator access.

config.yml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ gitlab:
3636

3737
createEmptyGroups: false
3838
deleteExtraGroups: false
39+
newMemberAccessLevel: 30
3940

4041
groupNamesOfAdministrators: ~
4142
groupNamesOfExternal: ~

0 commit comments

Comments
 (0)