]> BookStack Code Mirror - bookstack/commit
Fixed not being able to remove all user roles
authorDan Brown <redacted>
Fri, 16 Dec 2022 17:44:13 +0000 (17:44 +0000)
committerDan Brown <redacted>
Fri, 16 Dec 2022 17:44:13 +0000 (17:44 +0000)
commit0123d83fb27f286d8ad4a0a865d82974ad099a94
tree53b83bc7e5b570ece47177c8c1bd0af47bc55a3c
parent559e392f1bdf02aa5f989c49c111cb0c2920a2fd
Fixed not being able to remove all user roles

User roles would only be actioned if they existed in the form request,
hence removal of all roles would have no data to action upon.
This adds a placeholder 0-id role to ensure there is always role data to
send, even when no roles are selected. This field value is latter
filtered out.

Added test to cover.

Likely related to #3922.
app/Auth/UserRepo.php
resources/views/form/role-checkboxes.blade.php
tests/User/UserManagementTest.php
Morty Proxy This is a proxified and sanitized view of the page, visit original site.