updated navbar to have correct logistics section.

updated user model hasPermission function
This commit is contained in:
2018-12-05 14:22:59 -06:00
parent c806fde9c8
commit 14bd2d8fb5
2 changed files with 4 additions and 12 deletions

View File

@@ -62,20 +62,12 @@ class User extends Authenticatable
return $this->hasOne('App\Models\EsiToken', 'character_id', 'character_id');
}
public function hasPermission($permission, $perm = true) {
public function hasPermission($permission) {
//Check if the user has a specific permission
if(UserPermission::where(['character_id' => $this->character_id, 'permission' => $permission])->get()) {
if($perm === true) {
return true;
} else {
return false;
}
return true;
} else {
if($perm === true) {
return true;
} else {
return false;
}
return false;
}
}