Sha256: c9dcc312e62ec08842211005e1dc09b1be59443764d919224e8b53f50ab0755f

Contents?: true

Size: 389 Bytes

Versions: 26

Compression:

Stored size: 389 Bytes

Contents

def user_is_in_role?(username)
  return false if !@node[:role]
  Chef::Log.info role[:groups].inspect
  role[:groups].include? get_user(username)[:group]
end

def role
  @node[:roles][@node[:role]]
end

# method name 'user' conflicts with chef, so we use 'get_user'
def get_user(username)
  Chef::Log.info username
  user = @node[:users][username]
  Chef::Log.info user.inspect
  user
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
solokit-0.1.17 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.16 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.15 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.14 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.13 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.12 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.11 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.10 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.9 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.8 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.7 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.6 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.5 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.4 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.3 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.2 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.1 cookbooks/upstream/users/libraries/roles.rb
solokit-0.1.0 cookbooks/upstream/users/libraries/roles.rb
solokit-0.0.9 cookbooks/upstream/users/libraries/roles.rb
solokit-0.0.8 cookbooks/upstream/users/libraries/roles.rb