do not allow password changes if local logins disabled
This commit is contained in:
parent
f4f46aea48
commit
aac9c24639
|
@ -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