routes.rb revision a4344d37747b6733bbd0d8df738b614cb385316c
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainenrequire Rails.root.join('lib', 'router_constraints.rb')
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo SirainenSpecroutes.define(Ontohub::Application.routes) do
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen # IRI Routing #
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen ###############
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen MIMERouterConstraint.new('text/plain', 'text/html'))
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen get 'ref/:version_number/:repository_id(/*path)/:file',
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen MIMERouterConstraint.new('text/plain', 'text/html'))
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen ###############
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen get '/after_signup', to: 'home#show' , as: 'after_sign_up'
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :keys, except: [:show, :edit, :update]
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :supports, :only => [:create, :update, :destroy, :index]
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :supports, :only => [:create, :update, :destroy, :index]
7ded22760598b78ee29f9418eacc0abe3fb51055Timo Sirainen resources :categories, :only => [:index, :show]
3675a7e9bd3775ba13fe8bc93915902513a0f1a4Timo Sirainen authenticate :user, lambda { |u| u.admin? } do
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen namespace :api, defaults: { format: 'json' } do
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :repositories, only: [:index, :update]
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :ontologies, only: [:index, :update]
3675a7e9bd3775ba13fe8bc93915902513a0f1a4Timo Sirainen resources :permissions, :only => [:index], :controller => 'teams/permissions'
3675a7e9bd3775ba13fe8bc93915902513a0f1a4Timo Sirainen resources :team_users, :only => [:index, :create, :update, :destroy], :path => 'users'
3675a7e9bd3775ba13fe8bc93915902513a0f1a4Timo Sirainen get 'symbols_search' => 'symbols_search#index'
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :s_s_h_access, :only => :index, path: 'ssh_access'
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :permissions, :only => [:index, :create, :update, :destroy]
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :repository_settings, :only => :index
2a34e2be33f8a17d21384a5527ed9f75f4d270e0Timo Sirainen resources :ontologies, only: [:index, :show, :edit, :update, :destroy] do
746d35bf3dba3ae5ddbcecb9732f60d5e9de77efTimo Sirainen post 'retry_failed' => 'ontologies#retry_failed'
746d35bf3dba3ae5ddbcecb9732f60d5e9de77efTimo Sirainen post 'retry_failed' => 'ontologies#retry_failed'
746d35bf3dba3ae5ddbcecb9732f60d5e9de77efTimo Sirainen resources :ontology_versions, :only => [:index, :show, :new, :create], :path => 'versions' do
746d35bf3dba3ae5ddbcecb9732f60d5e9de77efTimo Sirainen resource :oops_request, :only => [:show, :create]
746d35bf3dba3ae5ddbcecb9732f60d5e9de77efTimo Sirainen resources :metadata, :only => [:index, :create, :destroy]
8ababf3e7b15f793370d1dedf85825d38b42633fTimo Sirainen resources :comments, :only => [:index, :create, :destroy]