]> BookStack Code Mirror - bookstack/commit
Permissions: Updated guest user handling so additional roles apply
authorDan Brown <redacted>
Sat, 10 Jun 2023 10:37:01 +0000 (11:37 +0100)
committerDan Brown <redacted>
Sat, 10 Jun 2023 10:37:01 +0000 (11:37 +0100)
commit777027bc48d628f1283b0a734ffabe5dbabebc36
tree80064a7888ee42959350ea248036a143e809f23d
parent1e220c473fa71a412918a8e55b63949019b40744
Permissions: Updated guest user handling so additional roles apply

Previously additional roles would only partially apply (system or "all"
permissions). This aligns the query-handling of permissions so that
additional roles will be used for permission queries.

Adds migration to detach existing roles as a safety precaution since
this is likely to widen permissions in scenarios that the public user
has other roles assigned already.

For #1229
app/Permissions/PermissionApplicator.php
database/migrations/2023_06_10_071823_remove_guest_user_secondary_roles.php [new file with mode: 0644]
tests/PublicActionTest.php