mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-10 05:46:47 +08:00
Remove old archive endpoint, controller logic
This commit is contained in:
parent
2db39c049e
commit
084cdcdd6b
2 changed files with 0 additions and 11 deletions
|
@ -10,7 +10,6 @@ class ProjectsController < ApplicationController
|
||||||
delete_samples samples_index)
|
delete_samples samples_index)
|
||||||
before_action :load_projects_tree, only: %i(sidebar show samples archive
|
before_action :load_projects_tree, only: %i(sidebar show samples archive
|
||||||
experiment_archive)
|
experiment_archive)
|
||||||
before_action :load_archive_vars, only: :archive
|
|
||||||
before_action :check_view_permissions, only: %i(show reports notifications
|
before_action :check_view_permissions, only: %i(show reports notifications
|
||||||
samples experiment_archive
|
samples experiment_archive
|
||||||
samples_index)
|
samples_index)
|
||||||
|
@ -319,15 +318,6 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def load_archive_vars
|
|
||||||
if current_user.teams.any?
|
|
||||||
@archived_projects_by_teams =
|
|
||||||
current_user.projects_by_teams(@current_team.id, @current_sort, true)
|
|
||||||
else
|
|
||||||
@archived_projects_by_teams = []
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_view_permissions
|
def check_view_permissions
|
||||||
render_403 unless can_read_project?(@project)
|
render_403 unless can_read_project?(@project)
|
||||||
end
|
end
|
||||||
|
|
|
@ -225,7 +225,6 @@ Rails.application.routes.draw do
|
||||||
via: [:get, :post, :put, :patch]
|
via: [:get, :post, :put, :patch]
|
||||||
end
|
end
|
||||||
|
|
||||||
get 'projects/archive', to: 'projects#archive', as: 'projects_archive'
|
|
||||||
post 'projects/index_dt', to: 'projects#index_dt', as: 'projects_index_dt'
|
post 'projects/index_dt', to: 'projects#index_dt', as: 'projects_index_dt'
|
||||||
get 'projects/sidebar', to: 'projects#sidebar', as: 'projects_sidebar'
|
get 'projects/sidebar', to: 'projects#sidebar', as: 'projects_sidebar'
|
||||||
get 'projects/dt_state_load', to: 'projects#dt_state_load',
|
get 'projects/dt_state_load', to: 'projects#dt_state_load',
|
||||||
|
|
Loading…
Add table
Reference in a new issue