mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-13 19:55:12 +08:00
Previously, clicking Approve on a user's admin profile 500'd with `Reviewable::InvalidAction` when that user had a non-pending `ReviewableUser` (e.g., after `UserDestroyer.destroy` was rescued because the user had posts), and toggling on `must_approve_users` also skipped those users — leaving them permanently un-approvable from the admin UI. This change gates the `:approve_user` action on `guardian.can_approve?(target)` instead of `status == "pending"`, fixes the auto-approval initializer to only skip users with a *pending* reviewable, and centralizes `updatable_reviewable_scores` so re-approval correctly flips `disagreed` scores back to `agreed`. https://meta.discourse.org/t/403620 --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 000_pg_connection_patch_spec.rb | ||
| content_localization_setting_spec.rb | ||
| custom_timezones_spec.rb | ||
| track_setting_changes_spec.rb | ||
| web_hook_events_spec.rb | ||