mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-23 14:33:59 +00:00
Merge branch 'dillon/74-admin-workflow' into vapor/development
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ class FetchAdminWFPendingApprovalPOLogic extends AbstractControllerLogic
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanFetchQuestion */ //cief todo: permission update
|
||||
/** @var CanFetchQuestion */
|
||||
private $canFetchQuestion;
|
||||
|
||||
/** @var FetchesBooking */
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class FetchAdminWFPendingFillPOLogic extends AbstractControllerLogic
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanFetchQuestion */ //cief todo: 74 - permission update
|
||||
/** @var CanFetchQuestion */
|
||||
private $canFetchQuestion;
|
||||
|
||||
/** @var FetchesBooking */
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Questionnaires\Standards\Rules;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractRule;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
|
||||
class CanFetchQuestion extends AbstractRule
|
||||
{
|
||||
@@ -13,8 +14,12 @@ class CanFetchQuestion extends AbstractRule
|
||||
*/
|
||||
protected function authorized($object): bool
|
||||
{
|
||||
// TODO Set Authorization rules
|
||||
return true;
|
||||
$roleToCheck = Auth()->user()->type;
|
||||
if (in_array($roleToCheck, RoleTypes::ADMIN_ROLES)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user