dev_static
daiao 5 years ago
parent d72ccd63bc
commit b7a0d1c867

@ -18,9 +18,9 @@ class ShixunsController < ApplicationController
before_action :find_repo_name, only: [:repository, :commits, :file_content, :update_file, :shixun_exec, :copy,
:add_file, :jupyter_exec]
before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public,
before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public, :upload_git_folder,
:shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file,
:cancel_apply_public, :cancel_publish, :add_collaborators, :add_file]
:cancel_apply_public, :cancel_publish, :add_collaborators, :add_file, :delete_git_file]
before_action :portion_allowed, only: [:copy]
before_action :special_allowed, only: [:send_to_course, :search_user_courses]
@ -897,12 +897,12 @@ class ShixunsController < ApplicationController
end
def upload_git_folder
raise("文件夹名不合法") if params[:folder_name] =~ /^[^\\\/\?\*\"\>\<\:\|]*$/
render_ok
end
def delete_git_file
render_ok
end
def add_collaborators

@ -280,6 +280,8 @@ Rails.application.routes.draw do
post :commits
post :file_content
post :upload_git_file
post :upload_git_folder
delete :delete_git_file
post :update_file
post :close
post :add_file

Loading…
Cancel
Save