Class: Foreman::AccessControl::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/foreman/access_control.rb

Instance Method Summary collapse

Constructor Details

#initializeMapper


67
68
69
# File 'lib/foreman/access_control.rb', line 67

def initialize
  @security_block = nil
end

Instance Method Details

#mapped_permissionsObject


83
84
85
# File 'lib/foreman/access_control.rb', line 83

def mapped_permissions
  @permissions
end

#permission(name, hash, options = {}) ⇒ Object


71
72
73
74
75
# File 'lib/foreman/access_control.rb', line 71

def permission(name, hash, options={})
  @permissions ||= []
  options.merge!(:security_block => @security_block)
  @permissions << Permission.new(name, hash, options)
end

#security_block(name, options = {}) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


77
78
79
80
81
# File 'lib/foreman/access_control.rb', line 77

def security_block(name, options={})
  @security_block = name
  yield self
  @security_block = nil
end