mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 20:05:14 +08:00
Minor code optimization
This commit is contained in:
parent
8f070c2008
commit
5128aa1052
|
@ -35,19 +35,19 @@ export default ObjectController.extend(CanCheckEmails, {
|
||||||
canEditName: Discourse.computed.setting('enable_names'),
|
canEditName: Discourse.computed.setting('enable_names'),
|
||||||
|
|
||||||
canSelectTitle: function() {
|
canSelectTitle: function() {
|
||||||
return Discourse.SiteSettings.enable_badges && this.get('model.has_title_badges');
|
return this.siteSettings.enable_badges && this.get('model.has_title_badges');
|
||||||
}.property('model.badge_count'),
|
}.property('model.badge_count'),
|
||||||
|
|
||||||
canChangePassword: function() {
|
canChangePassword: function() {
|
||||||
return !Discourse.SiteSettings.enable_sso && Discourse.SiteSettings.enable_local_logins;
|
return !this.siteSettings.enable_sso && this.siteSettings.enable_local_logins;
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
canReceiveDigest: function() {
|
canReceiveDigest: function() {
|
||||||
return !this.siteSettings.disable_digest_emails
|
return !this.siteSettings.disable_digest_emails;
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
availableLocales: function() {
|
availableLocales: function() {
|
||||||
return Discourse.SiteSettings.available_locales.split('|').map( function(s) {
|
return this.siteSettings.available_locales.split('|').map( function(s) {
|
||||||
return {name: s, value: s};
|
return {name: s, value: s};
|
||||||
});
|
});
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user