mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
df4fd497a6
- SECURITY PATCH
43 lines
831 B
PHP
43 lines
831 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Accounting\Standards\Rules;
|
|
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\ValueObjects\Constants\RoleTypes;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class CanListBankStatementDetails extends AbstractRule
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized($object): bool
|
|
{
|
|
if (in_array(Auth::user()->type, RoleTypes::ADMIN_ROLES)) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @param $object
|
|
* @return bool
|
|
* @throws \App\Classes\Exceptions\RequestValidationException
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @param $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
}
|