Class: Redmine::AccessControl::Mapper
- Inherits:
-
Object
- Object
- Redmine::AccessControl::Mapper
- Defined in:
- lib/redmine/access_control.rb
Instance Method Summary collapse
-
#initialize ⇒ Mapper
constructor
A new instance of Mapper.
- #mapped_permissions ⇒ Object
- #permission(name, hash, options = {}) ⇒ Object
- #project_module(name, options = {}) {|_self| ... } ⇒ Object
Constructor Details
#initialize ⇒ Mapper
Returns a new instance of Mapper
79 80 81 |
# File 'lib/redmine/access_control.rb', line 79 def initialize @project_module = nil end |
Instance Method Details
#mapped_permissions ⇒ Object
95 96 97 |
# File 'lib/redmine/access_control.rb', line 95 def @permissions end |
#permission(name, hash, options = {}) ⇒ Object
83 84 85 86 87 |
# File 'lib/redmine/access_control.rb', line 83 def (name, hash, ={}) @permissions ||= [] .merge!(:project_module => @project_module) @permissions << Permission.new(name, hash, ) end |
#project_module(name, options = {}) {|_self| ... } ⇒ Object
89 90 91 92 93 |
# File 'lib/redmine/access_control.rb', line 89 def project_module(name, ={}) @project_module = name yield self @project_module = nil end |