Hide :settings role from forms
Visible demo noise: settings role should not appear as an assignable role in forms.
Four changes across two files:
lisp/backend.lisp — 3 functions modified to exclude "settings" and align system exclusives:
selectable-roles— added"settings"tosystem-exclusives. Controls the checkbox-list for non-base types.allowed-values-for-field— rewrote the:users =:rolesfilter. Previously only stripped"logged-in"; now strips the full set ("admin","admin:exclusive","guest:exclusive","settings","logged-in", current user's exclusive). This was the path the:usersAdd form actually hit — the bug you found.add-roles-to-view— you refactored both branches to useu:hasagainst a list instead of chainedor/=equal= calls. Added"settings"to both the non-base and:usersbranches. Controls role display in list/detail views.
tests/backend-tests.lisp — 2 tests touched:
selectable-roles-admin— added"settings"to the expected exclusion list and added anis-falseassertion for it.allowed-values-for-field-excludes-settings-from-users-roles— new test covering the:usersAdd form path. Asserts"settings","admin","admin:exclusive","guest:exclusive","logged-in", and the admin's exclusive role are all absent, while"public"and"user-creator"are present.
Commits:
- 740b9aa private/master Add a test for users add form no settings role
- c698bfb More exclude settings from Add form.
- 031e4dc Exclude settings from roles in UI
- Slot
- 24100
- Status
- 60 Done
- Tags
- mvp, backend, bug
- Contributors
- Donnie