discourse/spec/requests/api
Osama Sayegh 35b748e7f4
FIX: Don't show silence button on staff users and display similar users (#28423)
This commit fixes a bug where the silence button is incorrectly displayed on the admin page of a staff user. It's not actually possible to silence a staff user because the backend correctly prevents it, but the frontend isn't checking if the button should be displayed.

Another small bug that this commit fixes is the similar users list not showing up inside the silence/suspend modals due to also a bug in the frontend.

I've also changed the way similar users are loaded so that they're not returned by the `admin/users#show` endpoint anymore and moved them into a new endpoint that the penalize modals (suspend and silence) can call directly to retrieve the list of users. This is done because the similar users list is never shown on the admin user page (`/admin/users/:user_id/:username`); they're only needed when the suspend or silence modals are opened.

Internal topic: t/130014.
2024-08-20 15:27:29 +03:00
..
schemas FIX: Don't show silence button on staff users and display similar users (#28423) 2024-08-20 15:27:29 +03:00
shared DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
backups_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
badges_spec.rb DEV: Allow fab! without block (#24314) 2023-11-09 16:47:59 -06:00
categories_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
groups_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
invites_spec.rb FIX: Create invite api docs (#21460) 2023-05-09 13:20:46 -06:00
multiple_invites_spec.rb FEATURE: change /invites.json api endpoint to optionally accept array of emails (#24853) 2023-12-28 10:16:04 -05:00
notifications_spec.rb DEV: Block accidental serialization of entire AR models (#27668) 2024-07-01 17:08:48 -03:00
posts_spec.rb DEV: Block accidental serialization of entire AR models (#27668) 2024-07-01 17:08:48 -03:00
private_messages_spec.rb FIX: update id types in API docs to integers (#27412) 2024-06-26 20:44:39 -06:00
rate_limits_spec.rb DEV: Don't enforce per ip rate limits for admin api requests (#27500) 2024-06-17 13:21:11 -05:00
search_spec.rb DEV: Document group param for search endpoint (#19806) 2023-01-09 14:46:07 -07:00
site_spec.rb DEV: Document basic-info endpoint (#26471) 2024-04-02 14:53:19 -06:00
tags_spec.rb FIX: update id types in API docs to integers (#27412) 2024-06-26 20:44:39 -06:00
topics_spec.rb FIX: update id types in API docs to integers (#27412) 2024-06-26 20:44:39 -06:00
uploads_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_badges_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
users_spec.rb FIX: update id types in API docs to integers (#27412) 2024-06-26 20:44:39 -06:00