Class: VAProfilePolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



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

def user
  @user
end

#va_profileObject

Returns the value of attribute va_profile

Returns:

  • (Object)

    the current value of va_profile



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

def va_profile
  @va_profile
end

Instance Method Details

#access?Boolean

Returns:

  • (Boolean)


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

def access?
  user.edipi.present?
end

#access_to_v2?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'app/policies/va_profile_policy.rb', line 8

def access_to_v2?
  if Flipper.enabled?(:va_v3_contact_information_service, user)
    user.icn.present?
  else
    user.vet360_id.present?
  end
end