Sha256: 0346598f7bd4be95e7329d14dd7b7e40ba471472d6fc33d2365058fd1d551ab7

Contents?: true

Size: 558 Bytes

Versions: 4

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true
module Decidim
  module Admin
    module Abilities
      # Defines the abilities for a user in the admin section. Intended to be
      # used with `cancancan`. Extended by both the base `Decidim::Ability`
      # class and other engine-only abilities, like the
      # `ParticipatoryProcessAdmin` ability class.
      class Base
        include CanCan::Ability

        def initialize(user)
          merge ::Decidim::Ability.new(user)
          merge ParticipatoryProcessAdmin.new(user)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
decidim-admin-0.0.2 app/models/decidim/admin/abilities/base.rb
decidim-0.0.2 decidim-admin/app/models/decidim/admin/abilities/base.rb
decidim-admin-0.0.1 app/models/decidim/admin/abilities/base.rb
decidim-0.0.1 decidim-admin/app/models/decidim/admin/abilities/base.rb