mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +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:
@ -31,6 +31,7 @@ class AdminDetailedUserSerializer < AdminUserSerializer
|
||||
:can_view_action_logs,
|
||||
:second_factor_enabled,
|
||||
:can_disable_second_factor,
|
||||
:can_delete_sso_record,
|
||||
:api_key_count
|
||||
|
||||
has_one :approved_by, serializer: BasicUserSerializer, embed: :objects
|
||||
@ -126,4 +127,8 @@ class AdminDetailedUserSerializer < AdminUserSerializer
|
||||
def api_key_count
|
||||
object.api_keys.active.count
|
||||
end
|
||||
|
||||
def can_delete_sso_record
|
||||
scope.can_delete_sso_record?(object)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user