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

Inherits:
Decidim::Abilities::EveryoneAbility show all
Defined in:
decidim-assemblies/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

Returns a new instance of EveryoneAbility.



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

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

  can :read, Assembly, &:published?
end