routes.rb revision 3fb1a618a29315451a827d573c4e373d6d4ae474
40c5626383ebd5e8cf11a636f864023a2aafcd6bDaniel Couto Valerequire 'resque/server'
40c5626383ebd5e8cf11a636f864023a2aafcd6bDaniel Couto Vale
58721b9d3a8cd6a624269ddf507f80af4417c9bdhenning muellerauth_resque = ->(request) {
7bde6e1907fc17b0083a6bcfad10bb74be6e4bcdTim Reddehase request.env['warden'].authenticate? and request.env['warden'].user.admin?
58721b9d3a8cd6a624269ddf507f80af4417c9bdhenning mueller}
435547b6b5df0f76cd04b09532341b07d0defeb1Tim Reddehase
d73e4334f0cc1103049795c5ce7910c54ab1bfc4Eugen KuksaOntohub::Application.routes.draw do
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase resources :logic_translations
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase
d73e4334f0cc1103049795c5ce7910c54ab1bfc4Eugen Kuksa devise_for :users, :controllers => { :registrations => "users/registrations" }
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase resources :users, :only => :show
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase
2977875e15fdb6d84be990579c61cda0b6cbb5d0Tim Reddehase namespace :admin do
d73e4334f0cc1103049795c5ce7910c54ab1bfc4Eugen Kuksa resources :logics, :except => [:show]
435547b6b5df0f76cd04b09532341b07d0defeb1Tim Reddehase resources :teams, :only => :index
435547b6b5df0f76cd04b09532341b07d0defeb1Tim Reddehase resources :users
609a4ff9a0e4cb89a9f529703c81554fe9c34ff6Tim Reddehase end
193be661f0cdd5e3c0faef2dba6b580c0b734394Tim Reddehase
cb1256dca3f095718f35c41530a136823dac0774Eugen Kuksa constraints auth_resque do
609a4ff9a0e4cb89a9f529703c81554fe9c34ff6Tim Reddehase mount Resque::Server, :at => "/admin/resque"
609a4ff9a0e4cb89a9f529703c81554fe9c34ff6Tim Reddehase end
2f305d7bc01ae84f6b219b562fe4d31392abc1d6Eugen Kuksa
3856b7bdf70cec553e0ca01ca823c7fc555a06f0Tim Reddehase resources :ontologies do
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa get 'bulk', :on => :collection
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa resources :entities, :only => :index
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa resources :axioms, :only => :index
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions'
3856b7bdf70cec553e0ca01ca823c7fc555a06f0Tim Reddehase resources :permissions, :only => [:index, :create, :update, :destroy]
3856b7bdf70cec553e0ca01ca823c7fc555a06f0Tim Reddehase resources :metadata, :only => [:index, :create, :destroy]
61c65b3e1c87587d1ed5a15220d41a166a5d66d6Eugen Kuksa resources :comments, :only => [:index, :create, :destroy]
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa end
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa resources :teams do
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa resources :permissions, :only => [:index], :controller => 'teams/permissions'
11c250a983905f4db9081f934d1efbc25fd0fb65Eugen Kuksa resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
11c250a983905f4db9081f934d1efbc25fd0fb65Eugen Kuksa end
fb2c319c7cce96c35e06be8fe6f60da7d040c952Eugen Kuksa
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa get 'autocomplete' => 'autocomplete#index'
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa get 'search' => 'search#index'
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa
de26ab920893b505e7914784774de5eb506f60a0Eugen Kuksa root :to => 'home#show'
fb2c319c7cce96c35e06be8fe6f60da7d040c952Eugen Kuksa
fb2c319c7cce96c35e06be8fe6f60da7d040c952Eugen Kuksaend
a8ab4146c3238374bdd13a36b12d665cde57e078Tim Reddehase