feat: implementation du role Gestionnaire RH et refonte de la gestion des offres
This commit is contained in:
@@ -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.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user