mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Fix default group checking in user.present, Fixes #4903
This commit is contained in:
parent
e190f335f8
commit
6695505e4d
@ -70,12 +70,16 @@ def _changes(name,
|
||||
lusr['groups'].remove(
|
||||
__salt__['file.gid_to_group'](gid or lusr['gid'])
|
||||
)
|
||||
if name in lusr['groups']:
|
||||
lusr['groups'].remove(name)
|
||||
# remove default group from wanted_groups, as this requirement is
|
||||
# already met
|
||||
if gid and __salt__['file.gid_to_group'](gid or lusr['gid']) in \
|
||||
wanted_groups:
|
||||
wanted_groups.remove(
|
||||
__salt__['file.gid_to_group'](gid or lusr['gid']))
|
||||
if name in wanted_groups:
|
||||
wanted_groups.remove(name)
|
||||
if groups is not None or wanted_groups:
|
||||
if remove_groups:
|
||||
if lusr['groups'] != wanted_groups:
|
||||
|
Loading…
Reference in New Issue
Block a user