Class: Decidim::Assemblies::Abilities::EveryoneAbility
- Inherits:
-
Decidim::Abilities::EveryoneAbility
- Object
- Decidim::Abilities::EveryoneAbility
- Decidim::Assemblies::Abilities::EveryoneAbility
- 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
-
#initialize(user, context) ⇒ EveryoneAbility
constructor
A new instance of EveryoneAbility.
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 |