Add confirmation dialog for administrator privilege grant#6548
Merged
Conversation
Implement a confirmation dialog that appears when granting administrator privileges during user creation to prevent accidental privilege escalation. The dialog: - Uses danger styling to emphasize the critical nature of the action - Lists specific capabilities granted to administrators - Requires explicit confirmation before allowing the checkbox to remain checked - Only triggers when checking the box (not unchecking)
Contributor
Author
|
@cstns executed on a quick idea for https://flowfuse.slack.com/archives/C04GW82DJFK/p1768911237024339?thread_ts=1768900709.338869&cid=C04GW82DJFK Can you do a review? Do we use ff-dialog here? 🤔 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6548 +/- ##
=======================================
Coverage ? 76.66%
=======================================
Files ? 398
Lines ? 20103
Branches ? 4841
=======================================
Hits ? 15411
Misses ? 4692
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cstns
reviewed
Jan 20, 2026
Move admin privilege confirmation from checkbox watcher to form submission handler. This allows users to toggle the admin checkbox without interruption and shows the confirmation dialog only when creating the user, improving UX and simplifying state management.
cstns
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a confirmation dialog to the Create User form that appears when the Administrator checkbox is clicked. This prevents accidental granting of administrator privileges by requiring explicit confirmation.
The implementation includes:
ConfirmAdminGrantDialogcomponent with danger stylingisAdmincheckbox that triggers the dialog on state change (false → true)Related Issue(s)
N/A - Proactive security improvement
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionNote: No changelog entry needed as this is a minor UX enhancement without breaking changes.
Labels
area:migrationlabelTesting
Manually tested in development environment: