mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
dec78bf8d7
Update Currency Selling Logic Class Delete Currency Selling Logic Class Create Currency Log Service Class
45 lines
792 B
PHP
45 lines
792 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Standards\Rules;
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Currencies\DataTransferObjects\CurrencyObject;
|
|
|
|
class CanDeleteCurrency extends AbstractRule
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
|
|
if (!\Auth::user()->can('delete currency')) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return bool
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} |