mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +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:
@ -1049,4 +1049,17 @@ RSpec.describe Admin::UsersController do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#sso_record' do
|
||||
fab!(:sso_record) { SingleSignOnRecord.create!(user_id: user.id, external_id: '12345', external_email: user.email, last_payload: '') }
|
||||
|
||||
it "deletes the record" do
|
||||
SiteSetting.sso_url = "https://www.example.com/sso"
|
||||
SiteSetting.enable_sso = true
|
||||
|
||||
delete "/admin/users/#{user.id}/sso_record.json"
|
||||
expect(response.status).to eq(200)
|
||||
expect(user.single_sign_on_record).to eq(nil)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user