Class: Ch33DdPolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ch33_ddObject

Returns the value of attribute ch33_dd

Returns:

  • (Object)

    the current value of ch33_dd



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

def ch33_dd
  @ch33_dd
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



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

def user
  @user
end

Instance Method Details

#access?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/policies/ch33_dd_policy.rb', line 11

def access?
  user.loa3? && allowed_providers.include?(user.identity.[:service_name])
end

#allowed_providersObject



4
5
6
7
8
9
# File 'app/policies/ch33_dd_policy.rb', line 4

def allowed_providers
  %w[
    idme
    logingov
  ].freeze
end