Class: Redmine::AccessControl::Mapper

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

Instance Method Summary collapse

Constructor Details

#initializeMapper

Returns a new instance of Mapper

Since:

  • 0.6.0



79
80
81
# File 'lib/redmine/access_control.rb', line 79

def initialize
  @project_module = nil
end

Instance Method Details

#mapped_permissionsObject

Since:

  • 0.6.0



95
96
97
# File 'lib/redmine/access_control.rb', line 95

def mapped_permissions
  @permissions
end

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

Since:

  • 0.6.0



83
84
85
86
87
# File 'lib/redmine/access_control.rb', line 83

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

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

Yields:

  • (_self)

Yield Parameters:

Since:

  • 0.6.0



89
90
91
92
93
# File 'lib/redmine/access_control.rb', line 89

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