Sha256: 0d3e1496918912eabdb3402bf13da212128c1e7d7b6f6e4b9514320a67d76447

Contents?: true

Size: 614 Bytes

Versions: 6

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Debates
    module Abilities
      module Admin
        # Defines the abilities related to Debate for a logged in process admin user.
        # Intended to be used with `cancancan`.
        class ParticipatoryProcessModeratorAbility < Decidim::Abilities::ParticipatoryProcessModeratorAbility
          def define_participatory_process_abilities
            super

            can [:unreport, :hide], Debate do |debate|
              can_manage_process?(debate.feature.participatory_space)
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-debates-0.10.1 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb
decidim-debates-0.10.0 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb
decidim-debates-0.9.3 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb
decidim-debates-0.9.2 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb
decidim-debates-0.9.1 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb
decidim-debates-0.9.0 app/models/decidim/debates/abilities/admin/participatory_process_moderator_ability.rb