diff --git a/app/assets/javascripts/discourse/controllers/avatar-selector.js.es6 b/app/assets/javascripts/discourse/controllers/avatar-selector.js.es6 index 32aa7b514d5..6a34f559b03 100644 --- a/app/assets/javascripts/discourse/controllers/avatar-selector.js.es6 +++ b/app/assets/javascripts/discourse/controllers/avatar-selector.js.es6 @@ -21,8 +21,8 @@ export default Ember.Controller.extend(ModalFunctionality, { }, @computed() - allowImageUpload() { - return Discourse.Utilities.allowsImages(); + allowAvatarUpload() { + return this.siteSettings.allow_uploaded_avatars && Discourse.Utilities.allowsImages(); }, actions: { diff --git a/app/assets/javascripts/discourse/controllers/preferences.js.es6 b/app/assets/javascripts/discourse/controllers/preferences.js.es6 index a7aa333fbca..f23f342e08f 100644 --- a/app/assets/javascripts/discourse/controllers/preferences.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences.js.es6 @@ -5,12 +5,6 @@ import computed from "ember-addons/ember-computed-decorators"; export default Ember.Controller.extend(CanCheckEmails, { - allowAvatarUpload: setting('allow_uploaded_avatars'), - allowUserLocale: setting('allow_user_locale'), - ssoOverridesAvatar: setting('sso_overrides_avatar'), - allowBackgrounds: setting('allow_profile_backgrounds'), - editHistoryVisible: setting('edit_history_visible_to_public'), - @computed("model.watchedCategories", "model.trackedCategories", "model.mutedCategories") selectedCategories(watched, tracked, muted) { return [].concat(watched, tracked, muted); @@ -45,7 +39,7 @@ export default Ember.Controller.extend(CanCheckEmails, { @computed() nameInstructions() { - return I18n.t(Discourse.SiteSettings.full_name_required ? 'user.name.instructions_required' : 'user.name.instructions'); + return I18n.t(this.siteSettings.full_name_required ? 'user.name.instructions_required' : 'user.name.instructions'); }, @computed("model.has_title_badges") diff --git a/app/assets/javascripts/discourse/templates/modal/avatar_selector.hbs b/app/assets/javascripts/discourse/templates/modal/avatar_selector.hbs index e7d070d814a..760ab1a580f 100644 --- a/app/assets/javascripts/discourse/templates/modal/avatar_selector.hbs +++ b/app/assets/javascripts/discourse/templates/modal/avatar_selector.hbs @@ -9,7 +9,7 @@ {{d-button action="refreshGravatar" title="user.change_avatar.refresh_gravatar_title" disabled=gravatarRefreshDisabled icon="refresh"}} - {{#if allowImageUpload}} + {{#if allowAvatarUpload}}