main ← fix-approve-button-non-pending-reviewable
opened 01:36PM - 26 May 26 UTC
Previously, clicking Approve on a user's admin profile 500'd with `Reviewable::I…nvalidAction` 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