unbreak legacy JSON files endpoint with new files enabled
test plan: - enable new files in a course - create a wiki page in the course - click "upload a new file" in the wiki sidebar - there should not be an ajax error, and the select box to choose the folder to uplod to should populate fixes CNVS-17359 Change-Id: I1a996eecd10e101d27c391da5f1b7be65296bb5d Reviewed-on: https://gerrit.instructure.com/45485 Reviewed-by: Dan Minkevitch <dan@instructure.com> Product-Review: Dan Minkevitch <dan@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
This commit is contained in:
parent
c45f93f819
commit
040c02bbf6
|
@ -166,9 +166,6 @@ class FilesController < ApplicationController
|
|||
protected :check_file_access_flags
|
||||
|
||||
def index
|
||||
# to turn :better_file_browsing on for user files, turn it on for the account they are a part of.
|
||||
return react_files if (@context.is_a?(User) ? @context.account : @context).feature_enabled?(:better_file_browsing)
|
||||
|
||||
if request.format == :json
|
||||
if authorized_action(@context.attachments.build, @current_user, :read)
|
||||
@current_folder = Folder.find_folder(@context, params[:folder_id])
|
||||
|
@ -205,6 +202,8 @@ class FilesController < ApplicationController
|
|||
end
|
||||
end
|
||||
else
|
||||
# to turn :better_file_browsing on for user files, turn it on for the account they are a part of.
|
||||
return react_files if (@context.is_a?(User) ? @context.account : @context).feature_enabled?(:better_file_browsing)
|
||||
full_index
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue