mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FEATURE: Allow admins to delete user SSO records in the UI (#10669)
Also displays the user's last payload in the admin UI to help with debugging SSO issues.
This commit is contained in:
@ -23,7 +23,8 @@ class Admin::UsersController < Admin::AdminController
|
||||
:merge,
|
||||
:reset_bounce_score,
|
||||
:disable_second_factor,
|
||||
:delete_posts_batch]
|
||||
:delete_posts_batch,
|
||||
:sso_record]
|
||||
|
||||
def index
|
||||
users = ::AdminUserIndexQuery.new(params).find_users
|
||||
@ -498,6 +499,12 @@ class Admin::UsersController < Admin::AdminController
|
||||
render json: success_json
|
||||
end
|
||||
|
||||
def sso_record
|
||||
guardian.ensure_can_delete_sso_record!(@user)
|
||||
@user.single_sign_on_record.destroy!
|
||||
render json: success_json
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def perform_post_action
|
||||
|
Reference in New Issue
Block a user