Class: Decidim::Debates::Abilities::Admin::AdminAbility

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

Overview

Defines the abilities related to debates for an admin user. Intended to be used with ‘cancancan`.

Instance Method Summary collapse

Instance Method Details

#define_abilitiesObject



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

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