Sha256: 11008f1a6083ab5f3bdff7ddbadbc3417160aac2834daee264f10432d9440799

Contents?: true

Size: 572 Bytes

Versions: 34

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

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

          can [:manage, :unreport, :hide], Comment do |comment|
            can_manage_process?(comment.feature.participatory_space)
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
decidim-comments-0.10.1 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.10.0 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.9.3 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.9.2 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.9.1 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.9.0 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.8.4 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.8.3 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.8.2 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.8.1 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.8.0 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.7.4 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.7.3 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.7.2 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.7.1 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.7.0 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.6.8 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-0.6.8 decidim-comments/app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-comments-0.6.7 app/models/decidim/comments/abilities/participatory_process_admin_ability.rb
decidim-0.6.7 decidim-comments/app/models/decidim/comments/abilities/participatory_process_admin_ability.rb