ldc-com-app-bo/app/Policies/SettingPolicy.php

42 lines
905 B
PHP

<?php
namespace App\Policies;
use App\Models\User;
use App\Policies\Rules\UserStaticRules;
class SettingPolicy
{
/**
* Determine whether the user can view any models.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function viewAny(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
/**
* Determine whether the user can view the model.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function view(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
/**
* Determine whether the user can update the model.
*
* @param \App\Models\User $authUser
* @return boolean
*/
public function update(User $authUser): bool
{
return UserStaticRules::restrictTenant($authUser);
}
}