Class: Group
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Group
- Defined in:
- app/models/group.rb
Overview
A group represents a collection of permissions. Each User can be assigned to one or more groups, and the sum of their permissions from all groups combined represents what they can do.
Constant Summary collapse
- GUEST_CODE =
"guest"
Class Method Summary collapse
-
.guest ⇒ Object
Finds the guest group, which is a special group that represents public non-logged in users.
Instance Method Summary collapse
Class Method Details
.guest ⇒ Object
Finds the guest group, which is a special group that represents public non-logged in users.
37 38 39 |
# File 'app/models/group.rb', line 37 def self.guest with_code(GUEST_CODE).first end |
Instance Method Details
#cms_access? ⇒ Boolean
32 33 34 |
# File 'app/models/group.rb', line 32 def cms_access? group_type && group_type.cms_access? end |
#guest? ⇒ Boolean
28 29 30 |
# File 'app/models/group.rb', line 28 def guest? group_type && group_type.guest? end |