fix(admin): confirm before role change and application-group delete (BUNYIP-109) #149

Merged
vas2000-work merged 1 commit from fix/BUNYIP-109-admin-confirm into main 2026-06-16 01:40:52 +02:00
Owner

Summary

Three destructive/privileged admin actions were missing the onsubmit="return confirm(...)" guard that every sibling action in bunyip-web/src/handlers/admin.rs already has.

This adds a confirm dialog to each:

  • User role-change form on the user list (/admin/users/{}/role): "Change this user role? Admins have full platform access."
  • User role-change form on the user detail page (same route): same prompt.
  • Application-group delete form (/admin/application-groups/{}/delete): "Delete this application group? This cannot be undone."

The maud attribute style matches the existing confirmed forms (suspend/delete-user, lifetime grant/revoke, reset-password).

Verification

cargo fmt --all --check and cargo clippy -p bunyip-web --all-targets -- -D warnings both pass in the pinned rust-builder-glibc image. Template attribute change only, so no new tests.

#BUNYIP-109

## Summary Three destructive/privileged admin actions were missing the `onsubmit="return confirm(...)"` guard that every sibling action in `bunyip-web/src/handlers/admin.rs` already has. This adds a confirm dialog to each: - User role-change form on the user list (`/admin/users/{}/role`): "Change this user role? Admins have full platform access." - User role-change form on the user detail page (same route): same prompt. - Application-group delete form (`/admin/application-groups/{}/delete`): "Delete this application group? This cannot be undone." The maud attribute style matches the existing confirmed forms (suspend/delete-user, lifetime grant/revoke, reset-password). ## Verification `cargo fmt --all --check` and `cargo clippy -p bunyip-web --all-targets -- -D warnings` both pass in the pinned rust-builder-glibc image. Template attribute change only, so no new tests. #BUNYIP-109
fix(admin): confirm before role change and application-group delete (BUNYIP-109)
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 1m3s
Create release / Create release from merged PR (pull_request) Has been skipped
a84d56866a
Add onsubmit confirm guards to the two user role-change forms (user list and user detail) and the application-group delete form, matching the existing confirmed admin actions in the same file.

#BUNYIP-109

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/bunyip!149
No description provided.