Class: Drillbit::Authorizers::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/drillbit/authorizers/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action:, token:, user:, issuer:, params:, resource:, **other) ⇒ Query

rubocop:disable Metrics/ParameterLists



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/drillbit/authorizers/query.rb', line 13

def initialize(action:, token:, user:, issuer:, params:, resource:, **other)
  self.action   = action
  self.token    = token
  self.user     = user
  self.params   = params
  self.resource = resource

  other.each do |name, value|
    public_send("#{name}=", value)
  end
end

Instance Attribute Details

#actionObject

Returns the value of attribute action.



6
7
8
# File 'lib/drillbit/authorizers/query.rb', line 6

def action
  @action
end

#paramsObject

Returns the value of attribute params.



6
7
8
# File 'lib/drillbit/authorizers/query.rb', line 6

def params
  @params
end

#resourceObject

Returns the value of attribute resource.



6
7
8
# File 'lib/drillbit/authorizers/query.rb', line 6

def resource
  @resource
end

#tokenObject

Returns the value of attribute token.



6
7
8
# File 'lib/drillbit/authorizers/query.rb', line 6

def token
  @token
end

#userObject

Returns the value of attribute user.



6
7
8
# File 'lib/drillbit/authorizers/query.rb', line 6

def user
  @user
end

Instance Method Details

#able_to_create?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/drillbit/authorizers/query.rb', line 34

def able_to_create?
  false
end

#able_to_destroy?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/drillbit/authorizers/query.rb', line 42

def able_to_destroy?
  false
end

#able_to_index?Boolean

rubocop:enable Metrics/ParameterLists

Returns:

  • (Boolean)


26
27
28
# File 'lib/drillbit/authorizers/query.rb', line 26

def able_to_index?
  false
end

#able_to_show?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/drillbit/authorizers/query.rb', line 30

def able_to_show?
  false
end

#able_to_update?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/drillbit/authorizers/query.rb', line 38

def able_to_update?
  false
end