Class: LighthousePolicy

Inherits:
Struct
  • Object
show all
Defined in:
app/policies/lighthouse_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lighthouseObject

Returns the value of attribute lighthouse

Returns:

  • (Object)

    the current value of lighthouse



3
4
5
# File 'app/policies/lighthouse_policy.rb', line 3

def lighthouse
  @lighthouse
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



3
4
5
# File 'app/policies/lighthouse_policy.rb', line 3

def user
  @user
end

Instance Method Details

#access?Boolean Also known as: rating_info_access?

Returns:

  • (Boolean)


4
5
6
# File 'app/policies/lighthouse_policy.rb', line 4

def access?
  user.icn.present? && user.participant_id.present?
end

#access_disability_compensations?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'app/policies/lighthouse_policy.rb', line 8

def access_disability_compensations?
  user.loa3? &&
    allowed_providers.include?(user.identity.[:service_name]) &&
    user.icn.present? && user.participant_id.present?
end

#access_update?Boolean Also known as: mobile_access?

Returns:

  • (Boolean)


14
15
16
17
18
# File 'app/policies/lighthouse_policy.rb', line 14

def access_update?
  user.loa3? &&
    allowed_providers.include?(user.identity.[:service_name]) &&
    user.icn.present? && user.participant_id.present?
end