Skip to content
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

Remove all users from group when members list is empty. #49745

Merged
merged 4 commits into from Oct 3, 2018

Conversation

Projects
None yet
5 participants
@MTecknology
Copy link
Contributor

commented Sep 22, 2018

What does this PR do?

This patch allows an empty list to be supplied to the members argument for the group.present state.

What issues does this PR fix or reference?

Previous Behavior

An empty list would be interpreted as a False-like value and cause no-op during group members check.

New Behavior

An empty members list will invoke the remove_user behavior for all list members.

Tests written?

No

Commits signed with GPG?

Yes

@MTecknology MTecknology changed the title Remove all users from group when members list is empty. (Fixes #49744) Remove all users from group when members list is empty. Sep 22, 2018

@hemebond
Copy link
Contributor

left a comment

Tested changes in 2017.7.7. Users correctly removed when members list is empty.

Show resolved Hide resolved salt/states/group.py Outdated
Show resolved Hide resolved salt/states/group.py Outdated

MTecknology and others added some commits Sep 30, 2018

@rallytime rallytime requested a review from cachedout Oct 1, 2018

@rallytime rallytime merged commit 85478cd into saltstack:2018.3 Oct 3, 2018

7 of 10 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py2-windows-2016 The py2-windows-2016 job has failed
Details
jenkins/pr/py3-windows-2016 The py3-windows-2016 job has failed
Details
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details

@MTecknology MTecknology deleted the MTecknology:fix-49744 branch Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.