Skip to content

Commit

Permalink
Remove can-assign-items check from site removal
Browse files Browse the repository at this point in the history
Before, a user without the can-assign-items privilege could flag a site
for un-assignment, but the site would not be un-assigned.
  • Loading branch information
jimsafley committed Apr 1, 2024
1 parent 3d29f1b commit cad4f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/src/Api/Adapter/ItemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public function hydrate(Request $request, EntityInterface $entity,
if (!$append && !$remove) {
// Remove sites that were not included in the passed data.
foreach ($sites as $site) {
if (!in_array($site, $sitesToRetain) && $acl->userIsAllowed($site, 'can-assign-items')) {
if (!in_array($site, $sitesToRetain)) {
$sites->removeElement($site);
}
}
Expand Down

0 comments on commit cad4f2a

Please sign in to comment.