gitlab_user: Fix ssh key add and group membership add when there's other changes (#63621)
* Fixed syntax in sshkey/group add * Added changelog * pep8 fix
This commit is contained in:
parent
7dd46f7b2d
commit
b4bb3dee9a
2 changed files with 6 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- "gitlab_user - Fix adding ssh key to new/changed user and adding group membership for new/changed user"
|
|
@ -233,13 +233,15 @@ class GitLabUser(object):
|
|||
|
||||
# Assign ssh keys
|
||||
if options['sshkey_name'] and options['sshkey_file']:
|
||||
changed = changed or self.addSshKeyToUser(user, {
|
||||
key_changed = self.addSshKeyToUser(user, {
|
||||
'name': options['sshkey_name'],
|
||||
'file': options['sshkey_file']})
|
||||
changed = changed or key_changed
|
||||
|
||||
# Assign group
|
||||
if options['group_path']:
|
||||
changed = changed or self.assignUserToGroup(user, options['group_path'], options['access_level'])
|
||||
group_changed = self.assignUserToGroup(user, options['group_path'], options['access_level'])
|
||||
changed = changed or group_changed
|
||||
|
||||
self.userObject = user
|
||||
if changed:
|
||||
|
|
Loading…
Reference in a new issue