ldc-gen-game-web/app/Policies/CodePolicy.php
2025-08-29 14:46:51 +02:00

42 lines
897 B
PHP

<?php
namespace App\Policies;
use App\Models\User;
use App\Policies\Rules\UserStaticRules;
class CodePolicy
{
/**
* Determine whether the user can generate models.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function generate(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
/**
* Determine whether the user can export models.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function export(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
/**
* Determine whether the user search models.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function search(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
}