Fix filtering by Mailbox when getting Customers for a non-admin User
This commit is contained in:
parent
fab345e893
commit
7e0f5ec30b
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ class MMFRestrictedCustomersServiceProvider extends ServiceProvider {
|
||||||
// Get IDs of mailboxes the current user is allowed to access.
|
// Get IDs of mailboxes the current user is allowed to access.
|
||||||
$mailboxes = $user->mailboxesIdsCanView();
|
$mailboxes = $user->mailboxesIdsCanView();
|
||||||
// Restrict the query to the Customers the current user is allowed to access.
|
// Restrict the query to the Customers the current user is allowed to access.
|
||||||
$query_customers->whereIn('customers.mailbox_id', $mailbox_ids);
|
$query_customers->whereIn('customers.mailbox_id', $mailboxes);
|
||||||
}
|
}
|
||||||
return $query_customers;
|
return $query_customers;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue