30 lines
733 B
PHP
30 lines
733 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Policies\Rules\UserStaticRules as USR;
|
|
use Kwaadpepper\CrudPolicies\Policies\RootPolicy;
|
|
|
|
class QuestionPolicy 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 = [
|
|
'question' => [
|
|
'viewAny' => USR::make('everyOne'),
|
|
'view' => USR::make('everyOne'),
|
|
'update' => USR::make('everyOne'),
|
|
'create' => USR::make('everyOne'),
|
|
'delete' => USR::make('everyOne')
|
|
]
|
|
];
|
|
}
|
|
}
|