Sha256: ed63f638f908d07faec18d312d30a7f277c82957841d7399db99b910e1eaa590

Contents?: true

Size: 576 Bytes

Versions: 34

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    module Abilities
      # Defines the abilities related to proposals 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], Proposal do |proposal|
            can_manage_process?(proposal.feature.participatory_space)
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
decidim-proposals-0.6.6 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.6 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.5 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.5 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.4 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.4 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.3 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.3 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.2 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.2 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.1 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.1 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-proposals-0.6.0 app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb
decidim-0.6.0 decidim-proposals/app/models/decidim/proposals/abilities/participatory_process_moderator_ability.rb