feat: implementation du role Gestionnaire RH et refonte de la gestion des offres

This commit is contained in:
jeremy bayse
2026-05-09 11:21:40 +02:00
parent 97a8b9443d
commit 9edf79e8ba
23 changed files with 1223 additions and 232 deletions

View File

@@ -10,7 +10,7 @@ class TenantController extends Controller
{
public function index()
{
if (!auth()->user()->isSuperAdmin()) {
if (!auth()->user()->isSuperAdmin() && !auth()->user()->isGestionnaireRH()) {
abort(403, 'Unauthorized action.');
}
@@ -23,7 +23,7 @@ class TenantController extends Controller
public function store(Request $request)
{
if (!auth()->user()->isSuperAdmin()) {
if (!auth()->user()->isSuperAdmin() && !auth()->user()->isGestionnaireRH()) {
abort(403, 'Unauthorized action.');
}
@@ -38,7 +38,7 @@ class TenantController extends Controller
public function update(Request $request, Tenant $tenant)
{
if (!auth()->user()->isSuperAdmin()) {
if (!auth()->user()->isSuperAdmin() && !auth()->user()->isGestionnaireRH()) {
abort(403, 'Unauthorized action.');
}
@@ -53,7 +53,7 @@ class TenantController extends Controller
public function destroy(Tenant $tenant)
{
if (!auth()->user()->isSuperAdmin()) {
if (!auth()->user()->isSuperAdmin() && !auth()->user()->isGestionnaireRH()) {
abort(403, 'Unauthorized action.');
}