Fix backend merge fallout for booking and limited employees
This commit is contained in:
@@ -1265,7 +1265,6 @@ class limited_backoffice_service
|
||||
}
|
||||
}
|
||||
|
||||
sort($permissions);
|
||||
return array_values(array_unique($permissions));
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +656,7 @@ class orderBookingRoute
|
||||
|
||||
if ($auth->get_subuser() !== false && $this->isOwnCustomerContext($targetCustomerNumber)) {
|
||||
$permissionOwn = self::definePermission('add_own_bookings', subusers_permission_node_key::BOOKINGS_ADD);
|
||||
if (!self::hasPermission($permissionOwn)) {
|
||||
if (!self::hasPermission($permissionOwn, $targetCustomerNumber)) {
|
||||
$this->emitForbidden([$permissionOwn]);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -269,7 +269,7 @@ class usersRoute
|
||||
|
||||
return [
|
||||
'enabled' => true,
|
||||
'filters' => $filterArray === [] ? null : $users->array_to_filters($filterArray),
|
||||
'filters' => $filterArray === [] ? 'id:NOT ZERO' : $users->array_to_filters($filterArray),
|
||||
'additional_where' => '(`customer_number` = 0 OR `id` IN (' . $activeLimitedEmployeeSubquery . '))',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user