Class: PPIUPolicy
- Inherits:
-
Struct
- Object
- Struct
- PPIUPolicy
- Defined in:
- app/policies/ppiu_policy.rb
Instance Attribute Summary collapse
-
#ppiu ⇒ Object
Returns the value of attribute ppiu.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#ppiu ⇒ Object
Returns the value of attribute ppiu
5 6 7 |
# File 'app/policies/ppiu_policy.rb', line 5 def ppiu @ppiu end |
#user ⇒ Object
Returns the value of attribute user
5 6 7 |
# File 'app/policies/ppiu_policy.rb', line 5 def user @user end |
Instance Method Details
#access? ⇒ Boolean
15 16 17 18 |
# File 'app/policies/ppiu_policy.rb', line 15 def access? user.loa3? && allowed_providers.include?(user.identity.sign_in[:service_name]) end |
#access_update? ⇒ Boolean
20 21 22 23 24 |
# File 'app/policies/ppiu_policy.rb', line 20 def access_update? res = EVSS::PPIU::Service.new(user).get_payment_information res.responses.first.control_information. end |
#allowed_providers ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/policies/ppiu_policy.rb', line 6 def allowed_providers %w[ idme oauth_IDME logingov oauth_LOGINGOV ].freeze end |