ldc-crm/app/Policies/ServicePolicy.php
Jérémy Munsch 72a5b73902 overhaull UI upgrade
using crud policies
2021-09-09 16:08:37 +02:00

29 lines
680 B
PHP

<?php
namespace App\Policies;
use App\Policies\Rules\UserStaticRules as USR;
use Kwaadpepper\CrudPolicies\Policies\RootPolicy;
class ServicePolicy extends RootPolicy
{
/**
* Init policies on call
*
* @return void
*/
public function setPolicies()
{
/**
* This first rule to return true in a policy action authorises the action
*/
$this->policies = [
'service' => [
'viewAny' => USR::make('everyOne'),
'view' => USR::make('everyOne'),
'update' => USR::make('everyOne'),
'create' => USR::make('everyOne')
]
];
}
}