Class: RoadForest::Authorization::AuthorizationPolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/authorization.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#grants_holderObject

Returns the value of attribute grants_holder.



218
219
220
# File 'lib/roadforest/authorization.rb', line 218

def grants_holder
  @grants_holder
end

Instance Method Details

#build_grants(&block) ⇒ Object



220
221
222
# File 'lib/roadforest/authorization.rb', line 220

def build_grants(&block)
  grants_holder.build_grants(&block)
end

#grants_for(entity) ⇒ Object



224
225
226
227
228
# File 'lib/roadforest/authorization.rb', line 224

def grants_for(entity)
  build_grants do |builder|
    builder.add(:admin)
  end
end