role middleware update

This commit is contained in:
2020-03-06 21:02:32 -06:00
parent 0a26a7f3c5
commit 0f2e41a222

View File

@@ -35,27 +35,6 @@ class RequireRole
abort(403, "You don't have the correct role to be in this area.");
}
/*
$ranking = [
'None' => 0,
'Guest' => 1,
'Renter' => 2,
'User' => 3,
'Admin' => 4,
'SuperUser' => 5,
];
$check = UserRole::where('character_id', auth()->user()->character_id)->get(['role']);
if(!isset($check[0]->role)) {
abort(403, "You don't have any roles. You don't belong here.");
}
if($ranking[$check[0]->role] < $ranking[$role]) {
abort(403, "You don't have the correct role to be in this area.");
}
*/
return $next($request);
}
}