Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class PermissionPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can create models.
*
* @return Response|bool
*/
public function create(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('delete_permissions');
}
}