Sha256: efcc8335d48818515b55cb1c7f79ee2a9d24ea925a2f9fb28ae5027988aab94c

Contents?: true

Size: 781 Bytes

Versions: 39

Compression:

Stored size: 781 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 UseOrganizationTimeZone
      include NeedsPermission
      include ImpersonateUsers
      include ForceAuthentication
      include DisableRedirectionToExternalHost

      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

39 entries across 39 versions & 1 rubygems

Version Path
decidim-api-0.26.8 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.4 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.3 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.7 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.5 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.4 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.3 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.0.rc2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.27.0.rc1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.0 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.0.rc2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.26.0.rc1 app/controllers/decidim/api/application_controller.rb
decidim-api-0.25.2 app/controllers/decidim/api/application_controller.rb
decidim-api-0.25.1 app/controllers/decidim/api/application_controller.rb