Sha256: d25a1d3645db8ddab1ccdcfc3829839120f9121bc0f8bb3b466ce2833337114c

Contents?: true

Size: 662 Bytes

Versions: 7

Compression:

Stored size: 662 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Api
    # Base controller for `decidim-api`. All other controllers inherit from this.
    class ApplicationController < ::DecidimController
      skip_before_action :verify_authenticity_token
      include NeedsOrganization
      include NeedsPermission
      include ImpersonateUsers

      register_permissions(::Decidim::Api::ApplicationController,
                           ::Decidim::Permissions)

      def permission_class_chain
        ::Decidim.permissions_registry.chain_for(::Decidim::Api::ApplicationController)
      end

      def permission_scope
        :public
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-api-0.21.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.20.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.20.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.19.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.18.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.19.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.18.0 app/controllers/decidim/api/application_controller.rb