Class: LegacyMHVMessagingPolicy
- Inherits:
-
Struct
- Object
- Struct
- LegacyMHVMessagingPolicy
- Defined in:
- app/policies/legacy_mhv_messaging_policy.rb
Overview
TODO: migrate all services off this policy and onto the new one.
Constant Summary collapse
- SM_ACCOUNT_TYPES =
%w[Premium].freeze
Instance Attribute Summary collapse
-
#legacy_mhv_messaging ⇒ Object
Returns the value of attribute legacy_mhv_messaging.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#legacy_mhv_messaging ⇒ Object
Returns the value of attribute legacy_mhv_messaging
4 5 6 |
# File 'app/policies/legacy_mhv_messaging_policy.rb', line 4 def legacy_mhv_messaging @legacy_mhv_messaging end |
#user ⇒ Object
Returns the value of attribute user
4 5 6 |
# File 'app/policies/legacy_mhv_messaging_policy.rb', line 4 def user @user end |
Instance Method Details
#access? ⇒ Boolean
6 7 8 |
# File 'app/policies/legacy_mhv_messaging_policy.rb', line 6 def access? SM_ACCOUNT_TYPES.include?(user.mhv_account_type) && user.va_patient? end |