Module: CanTango::PermitEngine::RoleMatcher
- Included in:
- CanTango::Permits::Permit
- Defined in:
- lib/cantango/permit_engine/role_matcher.rb
Instance Method Summary collapse
Instance Method Details
#role_group_match?(user, group_name = nil) ⇒ Boolean
8 9 10 |
# File 'lib/cantango/permit_engine/role_matcher.rb', line 8 def role_group_match? user, group_name = nil user_account.is_in_group? permit_name(self.class) end |
#role_match?(user_account) ⇒ Boolean
4 5 6 |
# File 'lib/cantango/permit_engine/role_matcher.rb', line 4 def role_match? user_account user_account.has_role? permit_name(self.class) end |