Initial Chef repository
This commit is contained in:
14
cookbooks/rbac/resources/auth.rb
Normal file
14
cookbooks/rbac/resources/auth.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
default_action :add
|
||||
|
||||
actions :add
|
||||
|
||||
attribute :user, :kind_of => String, :required => true
|
||||
attribute :auth, :kind_of => String, :required => true
|
||||
|
||||
# private, internal attributes
|
||||
attr_accessor :definition, :user_definition
|
||||
|
||||
def add_auth(user, auth)
|
||||
RBAC.add_authorization(user, auth)
|
||||
end
|
||||
6
cookbooks/rbac/resources/default.rb
Normal file
6
cookbooks/rbac/resources/default.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
default_action :create
|
||||
|
||||
actions :create
|
||||
|
||||
attribute :name, :kind_of => String, :name_attribute => true, :required => true
|
||||
6
cookbooks/rbac/resources/user.rb
Normal file
6
cookbooks/rbac/resources/user.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
default_action :nothing
|
||||
|
||||
actions :apply
|
||||
|
||||
attribute :user, :kind_of => String, :name_attribute => true, :required => true
|
||||
Reference in New Issue
Block a user