Sha256: 0ed6f927ccc37fea901af673f224a853907c15094a1f36c9f87ee6545cad4a6c

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    # The main admin application controller for conferences
    class ApplicationController < Decidim::ApplicationController
      helper Decidim::ApplicationHelper
      helper Decidim::ResourceHelper
      helper Decidim::Conferences::ConferenceHelper

      include NeedsPermission

      layout "layouts/decidim/conferences/application"

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

      private

      def fallback_layout
        "layouts/decidim/conferences/application"
      end

      def permissions_context
        super.merge(
          current_participatory_space: try(:current_participatory_space)
        )
      end

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

      def permission_scope
        :public
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-conferences-0.28.4 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.3 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.2 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.1 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.0 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.0.rc5 app/controllers/decidim/conferences/application_controller.rb
decidim-conferences-0.28.0.rc4 app/controllers/decidim/conferences/application_controller.rb