70 lines
1.7 KiB
PHP
70 lines
1.7 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies;
|
|
|
|
use Illuminate\Foundation\Auth\User as AuthUser;
|
|
use App\Models\Gutachter;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
|
|
class GutachterPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
public function viewAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('ViewAny:Gutachter');
|
|
}
|
|
|
|
public function view(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('View:Gutachter');
|
|
}
|
|
|
|
public function create(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('Create:Gutachter');
|
|
}
|
|
|
|
public function update(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('Update:Gutachter');
|
|
}
|
|
|
|
public function delete(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('Delete:Gutachter');
|
|
}
|
|
|
|
public function restore(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('Restore:Gutachter');
|
|
}
|
|
|
|
public function forceDelete(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('ForceDelete:Gutachter');
|
|
}
|
|
|
|
public function forceDeleteAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('ForceDeleteAny:Gutachter');
|
|
}
|
|
|
|
public function restoreAny(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('RestoreAny:Gutachter');
|
|
}
|
|
|
|
public function replicate(AuthUser $authUser, Gutachter $gutachter): bool
|
|
{
|
|
return $authUser->can('Replicate:Gutachter');
|
|
}
|
|
|
|
public function reorder(AuthUser $authUser): bool
|
|
{
|
|
return $authUser->can('Reorder:Gutachter');
|
|
}
|
|
|
|
} |