Merge pull request from shivpkumar/shiv/change-password

Do not allow a user to change their password if local logins are disabled
This commit is contained in:
Sam 2014-07-26 12:37:27 +10:00
commit f625fa68cb
2 changed files with 6 additions and 2 deletions
app/assets/javascripts/discourse

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>