Sha256: 79605b7d1e770b1396f55a283a974aa64332b4d518d0a0db58a0c1e947fdc297

Contents?: true

Size: 1.6 KB

Versions: 19

Compression:

Stored size: 1.6 KB

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    # The main application controller that inherits from Rails.
    class ApplicationController < ::DecidimController
      include NeedsOrganization
      include NeedsPermission
      include NeedsSnippets
      include FormFactory
      include LocaleSwitcher
      include UseOrganizationTimeZone
      include PayloadInfo
      include HttpCachingDisabler

      helper Decidim::Admin::ApplicationHelper
      helper Decidim::Admin::AttributesDisplayHelper
      helper Decidim::Admin::SettingsHelper
      helper Decidim::Admin::IconLinkHelper
      helper Decidim::Admin::MenuHelper
      helper Decidim::Admin::ScopesHelper
      helper Decidim::Admin::Paginable::PerPageHelper
      helper Decidim::DecidimFormHelper
      helper Decidim::ReplaceButtonsHelper
      helper Decidim::ScopesHelper
      helper Decidim::TranslationsHelper
      helper Decidim::LanguageChooserHelper
      helper Decidim::ComponentPathHelper
      helper Decidim::SanitizeHelper

      default_form_builder Decidim::Admin::FormBuilder

      protect_from_forgery with: :exception, prepend: true

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

      def user_has_no_permission_path
        decidim_admin.root_path
      end

      def user_not_authorized_path
        decidim_admin.root_path
      end

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

      def permission_scope
        :admin
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decidim-admin-0.25.0 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.25.0.rc4 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.25.0.rc3 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.25.0.rc2 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.25.0.rc1 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.3 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.6 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.2 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.5 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.1 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.0 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.0.rc2 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.4 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.24.0.rc1 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.3 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.2 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.1 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.1.rc1 app/controllers/decidim/admin/application_controller.rb
decidim-admin-0.23.0 app/controllers/decidim/admin/application_controller.rb