remove use of soon-to-be-deprecated 'Discourse.SiteSettings' (cc @eviltrout)

This commit is contained in:
Régis Hanol
2017-06-14 10:02:13 +02:00
parent 485de2fcc3
commit f943efe1a9
3 changed files with 8 additions and 6 deletions

View File

@ -185,8 +185,8 @@ export function validateUploadedFile(file, opts) {
if (!name) { return false; }
// check that the uploaded file is authorized
if (Discourse.SiteSettings.allow_staff_to_upload_any_file_in_pm) {
if (opts["isPrivateMessage"] && Discourse.User.current("staff")) {
if (opts["allowStaffToUploadAnyFileInPm"] && opts["isPrivateMessage"]) {
if (Discourse.User.current("staff")) {
return true;
}
}