Class: Ch33DdPolicy
- Inherits:
-
Struct
- Object
- Struct
- Ch33DdPolicy
- Defined in:
- app/policies/ch33_dd_policy.rb
Instance Attribute Summary collapse
-
#ch33_dd ⇒ Object
Returns the value of attribute ch33_dd.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#ch33_dd ⇒ Object
Returns the value of attribute ch33_dd
3 4 5 |
# File 'app/policies/ch33_dd_policy.rb', line 3 def ch33_dd @ch33_dd end |
#user ⇒ Object
Returns the value of attribute user
3 4 5 |
# File 'app/policies/ch33_dd_policy.rb', line 3 def user @user end |
Instance Method Details
#access? ⇒ Boolean
11 12 13 |
# File 'app/policies/ch33_dd_policy.rb', line 11 def access? user.loa3? && allowed_providers.include?(user.identity.sign_in[:service_name]) end |
#allowed_providers ⇒ Object
4 5 6 7 8 9 |
# File 'app/policies/ch33_dd_policy.rb', line 4 def allowed_providers %w[ idme logingov ].freeze end |