Sha256: 2eb26d40539f42898f753fc8f867ed3cf81d41674cd3e50d0f835bce548474b0

Contents?: true

Size: 469 Bytes

Versions: 85

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Accountability
    class Permissions < Decidim::DefaultPermissions
      def permissions
        return permission_action unless user

        # Delegate the admin permission checks to the admin permissions class
        return Decidim::Accountability::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin

        permission_action
      end
    end
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
decidim-accountability-0.29.1 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.4 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.27.9 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.29.0 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.3 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.27.8 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.29.0.rc4 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.29.0.rc3 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.29.0.rc2 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.29.0.rc1 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.2 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.27.7 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.1 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.27.6 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.26.10 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.26.9 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.0 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.27.5 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.0.rc5 app/permissions/decidim/accountability/permissions.rb
decidim-accountability-0.28.0.rc4 app/permissions/decidim/accountability/permissions.rb