mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 08:24:06 +00:00
a2381e44a7
Update Company Service Class Create Documents Service Class Create File Service Class Base64 File Convert Service Class File Upload Storage Service Class
50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Companies\Standards\Rules;
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Companies\DataTransferObjects\UserObject;
|
|
use App\Classes\Modules\Companies\Standards\Validators\CompanyValidation;
|
|
|
|
class CanUpdateCompany extends AbstractRule
|
|
{
|
|
/** @var CompanyValidation */
|
|
private $companyValidation;
|
|
|
|
/**
|
|
* CanCreateUser constructor.
|
|
* @param CompanyValidation $companyValidation
|
|
*/
|
|
public function __construct(CompanyValidation $companyValidation)
|
|
{
|
|
$this->companyValidation = $companyValidation;
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param UserObject $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return $this->companyValidation->validate($object, 'PUT');
|
|
}
|
|
|
|
/**
|
|
* @param UserObject $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
} |