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(token:, user:, params:, resource:, **other) ⇒ Query

Returns a new instance of Query.



10
11
12
13
14
15
16
17
18
19
# File 'lib/drillbit/authorizers/query.rb', line 10

def initialize(token:, user:, params:, resource:, **other)
  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

#paramsObject

Returns the value of attribute params.



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

def params
  @params
end

#resourceObject

Returns the value of attribute resource.



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

def resource
  @resource
end

#tokenObject

Returns the value of attribute token.



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

def token
  @token
end

#userObject

Returns the value of attribute user.



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

def user
  @user
end

Instance Method Details

#able_to_create?Boolean

Returns:

  • (Boolean)


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

def able_to_create?
  false
end

#able_to_destroy?Boolean

Returns:

  • (Boolean)


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

def able_to_destroy?
  false
end

#able_to_index?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/drillbit/authorizers/query.rb', line 21

def able_to_index?
  false
end

#able_to_show?Boolean

Returns:

  • (Boolean)


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

def able_to_show?
  false
end

#able_to_update?Boolean

Returns:

  • (Boolean)


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

def able_to_update?
  false
end