Class: Decidim::Surveys::Abilities::ParticipatoryProcessAdminAbility

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#define_participatory_process_abilitiesObject



9
10
11
12
13
14
15
# File 'app/models/decidim/surveys/abilities/participatory_process_admin_ability.rb', line 9

def define_participatory_process_abilities
  super

  can :manage, Survey do |survey|
    can_manage_process?(survey.feature.participatory_process)
  end
end