From a895cae65f34fd1dd9a8ebb61abe786fd498775c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Skrzypczak?= Date: Wed, 22 Feb 2023 13:02:50 +0100 Subject: [PATCH] Fix create records and listing companies for various types of permissions --- app/Controller/EditViewTrait.php | 4 +--- app/User.php | 3 ++- config/Version.php | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Controller/EditViewTrait.php b/app/Controller/EditViewTrait.php index a4693325..359e6447 100644 --- a/app/Controller/EditViewTrait.php +++ b/app/Controller/EditViewTrait.php @@ -8,6 +8,7 @@ * @copyright YetiForce S.A. * @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com) * @author Mariusz Krzaczkowski + * @author Radosław Skrzypczak */ namespace App\Controller; @@ -23,9 +24,6 @@ trait EditViewTrait /** @var array Hidden fields */ protected $hiddenFields = []; - /** @var string Action name */ - protected $actionName; - /** * Check permission. * diff --git a/app/User.php b/app/User.php index e0f4dc92..2e9ca890 100644 --- a/app/User.php +++ b/app/User.php @@ -5,6 +5,7 @@ * @copyright YetiForce S.A. * @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com) * @author Mariusz Krzaczkowski + * @author Radosław Skrzypczak */ namespace App; @@ -103,7 +104,7 @@ public function getModulesList(): array */ public function getCompanies() { - if ($this->isEmpty('type') || $this->get('type') < 3) { + if ($this->isEmpty('type') || !\in_array($this->get('type'), [3, 4])) { return false; } $companies = Session::get('Companies'); diff --git a/config/Version.php b/config/Version.php index aca0bab8..2e0261df 100644 --- a/config/Version.php +++ b/config/Version.php @@ -19,9 +19,9 @@ class Version /** * @var string Application version. */ - const APP = '6.4.5'; + const APP = '6.4.6'; /** * @var string Date of publication of the application. */ - const DATE = '2022.10.12'; + const DATE = '2023.02.22'; }