Merge pull request #4977 from basepi/groups4903

Fix default group checking in user.present, Fixes #4903
This commit is contained in:
Thomas S Hatch 2013-05-10 16:06:22 -07:00
commit 506f8e5b8d

View File

@ -70,6 +70,8 @@ def _changes(name,
lusr['groups'].remove(
__salt__['file.gid_to_group'](gid or lusr['gid'])
)
if name in lusr['groups'] and name not in wanted_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 \