routes.rb revision 560baaad7d614c8aa6b7871e3a99ce33a137d93b
145N/Arequire 'resque/server'
145N/A
145N/Aauth_resque = ->(request) {
145N/A request.env['warden'].authenticate? and request.env['warden'].user.admin?
145N/A}
145N/A
145N/AOntohub::Application.routes.draw do
145N/A
145N/A devise_for :users, :controllers => { :registrations => "users/registrations" }
145N/A resources :users, :only => :show
145N/A resources :keys, except: [:show, :edit, :update]
145N/A
145N/A resources :logics do
145N/A resources :supports, :only => [:create, :update, :destroy, :index]
145N/A end
145N/A
145N/A resources :languages do
145N/A resources :supports, :only => [:create, :update, :destroy, :index]
145N/A end
145N/A
145N/A resources :language_mappings
145N/A resources :logic_mappings
145N/A
145N/A resources :language_adjoints
187N/A resources :logic_adjoints
187N/A
187N/A resources :serializations
187N/A
187N/A namespace :admin do
145N/A resources :teams, :only => :index
187N/A resources :users
187N/A end
187N/A
145N/A constraints auth_resque do
187N/A mount Resque::Server, :at => "/admin/resque"
187N/A end
187N/A
187N/A resources :ontologies, only: :show do
145N/A resources :children, :only => :index
145N/A resources :entities, :only => :index
145N/A resources :sentences, :only => :index
145N/A resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
187N/A resource :oops_request, :only => [:show, :create]
187N/A end
187N/A
187N/A# %w( entities sentences ).each do |name|
187N/A# get "versions/:number/#{name}" => "#{name}#index", :as => "ontology_version_#{name}"
187N/A# end
145N/A
187N/A resources :metadata, :only => [:index, :create, :destroy]
187N/A resources :comments, :only => [:index, :create, :destroy]
187N/A end
187N/A
187N/A resources :teams do
187N/A resources :permissions, :only => [:index], :controller => 'teams/permissions'
187N/A resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
187N/A end
187N/A
187N/A get 'autocomplete' => 'autocomplete#index'
145N/A get 'search' => 'search#index'
145N/A
145N/A resources :repositories do
resources :permissions, :only => [:index, :create, :update, :destroy]
resources :ontologies do
get 'bulk', :on => :collection
end
end
root :to => 'home#show'
end