Sha256: d864a1b6a4102516fb25efb67e36bf48917c9249c85092e977f0ff20a03e2943

Contents?: true

Size: 305 Bytes

Versions: 31

Compression:

Stored size: 305 Bytes

Contents

module Ddr::Batch
  class BatchAbilityDefinitions < Ddr::Auth::AbilityDefinitions

    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

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
ddr-batch-1.2.0 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc6 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc5 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc4 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc3 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc2 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.2.0.rc1 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.1.0 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.1.0.rc2 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-1.1.0.rc1 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.1 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.rc3 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.rc2 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.rc1 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.6 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.5 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.4 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.3 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.2 app/models/ddr/batch/batch_ability_definitions.rb
ddr-batch-2.0.0.beta.1 app/models/ddr/batch/batch_ability_definitions.rb