FIX: enabling sso should hide delete account button from user preferences page

This commit is contained in:
Arpit Jalan 2015-07-21 17:56:33 +05:30
parent 2847ec0af1
commit 424f877a77

View File

@ -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() {