Compare commits

..

No commits in common. "bcaaed05663ac19f329cb21c84e768d31a696ed5" and "69c518086e4b11c2570177cb52600752a785177b" have entirely different histories.

4 changed files with 2 additions and 19 deletions

View file

@ -1,7 +1,3 @@
1.1.0
* Add compatibility with MMFCustomersGroups.
1.0.1
* Fix the fetching of e-mails including attachments.

View file

@ -68,19 +68,6 @@ class MMFRestrictedCustomersServiceProvider extends ServiceProvider {
$priority = 20,
$arguments = 3
);
// Filter the list of Customers returned by MMFCustomersGroups when creating/editing a Customers Group.
Eventy::addFilter('mmfcustomergroups.groups.create.customers-query', function($customers_query) {
$user = auth()->user();
// Do not restrict the query if the current user is an admin.
if ( $user->role != User::ROLE_ADMIN ) {
// Get IDs of mailboxes the current user is allowed to access.
$mailboxes = $user->mailboxesIdsCanView();
// Restrict the query to the Customers the current user is allowed to access.
$customers_query->whereIn('customers.mailbox_id', $mailboxes);
}
return $customers_query;
});
}
/**

View file

@ -1,7 +1,7 @@
{
"name": "millions-missing-france/freescout-restricted-customers",
"description": "Freescout restricted customers - Restrict access to Freescout customers to specific mailboxes",
"version": "1.1.0",
"version": "1.0.1",
"type": "library",
"license": ["AGPL-3.0-only"],
"authors": [

View file

@ -2,7 +2,7 @@
"name": "MMFRestrictedCustomers",
"alias": "mmfrestrictedcustomers",
"description": "Freescout restricted customers - Restrict access to Freescout customers to specific mailboxes",
"version": "1.1.0",
"version": "1.0.1",
"detailsUrl": "",
"author": "Millions Missing FRANCE",
"authorUrl": "info@millionsmissing.fr",