mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +08:00
FEATURE: Allow admins to disable self-service account deletion
https://meta.discourse.org/t/-/146276
This commit is contained in:
@ -62,7 +62,7 @@ module UserGuardian
|
||||
return false if user.nil? || user.admin?
|
||||
if is_me?(user)
|
||||
!SiteSetting.enable_sso &&
|
||||
!user.has_more_posts_than?(User::MAX_SELF_DELETE_POST_COUNT)
|
||||
!user.has_more_posts_than?(SiteSetting.delete_user_self_max_post_count)
|
||||
else
|
||||
is_staff? && (
|
||||
user.first_post_created_at.nil? ||
|
||||
|
Reference in New Issue
Block a user