mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-23 22:44:19 +00:00
45 lines
787 B
PHP
45 lines
787 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Standards\Rules\Rates;
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Currencies\DataTransferObjects\RateObject;
|
|
|
|
class CanDeleteRate extends AbstractRule
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
|
|
if (!\Auth::user()->can('delete currency_rate')) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
/**
|
|
* @param RateObject $object
|
|
* @return bool
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @param RateObject $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} |