Merge pull request #2588 from shivpkumar/shiv/change-password
Do not allow a user to change their password if local logins are disabled
This commit is contained in:
commit
f625fa68cb
app/assets/javascripts/discourse
|
@ -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};
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue