addPermission to AdminController
This commit is contained in:
@@ -28,7 +28,7 @@ class AdminController extends Controller
|
||||
//Check to see if the character already has the permission
|
||||
$check = DB::table('user_permissions')->where(['character_id' => $character->character_id, 'permission' => $permission])->get();
|
||||
//If the user doesn't have the permission then add it into the table
|
||||
if($check === null) {
|
||||
if($check == null) {
|
||||
$perm = new UserPermission;
|
||||
$perm->character_id = $character->character_id;
|
||||
$perm->permission = $permission;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<a class="dropdown-item" href="/fleets/register">Register</a>
|
||||
</div>
|
||||
</li>
|
||||
@if(Auth()->user()->hasPermission('logistics.minion'))
|
||||
@if(auth()->user()->hasPermission('logistics.minion'))
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdoownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Logistics</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropDownMenuLink">
|
||||
@@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth()->user()->hasPermission('structure.operator'))
|
||||
@if(auth()->user()->hasPermission('structure.operator'))
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdoownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Structures</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropDownMenuLink">
|
||||
|
||||
Reference in New Issue
Block a user