do not allow password changes if local logins disabled

This commit is contained in:
Shiv Kumar 2014-07-25 14:27:27 -07:00
parent f4f46aea48
commit aac9c24639
2 changed files with 6 additions and 2 deletions

View file

@ -35,6 +35,10 @@ export default Discourse.ObjectController.extend({
return Discourse.SiteSettings.enable_badges && this.get('model.has_title_badges');
}.property('model.badge_count'),
canChangePassword: function() {
return !Discourse.SiteSettings.enable_sso && Discourse.SiteSettings.enable_local_logins;
}.property(),
availableLocales: function() {
return Discourse.SiteSettings.available_locales.split('|').map( function(s) {
return {name: s, value: s};

View file

@ -60,7 +60,7 @@
</div>
</div>
{{#unless Discourse.SiteSettings.enable_sso }}
{{#if canChangePassword}}
<div class="control-group pref-password">
<label class="control-label">{{i18n user.password.title}}</label>
<div class="controls">
@ -74,7 +74,7 @@
{{passwordProgress}}
</div>
</div>
{{/unless}}
{{/if}}
<div class="control-group pref-avatar">
<label class="control-label">{{i18n user.avatar.title}}</label>