Sha256: 23d4d7e6107a5ac77ef797657b242d01d529a47d8920b655f20bd836410233b3

Contents?: true

Size: 1.87 KB

Versions: 2

Compression:

Stored size: 1.87 KB

Contents

# frozen_string_literal: true

Decidim::Admin::Engine.routes.draw do
  constraints(->(request) { Decidim::Admin::OrganizationDashboardConstraint.new(request).matches? }) do
    resource :organization, only: [:edit, :update], controller: "organization" do
      resource :appearance, only: [:edit, :update], controller: "organization_appearance"
    end

    Decidim.participatory_space_manifests.each do |manifest|
      mount manifest.context(:admin).engine, at: "/", as: "decidim_admin_#{manifest.name}"
    end

    resources :static_pages
    resources :scope_types, except: [:show]
    resources :scopes, except: [:show] do
      resources :scopes, except: [:show]
    end
    resources :logs, only: [:index]
    resources :area_types, except: [:show]
    resources :areas, except: [:show]
    resources :authorization_workflows, only: :index

    Decidim.authorization_admin_engines.each do |manifest|
      mount manifest.admin_engine, at: "/#{manifest.name}", as: "decidim_admin_#{manifest.name}"
    end

    resources :users, except: [:edit, :update], controller: "users" do
      member do
        post :resend_invitation, to: "users#resend_invitation"
      end
    end

    resources :officializations, only: [:new, :create, :index, :destroy], param: :user_id

    resources :managed_users, controller: "managed_users", except: [:edit, :update] do
      resources :promotions, controller: "managed_users/promotions", only: [:new, :create]
      resources :impersonations, controller: "managed_users/impersonations", only: [:index, :new, :create] do
        collection do
          post :close_session
        end
      end
    end

    resources :newsletters do
      member do
        get :preview
        post :deliver
      end
    end

    resources :user_groups, only: [:index] do
      member do
        put :verify
        put :reject
      end
    end

    root to: "dashboard#show"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-admin-0.10.1 config/routes.rb
decidim-admin-0.10.0 config/routes.rb