-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix create records and listing companies for various types of permiss…
…ions
- Loading branch information
1 parent
22013f8
commit a895cae
Showing
3 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
* @copyright YetiForce S.A. | ||
* @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com) | ||
* @author Mariusz Krzaczkowski <[email protected]> | ||
* @author Radosław Skrzypczak <[email protected]> | ||
*/ | ||
|
||
namespace App\Controller; | ||
|
@@ -23,9 +24,6 @@ trait EditViewTrait | |
/** @var array Hidden fields */ | ||
protected $hiddenFields = []; | ||
|
||
/** @var string Action name */ | ||
protected $actionName; | ||
|
||
/** | ||
* Check permission. | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* @copyright YetiForce S.A. | ||
* @license YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com) | ||
* @author Mariusz Krzaczkowski <[email protected]> | ||
* @author Radosław Skrzypczak <[email protected]> | ||
*/ | ||
|
||
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'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters