Class: GlobalRole
- Inherits:
-
Role
- Object
- Role
- GlobalRole
- Defined in:
- app/models/global_role.rb
Overview
– copyright OpenProject is a project management system.
Copyright © 2010-2013 the OpenProject Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.
See doc/COPYRIGHT.rdoc for more details. ++
Class Method Summary collapse
Instance Method Summary collapse
- #assignable=(value) ⇒ Object
- #assignable_to?(user) ⇒ Boolean
-
#initialize(*args) ⇒ GlobalRole
constructor
A new instance of GlobalRole.
- #permissions=(perms) ⇒ Object
- #setable_permissions ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ GlobalRole
Returns a new instance of GlobalRole.
16 17 18 19 |
# File 'app/models/global_role.rb', line 16 def initialize(*args) super self.assignable = false end |
Class Method Details
.setable_permissions ⇒ Object
30 31 32 |
# File 'app/models/global_role.rb', line 30 def self. Redmine::AccessControl. end |
Instance Method Details
#assignable=(value) ⇒ Object
38 39 40 41 |
# File 'app/models/global_role.rb', line 38 def assignable=(value) raise ArgumentError if value == true super end |
#assignable_to?(user) ⇒ Boolean
43 44 45 |
# File 'app/models/global_role.rb', line 43 def assignable_to?(user) true end |
#permissions=(perms) ⇒ Object
21 22 23 24 |
# File 'app/models/global_role.rb', line 21 def (perms) perms = perms.collect {|p| p.to_sym unless p.blank? }.compact.uniq if perms write_attribute(:permissions, perms) end |
#setable_permissions ⇒ Object
26 27 28 |
# File 'app/models/global_role.rb', line 26 def Redmine::AccessControl. end |
#to_s ⇒ Object
34 35 36 |
# File 'app/models/global_role.rb', line 34 def to_s name end |