Merge branch 'dillon/44-customer-satisfaction-feedback-project-a' into dillon/44-customer-satisfaction-feedback-project

This commit is contained in:
Dillon
2023-10-07 07:33:07 +08:00
126 changed files with 258 additions and 206 deletions
@@ -10,7 +10,7 @@ use App\Classes\General\Interfaces\DataTransferObject;
abstract class AbstractRule
{
abstract protected function authorized(): bool;
abstract protected function authorized($object): bool;
abstract protected function validators($object): bool;
@@ -26,7 +26,7 @@ abstract class AbstractRule
*/
public function passes(?DataTransferObject $object = null): bool {
try {
if(!$this->authorized()){
if(!$this->authorized($object)){
throw new AccessForbiddenException('You don\'t have permission to preform this action');
}
@@ -43,4 +43,4 @@ abstract class AbstractRule
}
}
}
@@ -26,7 +26,7 @@ class CanAuthenticateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -54,4 +54,4 @@ class CanAuthenticateUser extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanCreateUser extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCrossAuthenticateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -51,4 +51,4 @@ class CanCrossAuthenticateUser extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteUser extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanFetchUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -39,4 +39,4 @@ class CanFetchUser extends AbstractRule
return true;
}
}
}
@@ -33,7 +33,7 @@ class CanGeneratePasswordReset extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -62,4 +62,4 @@ class CanGeneratePasswordReset extends AbstractRule
}
}
}
@@ -13,7 +13,7 @@ class CanListUsers extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -39,4 +39,4 @@ class CanListUsers extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanRegisterUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanRegisterUser extends AbstractRule
{
return true;
}
}
}
@@ -34,7 +34,7 @@ class CanResetPassword extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -62,4 +62,4 @@ class CanResetPassword extends AbstractRule
return $this->passwordResetTokenExists->execute($object->getToken());
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanUpdateUser extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreateAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanCreateAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanDeleteAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanDeleteAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanFetchAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanListAddresses extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanListAddresses extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanUpdateAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanAssignSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanAssignSegment extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -47,4 +47,4 @@ class CanCreateAnnouncement extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteAnnouncement extends AbstractRule
return true;
}
}
}
@@ -11,7 +11,7 @@ class CanListAnnouncements extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -26,7 +26,7 @@ class CanUpdateAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateAnnouncement extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -47,4 +47,4 @@ class CanCreateBank extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteBank extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanListBanks extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -34,4 +34,4 @@ class CanListBanks extends AbstractRule
{
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateBank extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanAssignEmployee extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanAssignEmployee extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanAssignSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanAssignSegment extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateCompany extends AbstractRule
{
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCompanyModule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchCompany extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanListCompanies extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanListCompanies extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanUpdateCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanUpdateCompany extends AbstractRule
{
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreateContact extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanCreateContact extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateCurrency extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanDeleteCurrency extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanFetchCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanFetchCurrency extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanListCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -38,4 +38,4 @@ class CanListCurrency extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateCurrency extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
if (!\Auth::user()->can('add currency_rate')) {
@@ -52,4 +52,4 @@ class CanCreateRate extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -42,4 +42,4 @@ class CanDeleteRate extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanFetchRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchRate extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanListRates extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -42,4 +42,4 @@ class CanListRates extends AbstractRule
return true;
}
}
}
@@ -25,7 +25,7 @@ class CanUpdateRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -55,4 +55,4 @@ class CanUpdateRate extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanApproveDocument extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanApproveDocument extends AbstractRule
return true;
}
}
}
@@ -25,7 +25,7 @@ class CanCreateDocument extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -50,4 +50,4 @@ class CanCreateDocument extends AbstractRule
return true;
}
}
}
@@ -25,7 +25,7 @@ class CanCreateFile extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -50,4 +50,4 @@ class CanCreateFile extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanListDocuments extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
/*
@@ -44,4 +44,4 @@ class CanListDocuments extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanRenderDocument extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanRenderDocument extends AbstractRule
return true;
}
}
}
@@ -25,7 +25,7 @@ class CanUpdateDocument extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -50,4 +50,4 @@ class CanUpdateDocument extends AbstractRule
return true;
}
}
}
@@ -11,7 +11,7 @@ class CanUpdateDocumentReference extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanUpdateDocumentReference extends AbstractRule
return true;
}
}
}
@@ -7,11 +7,13 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\HelpMenu\DataTransferObjects\UrlObject;
use App\Classes\Modules\HelpMenu\Standards\Rules\CanGenerateFeedbackUrl;
use App\Classes\Modules\HelpMenu\Services\CreatesUrl;
use App\Classes\Modules\HelpMenu\DataTransferObjects\GenerateFeedbackUrlObject;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
class GenerateFeedbackUrlLogic extends AbstractControllerLogic
{
@@ -51,7 +53,12 @@ class GenerateFeedbackUrlLogic extends AbstractControllerLogic
*/
public function logic(Request $request) : JsonResponse
{
$this->canGenerateFeedbackUrl->passes();
$object = new GenerateFeedbackUrlObject();
if($request->get('apiKeyExist'))
{
$object = new GenerateFeedbackUrlObject($request->get('apiKeyExist'));
}
$this->canGenerateFeedbackUrl->passes($object);
$shortUrl = Str::random(20);
$originalText = $request->input('system') . '|' . $request->input('customer_marking'). '|' . $request->input('email'). '|' . $request->input('question_set') . '|' . $shortUrl;
@@ -0,0 +1,31 @@
<?php
namespace App\Classes\Modules\HelpMenu\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class GenerateFeedbackUrlObject implements DataTransferObject
{
/** @var string */
private $apiKey;
/**
* GenerateFeedbackUrlObject constructor.
* @param string $apiKey
*/
public function __construct(string $apiKey = "")
{
$this->apiKey = $apiKey;
}
/**
* @return string
*/
public function getApiKey(): string
{
return $this->apiKey;
}
}
@@ -11,7 +11,7 @@ class CanFetchHelpMenuQuestion extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -5,6 +5,7 @@ namespace App\Classes\Modules\HelpMenu\Standards\Rules;
use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\ValueObjects\Constants\RoleTypes;
use Illuminate\Support\Facades\Log;
class CanGenerateFeedbackUrl extends AbstractRule
{
@@ -12,14 +13,20 @@ class CanGenerateFeedbackUrl extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
$roleToCheck = Auth()->user()->type;
if (in_array($roleToCheck, RoleTypes::ADMIN_ROLES)) {
return true;
} else {
return false;
$user = Auth()->user();
if($user){
$roleToCheck = Auth()->user()->type;
if (in_array($roleToCheck, RoleTypes::ADMIN_ROLES)) {
return true;
}
}
else if($object->getApiKey()){
return true;
}
return false;
}
/**
@@ -12,7 +12,7 @@ class CanListHelpMenuQuestions extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
$roleToCheck = Auth()->user()->type;
if (in_array($roleToCheck, RoleTypes::ADMIN_ROLES)) {
@@ -11,7 +11,7 @@ class CanApproveChangeOrderAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -11,7 +11,7 @@ class CanChangeOrderAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -17,7 +17,7 @@ class CanConfirmOrder extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -18,7 +18,7 @@ class CanCreateOrder extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -42,4 +42,4 @@ class CanCreateOrder extends AbstractRule
{
return true;
}
}
}
@@ -17,7 +17,7 @@ class CanCreateOrderRole extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -12,7 +12,7 @@ class CanFetchOrder extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -39,4 +39,4 @@ class CanFetchOrder extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanListOrders extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -17,7 +17,7 @@ class CanUpdateCurrentStep extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanUpdateCurrentStep extends AbstractRule
{
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreatePackingList extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanCreatePackingListPackage extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeletePackingList extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchPackingList extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListPackingLists extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdatePackingList extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanCreateContainer extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeleteContainer extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchContainer extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListContainers extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdateContainer extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanCreatePackage extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -27,7 +27,7 @@ class CanCreatePackageItem extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeletePackage extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchPackage extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListPackages extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdatePackage extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanCreateItem extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeleteItem extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchItem extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListItems extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdatePackageItem extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanCreateReceipt extends AbstractRule
/** @var ReceiptValidation */
private $receiptValidation;
public function __construct(ReceiptValidation $receiptValidation)
{
$this->receiptValidation = $receiptValidation;
@@ -23,7 +23,7 @@ class CanCreateReceipt extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateReceipt extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanCreateReceiptDetail extends AbstractRule
/** @var ReceiptDetailValidation */
private $receiptDetailValidation;
public function __construct(ReceiptDetailValidation $receiptDetailValidation)
{
$this->receiptDetailValidation = $receiptDetailValidation;
@@ -23,7 +23,7 @@ class CanCreateReceiptDetail extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateReceiptDetail extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreateRemark extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeleteRemark extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchRemark extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListRemarks extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdateRemark extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanCreateSchedule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanDeleteSchedule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchSchedule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanListSchedules extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -26,7 +26,7 @@ class CanUpdateSchedule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -25,7 +25,7 @@ class CanCreateConstant extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanCreateConstant extends AbstractRule
{
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateSegment extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteSegment extends AbstractRule
return true;
}
}
}

Some files were not shown because too many files have changed in this diff Show More