Class: Ddr::Batch::BatchAbilityDefinitions

Inherits:
Auth::AbilityDefinitions
  • Object
show all
Defined in:
app/models/ddr/batch/batch_ability_definitions.rb

Instance Method Summary collapse

Instance Method Details

#callObject


4
5
6
7
8
9
10
11
# File 'app/models/ddr/batch/batch_ability_definitions.rb', line 4

def call
  if authenticated?
    can :manage, Batch, user_id: user.id
  end
  can :manage, Ddr::Batch::BatchObject do |batch_object|
    can? :manage, batch_object.batch
  end
end