mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: use correct site setting when uploading images
This commit is contained in:
@@ -664,10 +664,12 @@ const User = RestModel.extend({
|
||||
},
|
||||
|
||||
isAllowedToUploadAFile(type) {
|
||||
const settingName = type === "image" ? "embedded_media" : "attachments";
|
||||
|
||||
return (
|
||||
this.staff ||
|
||||
this.trust_level > 0 ||
|
||||
this.siteSettings[`newuser_max_${type}s`] > 0
|
||||
this.siteSettings[`newuser_max_${settingName}`] > 0
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user