summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrew Shafer <andrew@reductivelabs.com>2008-12-01 03:08:38 -0700
committerAndrew Shafer <andrew@reductivelabs.com>2008-12-01 03:08:38 -0700
commitc005dcf2748326ea0f177d7da806a0cd4241c31d (patch)
tree2ad4d0429c4f7990400b05819b051eba38ffab5a /lib
parent3eff2254e69cf66b6e9f94631900fba26172c850 (diff)
downloadpuppet-c005dcf2748326ea0f177d7da806a0cd4241c31d.tar.gz
puppet-c005dcf2748326ea0f177d7da806a0cd4241c31d.tar.xz
puppet-c005dcf2748326ea0f177d7da806a0cd4241c31d.zip
Ticket 1780 - Solaris RBAC roles should be autorequired
Autorequire the roles that belong to the user so they will be created first
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/type/user.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/type/user.rb b/lib/puppet/type/user.rb
index c6f1eccf6..9e32c89ae 100755
--- a/lib/puppet/type/user.rb
+++ b/lib/puppet/type/user.rb
@@ -279,6 +279,17 @@ module Puppet
end
end
+ #autorequire the roles that the user has
+ autorequire(:user) do
+ reqs = []
+
+ if roles_property = @parameters[:roles] and roles = roles_property.should
+ reqs += roles.split(',')
+ end
+
+ reqs
+ end
+
newparam(:role_membership) do
desc "Whether specified roles should be treated as the only roles
of which the user is a member or whether they should merely