discourse/app/assets/javascripts/admin/addon/components/modal
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
..
api-key-urls.hbs DEV: Convert api-key-urls modal to component-based API (#22913) 2023-08-01 14:51:18 -05:00
badge-preview.hbs FIX: Badge preview not displaying grant count (#23269) 2023-08-25 09:19:01 -05:00
badge-preview.js DEV: form-kit 2024-07-17 11:59:35 +02:00
color-scheme-select-base.hbs DEV: Use fn+mut instead of action+mut (#26057) 2024-03-06 18:05:03 +01:00
color-scheme-select-base.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
custom-date-range.hbs FEATURE: add custom date range filter for admin dashboard reports (#23702) 2023-09-29 14:44:17 +05:30
custom-date-range.js DEV: Sort imports 2023-10-10 21:46:54 +01:00
delete-posts-confirmation.hbs
delete-posts-confirmation.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
delete-user-posts-progress.hbs DEV: Convert delete-user-posts-progress modal to component-based API (#22916) 2023-08-01 15:49:26 -05:00
delete-user-posts-progress.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
edit-badge-groupings.hbs DEV: Convert edit-badge-groupings modal to component-based API (#22984) 2023-08-14 12:03:28 -05:00
edit-badge-groupings.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
form-template-validation-options.hbs DEV: Convert form-template-validation-options modal to component-based API (#23236) 2023-08-25 07:02:54 -05:00
form-template-validation-options.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
incoming-email.hbs
install-theme.hbs DEV: Add loading spinner to install theme modal (#25888) 2024-02-26 14:14:21 -07:00
install-theme.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
merge-users-confirmation.hbs DEV: Convert merge-users modals to component-based API (#22727) 2023-08-01 10:35:36 -05:00
merge-users-confirmation.js DEV: Rename I18n imports to discourse-i18n (#23915) 2023-10-18 11:07:09 +01:00
merge-users-progress.hbs DEV: Convert merge-users modals to component-based API (#22727) 2023-08-01 10:35:36 -05:00
merge-users-progress.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
merge-users-prompt.hbs DEV: Fix array-related linting issues in templates (#22935) 2023-08-02 19:43:37 +02:00
merge-users-prompt.js DEV: Convert merge-users modals to component-based API (#22727) 2023-08-01 10:35:36 -05:00
penalize-user.hbs FIX: Don't show silence button on staff users and display similar users (#28423) 2024-08-20 15:27:29 +03:00
penalize-user.js FIX: Don't show silence button on staff users and display similar users (#28423) 2024-08-20 15:27:29 +03:00
reseed.hbs DEV: allows to alter category name/description (#28263) 2024-08-08 17:33:23 +02:00
reseed.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
site-setting-default-categories.hbs DEV: Convert site-setting-default-categories modal to component-based API (#22968) 2023-08-10 10:31:34 +01:00
site-setting-default-categories.js DEV: Convert site-setting-default-categories modal to component-based API (#22968) 2023-08-10 10:31:34 +01:00
staff-action-log-details.hbs DEV: Convert staff-action-log-details modal to component-based API (#23240) 2023-08-25 06:43:52 -05:00
start-backup.hbs FIX: Add checkbox-label to more checkbox label elements (#24174) 2023-10-31 08:57:50 +01:00
start-backup.js DEV: Use the "new" service import (#26059) 2024-03-06 18:05:11 +01:00
theme-change.hbs DEV: Convert theme-change modal to component-based API (#22964) 2023-08-03 15:01:40 -05:00
theme-change.js DEV: Convert theme-change modal to component-based API (#22964) 2023-08-03 15:01:40 -05:00
uploaded-image-list.hbs FIX: Allow deleting avatars from the selectable avatars setting (#26720) 2024-04-24 16:07:12 -04:00
uploaded-image-list.js FIX: Allow deleting avatars from the selectable avatars setting (#26720) 2024-04-24 16:07:12 -04:00
watched-word-test.hbs DEV: Convert watched-word-test modal to component-based API (#22911) 2023-08-01 16:08:56 -05:00
watched-word-test.js PERF: Avoid excessive object creations in watched words (#27354) 2024-06-10 14:44:31 +02:00