Initial commit: Import existing Laravel project

This commit is contained in:
jeremy bayse
2026-06-15 08:12:33 +02:00
parent 7420d1b466
commit 030d76af53
143 changed files with 21885 additions and 1 deletions

View File

@@ -0,0 +1,49 @@
<?php
namespace App\Policies;
use App\Models\Hardware;
use App\Models\User;
class HardwarePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return true; // Tous les agents connectés peuvent voir la liste du matériel
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Hardware $hardware): bool
{
return true; // Tous les agents connectés peuvent voir les détails d'un équipement
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return true; // Sylvain, Kévin et Jérémy peuvent enregistrer du matériel
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Hardware $hardware): bool
{
return true; // Tous les agents du service technique peuvent modifier une fiche matériel
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Hardware $hardware): bool
{
return true; // Tous les agents du service technique peuvent supprimer un équipement
}
}