Redesign Add/Edit User dialog and add role descriptions - #358
Redesign Add/Edit User dialog and add role descriptions#358apodacaduron wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Pushed a small fix to the migration on this branch (0bdd5b8), since it is easy to miss on the FE side.
The migration itself is unchanged, it is data-only so ordering does not matter. Mind giving it a quick look when you get a chance? One thing to watch: whichever migration PR merges first wins the head. If #370 lands before this one, this will need re-parenting onto |
Two branches that each add a migration both parent it on whatever was `head` at authoring time. Git merges them cleanly because they touch different files, so the break only surfaces as `Multiple head revisions are present` when `flask db upgrade` runs on deploy. This happened on #358 and would have failed mid-deploy. Three small pieces: - `tests/test_migrations.py` asserts a single head. Runs in the existing pytest job, needs no database, ~0.1s. A PR that is individually fine but breaks after `main` moves under it now goes red instead of reaching a server. - `flask doctor` reported this case as a yellow `! Could not check migrations` because `get_current_head()` raises on multiple heads and the bare `except` swallowed it. Switched to `get_heads()` and made it a hard failure. - `CONTRIBUTING.md` documents when to re-parent vs when to `flask db merge heads`. Before and after on a simulated two-head branch: ``` ! Could not check migrations: The script directory has multiple heads (due to branching). - Multiple migration heads (f0a3d6c1, zzz9temp): db upgrade will abort ``` ## How to test 1. `uv run pytest tests/test_migrations.py` passes on a clean tree. 2. Add a migration file with `down_revision` pointing at any non-head revision, re-run, confirm it fails naming both heads. 3. With that file still present, `uv run flask doctor` reports the failure line above.
Description
Redesigns the Add/Edit User dialog into clearly labeled sections (User Details, Account Status, User Permissions), moves the field-enable pencil icons inline into their inputs, restyles the Group multi-select dropdown to show a description under each role with a checkmark/highlight for selected ones, and adds real descriptive text for the default Admin/DA/Mod roles (replacing the generic "System Role" placeholder) via a data migration. No functional/permission behavior changed — same fields, validations, and API calls as before.
How to Test
flask db upgradeand confirm Admin/DA/Mod roles get updated descriptions (only rows still set to "System Role" are touched).