mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:51:07 +08:00
Rename CsvExportLog to UserExport
This commit is contained in:
@ -19,8 +19,8 @@ class ExportCsvController < ApplicationController
|
||||
filename = params.fetch(:id)
|
||||
export_id = filename.split('_')[1].split('.')[0]
|
||||
export_initiated_by_user_id = 0
|
||||
export_initiated_by_user_id = CsvExportLog.where(id: export_id)[0].user_id unless CsvExportLog.where(id: export_id).empty?
|
||||
export_csv_path = CsvExportLog.get_download_path(filename)
|
||||
export_initiated_by_user_id = UserExport.where(id: export_id)[0].user_id unless UserExport.where(id: export_id).empty?
|
||||
export_csv_path = UserExport.get_download_path(filename)
|
||||
|
||||
if export_csv_path && export_initiated_by_user_id == current_user.id
|
||||
send_file export_csv_path
|
||||
|
Reference in New Issue
Block a user