Sha256: 921f91f04b1ab965b0e6e3db78e10da27d19110f6e88ba42bf62b27e42e41c4b

Contents?: true

Size: 600 Bytes

Versions: 41

Compression:

Stored size: 600 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 NeedsAuthorization
      include ImpersonateUsers

      # Overwrites `cancancan`'s method to point to the correct ability class,
      # since the gem expects the ability class to be in the root namespace.
      def current_ability_klass
        Decidim::Abilities::BaseAbility
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
decidim-0.6.8 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.7 app/controllers/decidim/api/application_controller.rb
decidim-0.6.7 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.6 app/controllers/decidim/api/application_controller.rb
decidim-0.6.6 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.5 app/controllers/decidim/api/application_controller.rb
decidim-0.6.5 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.4 app/controllers/decidim/api/application_controller.rb
decidim-0.6.4 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.3 app/controllers/decidim/api/application_controller.rb
decidim-0.6.3 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.2 app/controllers/decidim/api/application_controller.rb
decidim-0.6.2 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.1 app/controllers/decidim/api/application_controller.rb
decidim-0.6.1 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.6.0 app/controllers/decidim/api/application_controller.rb
decidim-0.6.0 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.5.1 app/controllers/decidim/api/application_controller.rb
decidim-0.5.1 decidim-api/app/controllers/decidim/api/application_controller.rb
decidim-api-0.5.0 app/controllers/decidim/api/application_controller.rb