Class: Decidim::Assemblies::Abilities::EveryoneAbility

Inherits:
Decidim::Abilities::EveryoneAbility
  • Object
show all
Defined in:
app/models/decidim/assemblies/abilities/everyone_ability.rb

Overview

Defines the base abilities related to assemblies 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



9
10
11
12
13
# File 'app/models/decidim/assemblies/abilities/everyone_ability.rb', line 9

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

  can :read, Assembly, &:published?
end