Compare commits

..

No commits in common. "ab80794dfefad03f24b747feb59d0698ca22255c" and "fab345e893840cc636c72a37e469790a72e454ad" have entirely different histories.

5 changed files with 6 additions and 10 deletions

View file

@ -1,7 +1,3 @@
0.8.1
* Fix filtering by Mailbox when getting Customers for a non-admin User.
0.8.0 0.8.0
* Rely on hooks to filter the Customers search. * Rely on hooks to filter the Customers search.

View file

@ -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', $mailboxes); $query_customers->whereIn('customers.mailbox_id', $mailbox_ids);
} }
return $query_customers; return $query_customers;
}); });

View file

@ -22,12 +22,12 @@ You have been warned.
Download the [release tarball] and extract its content into `Modules/MMFRestrictedCustomers`. Download the [release tarball] and extract its content into `Modules/MMFRestrictedCustomers`.
[release tarball]: https://port.numenaute.org/MMF/freescout-restricted-customers/archive/0.8.1.tar.gz [release tarball]: https://port.numenaute.org/MMF/freescout-restricted-customers/archive/0.8.0.tar.gz
``` ```
wget https://port.numenaute.org/MMF/freescout-restricted-customers/archive/0.8.1.tar.gz -O freescout-restricted-customers-0.8.1.tar.gz wget https://port.numenaute.org/MMF/freescout-restricted-customers/archive/0.8.0.tar.gz -O freescout-restricted-customers-0.8.0.tar.gz
mkdir -p Modules/MMFRestrictedCustomers mkdir -p Modules/MMFRestrictedCustomers
tar xf freescout-restricted-customers-0.8.1.tar.gz -C Modules/MMFRestrictedCustomers tar xf freescout-restricted-customers-0.8.0.tar.gz -C Modules/MMFRestrictedCustomers
``` ```
#### Install from git #### Install from git

View file

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

View file

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