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