Class: Decidim::Debates::Abilities::Admin::ParticipatoryProcessAdminAbility

Inherits:
Abilities::ParticipatoryProcessAdminAbility
  • Object
show all
Defined in:
app/models/decidim/debates/abilities/admin/participatory_process_admin_ability.rb

Overview

Defines the abilities related to debates for a logged in process admin user. Intended to be used with ‘cancancan`.

Instance Method Summary collapse

Instance Method Details

#define_participatory_process_abilitiesObject



10
11
12
13
14
15
16
17
18
# File 'app/models/decidim/debates/abilities/admin/participatory_process_admin_ability.rb', line 10

def define_participatory_process_abilities
  super

  can :manage, Debate do |debate|
    debate.author.blank?
  end
  can :unreport, Debate
  can :hide, Debate
end