Sha256: a249bebf7d21cdab1a885cab18929997a51dde2504c5d60924a3dadc64068a7e
Contents?: true
Size: 616 Bytes
Versions: 4
Compression:
Stored size: 616 Bytes
Contents
# frozen_string_literal: true module Decidim module Abilities # Defines the base abilities for any user. Guest users will use these too. # Intended to be used with `cancancan`. class EveryoneAbility include CanCan::Ability def initialize(user, _context) can :read, ParticipatoryProcessGroup can :read, ParticipatoryProcess, &:published? can :read, :public_pages can :manage, :locales can :read, Feature, &:published? can :search, Scope can :manage, User do |other| other == user end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems