mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
69 lines
1.4 KiB
PHP
69 lines
1.4 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace App\Policies;
|
||
|
|
||
|
use App\Models\ModVersion;
|
||
|
use App\Models\User;
|
||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||
|
|
||
|
class ModVersionPolicy
|
||
|
{
|
||
|
use HandlesAuthorization;
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can view any mod versions.
|
||
|
*/
|
||
|
public function viewAny(?User $user): bool
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can view the mod version.
|
||
|
*/
|
||
|
public function view(?User $user, ModVersion $modVersion): bool
|
||
|
{
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can create mod versions.
|
||
|
*/
|
||
|
public function create(User $user): bool
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can update the mod version.
|
||
|
*/
|
||
|
public function update(User $user, ModVersion $modVersion): bool
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can delete the mod version.
|
||
|
*/
|
||
|
public function delete(User $user, ModVersion $modVersion): bool
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can restore the mod version.
|
||
|
*/
|
||
|
public function restore(User $user, ModVersion $modVersion): bool
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Determine whether the user can permanently delete the mod version.
|
||
|
*/
|
||
|
public function forceDelete(User $user, ModVersion $modVersion): bool
|
||
|
{
|
||
|
return false;
|
||
|
}
|
||
|
}
|