Compare commits

..

2 commits

Author SHA1 Message Date
ab80794dfe
0.8.1 release
* Fix filtering by Mailbox when getting Customers for a non-admin User.
2024-07-11 16:51:04 +02:00
7e0f5ec30b
Fix filtering by Mailbox when getting Customers for a non-admin User 2024-07-11 16:48:54 +02:00
5 changed files with 10 additions and 6 deletions

View file

@ -1,3 +1,7 @@
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', $mailbox_ids); $query_customers->whereIn('customers.mailbox_id', $mailboxes);
} }
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.0.tar.gz [release tarball]: https://port.numenaute.org/MMF/freescout-restricted-customers/archive/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 wget https://port.numenaute.org/MMF/freescout-restricted-customers/archive/0.8.1.tar.gz -O freescout-restricted-customers-0.8.1.tar.gz
mkdir -p Modules/MMFRestrictedCustomers mkdir -p Modules/MMFRestrictedCustomers
tar xf freescout-restricted-customers-0.8.0.tar.gz -C Modules/MMFRestrictedCustomers tar xf freescout-restricted-customers-0.8.1.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.0", "version": "0.8.1",
"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.0", "version": "0.8.1",
"detailsUrl": "", "detailsUrl": "",
"author": "Millions Missing FRANCE", "author": "Millions Missing FRANCE",
"authorUrl": "info@millionsmissing.fr", "authorUrl": "info@millionsmissing.fr",