mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 14:35:48 +08:00
FIX: enabling sso should hide delete account button from user preferences page
This commit is contained in:
parent
2847ec0af1
commit
424f877a77
|
@ -395,7 +395,7 @@ const User = RestModel.extend({
|
|||
}.observes("watched_category_ids"),
|
||||
|
||||
canDeleteAccount: function() {
|
||||
return this.get('can_delete_account') && ((this.get('reply_count')||0) + (this.get('topic_count')||0)) <= 1;
|
||||
return !Discourse.SiteSettings.enable_sso && this.get('can_delete_account') && ((this.get('reply_count')||0) + (this.get('topic_count')||0)) <= 1;
|
||||
}.property('can_delete_account', 'reply_count', 'topic_count'),
|
||||
|
||||
"delete": function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user