This commit is contained in:
2024-02-17 18:23:29 +01:00
parent e356b039f9
commit fca756b556
2 changed files with 1 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ class UsersController extends Controller
public function destroy(User $user)
{
// About if user is Super Admin or User ID belongs to Auth User
if ($user->hasRole('Super Admin') || $user->id == auth()->user()->id)
if ($user->hasRole('ADMIN') || $user->id == auth()->user()->id)
{
abort(403, 'USER DOES NOT HAVE THE RIGHT PERMISSIONS');
}

View File

@@ -46,7 +46,6 @@ Route::get('/pippo', function (Request $request) {
Route::view('/prova','test')->name('prova');
Route::get('/dashboard', function () {
return view('dashboard');