A free open source IT asset/license management system
Small fixes (#2350)
Daniel Meltzereef8d1609ebb
diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.phpindex 87fc6b458d..571ae184b8 100755--- a/app/Http/Controllers/AssetsController.php+++ b/app/Http/Controllers/AssetsController.php@@ -626,12 +626,12 @@ class AssetsController extends Controllerif ($asset->save()) {if ($request->input('checkin_at') == Carbon::now()->format('Y-m-d')) {- $checkout_at = Carbon::now();+ $checkin_at = Carbon::now();} else {- $checkout_at = $request->input('checkin_at').' 00:00:00';+ $checkin_at = $request->input('checkin_at').' 00:00:00';}- //$checkout_at = e(Input::get('checkin_at'));- $logaction = $asset->createLogRecord('checkin', $asset, $admin, $user, null, e(Input::get('note')), $checkout_at);+ //$checkin_at = e(Input::get('checkin_at'));+ $logaction = $asset->createLogRecord('checkin', $asset, $admin, $user, null, e(Input::get('note')), $checkin_at);$settings = Setting::getSettings();diff --git a/app/Models/User.php b/app/Models/User.phpindex 282447c8b2..69facdb00c 100755--- a/app/Models/User.php+++ b/app/Models/User.php@@ -55,7 +55,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon$user_permissions = json_decode($this->permissions, true);- //If the user is explicitly granted, return false+ //If the user is explicitly granted, return trueif (($user_permissions!='') && ((array_key_exists($section, $user_permissions)) && ($user_permissions[$section]=='1'))) {return true;}diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.phpindex 87f3f95812..2c109d7b32 100644--- a/app/Providers/AuthServiceProvider.php+++ b/app/Providers/AuthServiceProvider.php@@ -205,7 +205,7 @@ class AuthServiceProvider extends ServiceProvider# Components# -----------------------------------------$gate->define('components.view', function ($user) {- if (($user->hasAccess('components.create')) || ($user->hasAccess('admin'))) {+ if (($user->hasAccess('components.view')) || ($user->hasAccess('admin'))) {return true;}});diff --git a/resources/views/licenses/view.blade.php b/resources/views/licenses/view.blade.phpindex 2158409fc8..9a0ec67670 100755--- a/resources/views/licenses/view.blade.php+++ b/resources/views/licenses/view.blade.php@@ -126,14 +126,14 @@@if (!is_null($license->license_name))<tr><td>{{ trans('admin/licenses/form.to_name') }}</td>- <td>{{ nl2br(e($license->license_name)) }}</td>+ <td>{{ $license->license_name }}</td></tr>@endif@if (!is_null($license->license_email))<tr><td>{{ trans('admin/licenses/form.to_email') }}</td>- <td>{{ nl2br(e($license->license_email)) }}</td>+ <td>{{ $license->license_email }}</td></tr>@endif