summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcmluciano <cmlucian@us.ibm.com>2015-03-20 16:19:04 -0400
committercmluciano <cmlucian@us.ibm.com>2015-04-30 14:08:51 -0400
commit841b973d59382192058d05f7a5d46c8e1ea1a875 (patch)
treefaaf270c13eca632f70c70391715031138c041bb /lib
parent77e32218bcec1a6b0934d826919b8e1ba0b6dbc0 (diff)
downloadchef-841b973d59382192058d05f7a5d46c8e1ea1a875.tar.gz
Fix condition of removing a group before user error.
This should fix [issue 1586](https://github.com/chef/chef/issues/1586). The issue is that if a group is removed before the user, the GID remained and causes an error. This should remove the check for remove actions.
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/provider/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user.rb b/lib/chef/provider/user.rb
index f6ac72448e..de261105b3 100644
--- a/lib/chef/provider/user.rb
+++ b/lib/chef/provider/user.rb
@@ -90,7 +90,7 @@ class Chef
end
def define_resource_requirements
- requirements.assert(:all_actions) do |a|
+ requirements.assert(:create, :modify, :manage, :lock, :unlock) do |a|
a.assertion { @group_name_resolved }
a.failure_message Chef::Exceptions::User, "Couldn't lookup integer GID for group name #{@new_resource.gid}"
a.whyrun "group name #{@new_resource.gid} does not exist. This will cause group assignment to fail. Assuming this group will have been created previously."