Class: Decidim::ParticipatoryProcesses::Abilities::EveryoneAbility

Inherits:
Abilities::EveryoneAbility show all
Defined in:
decidim-participatory_processes/app/models/decidim/participatory_processes/abilities/everyone_ability.rb

Overview

Defines the base abilities related to participatory processes for any user. Guest users will use these too. Intended to be used with ‘cancancan`.

Instance Method Summary collapse

Constructor Details

#initialize(user, context) ⇒ EveryoneAbility

Returns a new instance of EveryoneAbility.



10
11
12
13
14
15
# File 'decidim-participatory_processes/app/models/decidim/participatory_processes/abilities/everyone_ability.rb', line 10

def initialize(user, context)
  super(user, context)

  can :read, ParticipatoryProcessGroup
  can :read, ParticipatoryProcess, &:published?
end