You've already forked Atomcms-edit
65 lines
1.3 KiB
PHP
Executable File
65 lines
1.3 KiB
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
|
use Illuminate\Auth\Access\Response;
|
|
|
|
class WebsiteTeamPolicy
|
|
{
|
|
use HandlesAuthorization;
|
|
|
|
/**
|
|
* Determine whether the user can view any models.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function viewAny(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_teams');
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can view the model.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function view(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_teams');
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can create models.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function create(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_teams');
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can update the model.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function update(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_teams');
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can delete the model.
|
|
*
|
|
* @return Response|bool
|
|
*/
|
|
public function delete(User $user)
|
|
{
|
|
return hasHousekeepingPermission('manage_teams');
|
|
}
|
|
}
|