From 76d0562716a2c8addb1833b84fe2fcd90a3d51e0 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 May 2018 17:34:27 -0700 Subject: [PATCH 01/12] Added last name to expected checkin notification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For non-US countries like Germany where it’s considered rude not to include last name --- app/Notifications/ExpectedCheckinNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Notifications/ExpectedCheckinNotification.php b/app/Notifications/ExpectedCheckinNotification.php index d1562832a..3dc41950d 100644 --- a/app/Notifications/ExpectedCheckinNotification.php +++ b/app/Notifications/ExpectedCheckinNotification.php @@ -61,7 +61,7 @@ class ExpectedCheckinNotification extends Notification return (new MailMessage) ->error() ->subject('Reminder: '.$this->params->present()->name().' checkin deadline approaching') - ->line('Hi, '.$this->params->assignedto->first_name) + ->line('Hi, '.$this->params->assignedto->first_name.' '.$this->params->assignedto->last_name) ->greeting('An asset checked out to you is due to be checked back in on '.$formatted_due.'.') ->line('Asset: '.$this->params->present()->name()) ->line('Serial: '.$this->params->serial) From 15916e66684d636da893f7e2159c507c1ff9061a Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 21 May 2018 17:35:04 -0700 Subject: [PATCH 02/12] Allow checkout to non-user objects even if the object requires checkout --- app/Models/Asset.php | 8 +------- resources/views/hardware/checkout.blade.php | 12 +----------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 6a4398b2e..5595b2d2b 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -189,13 +189,7 @@ class Asset extends Depreciable $this->location_id = $target->location->id; } } - - if ($this->requireAcceptance()) { - if(get_class($target) != User::class) { - throw new CheckoutNotAllowed; - } - $this->accepted="pending"; - } + if ($this->save()) { $this->logCheckout($note, $target); diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 1823db386..4a5203c36 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -47,23 +47,13 @@ @include ('partials.forms.checkout-selector', ['user_select' => 'true','asset_select' => 'true', 'location_select' => 'true']) @include ('partials.forms.edit.user-select', ['translated_name' => trans('general.user'), 'fieldname' => 'assigned_user', 'required'=>'true']) - @if ($asset->requireAcceptance()) -
-
-

- Because this asset category requires acceptance, - it cannot be checked out to another asset or to a location. -

-
-
- @else @include ('partials.forms.edit.asset-select', ['translated_name' => trans('general.asset'), 'fieldname' => 'assigned_asset', 'unselect' => 'true', 'style' => 'display:none;', 'required'=>'true']) @include ('partials.forms.edit.location-select', ['translated_name' => trans('general.location'), 'fieldname' => 'assigned_location', 'style' => 'display:none;', 'required'=>'true']) - @endif +
From 6ec75714f0f9fd38f49570eb5fe20dba7dcb3a8b Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 22 May 2018 14:57:05 -0700 Subject: [PATCH 03/12] Force default srtorage engine --- config/database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.php b/config/database.php index c7f0b89d8..183d30cf5 100755 --- a/config/database.php +++ b/config/database.php @@ -78,7 +78,7 @@ return [ 'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'), 'prefix' => env('DB_PREFIX', null), 'strict' => false, - 'engine' => null, + 'engine' => 'InnoDB', 'unix_socket' => env('DB_SOCKET',''), 'dump_command_path' => env('DB_DUMP_PATH', '/usr/local/bin'), // only the path, so without 'mysqldump' 'dump_command_timeout' => 60 * 5, // 5 minute timeout From 649563457d50089b666933e96fab1af8c0283b7f Mon Sep 17 00:00:00 2001 From: Brian Monroe Date: Mon, 28 May 2018 14:30:18 -0700 Subject: [PATCH 04/12] Added notes field to acessories and consumable checkout pages. Resolves request #5607. (#5608) --- resources/views/accessories/checkout.blade.php | 8 ++++++++ resources/views/consumables/checkout.blade.php | 9 ++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/resources/views/accessories/checkout.blade.php b/resources/views/accessories/checkout.blade.php index 74a287803..295de1454 100755 --- a/resources/views/accessories/checkout.blade.php +++ b/resources/views/accessories/checkout.blade.php @@ -79,6 +79,14 @@
@endif + +
+ +
+ + {!! $errors->first('note', ' :message') !!} +
+
@endif - + +
+ +
+ + {!! $errors->first('note', ' :message') !!} +
+
- {{ Form::checkbox('login_remote_user_enabled', '1', Input::old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal')) }} - {{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }} - {!! $errors->first('login_remote_user_enabled', ':message') !!} -

- {{ trans('admin/settings/general.login_remote_user_enabled_help') }} -

- - {{ Form::label('login_remote_user_custom_logout_url', trans('admin/settings/general.login_remote_user_custom_logout_url_text')) }} - {{ Form::text('login_remote_user_custom_logout_url', Input::old('login_remote_user_custom_logout_url', $setting->login_remote_user_custom_logout_url),array('class' => 'form-control')) }} - {!! $errors->first('login_remote_user_custom_logout_url', ':message') !!} -

- {{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }} -

- - {{ Form::checkbox('login_common_disabled', '1', Input::old('login_common_disabled', $setting->login_common_disabled),array('class' => 'minimal')) }} - {{ Form::label('login_common_disabled', trans('admin/settings/general.login_common_disabled_text')) }} - {!! $errors->first('login_common_disabled', ':message') !!} -

- {{ trans('admin/settings/general.login_common_disabled_help') }} -

+ @if (config('app.lock_passwords')) +

{{ trans('general.feature_disabled') }}

+ @else + {{ Form::checkbox('login_remote_user_enabled', '1', Input::old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal')) }} + {{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }} + {!! $errors->first('login_remote_user_enabled', ':message') !!} +

+ {{ trans('admin/settings/general.login_remote_user_enabled_help') }} +

+ + {{ Form::label('login_remote_user_custom_logout_url', trans('admin/settings/general.login_remote_user_custom_logout_url_text')) }} + {{ Form::text('login_remote_user_custom_logout_url', Input::old('login_remote_user_custom_logout_url', $setting->login_remote_user_custom_logout_url),array('class' => 'form-control')) }} + + {!! $errors->first('login_remote_user_custom_logout_url', ':message') !!} +

+ {{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }} +

+ + {{ Form::checkbox('login_common_disabled', '1', Input::old('login_common_disabled', $setting->login_common_disabled),array('class' => 'minimal')) }} + {{ Form::label('login_common_disabled', trans('admin/settings/general.login_common_disabled_text')) }} + {!! $errors->first('login_common_disabled', ':message') !!} +

+ {{ trans('admin/settings/general.login_common_disabled_help') }} +

+ @endif +
From 102f567cb535f8bb8e21da8181a47a21738f1b62 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 31 May 2018 10:55:13 -0700 Subject: [PATCH 11/12] Fixed typo --- resources/lang/en/admin/settings/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index b1679b126..753fbb0d7 100644 --- a/resources/lang/en/admin/settings/general.php +++ b/resources/lang/en/admin/settings/general.php @@ -86,7 +86,7 @@ return array( 'login_common_disabled_text' => 'Disable other authentication mechanisms', 'login_common_disabled_help' => 'This option disables other authentication mechanisms. Just enable this option if you are sure that your REMOTE_USER login is already working', 'login_remote_user_custom_logout_url_text' => 'Custom logout URL', - 'login_remote_user_custom_logout_url_help' => 'If filled users will get redirected to this URL after the Session of SnipeIT is closed (Logout). This is usefull to close the user sessions of your Authenticationprovider correctly.', + 'login_remote_user_custom_logout_url_help' => 'If filled users will get redirected to this URL after the Session of SnipeIT is closed (Logout). This is useful to close the user sessions of your Authentication provider correctly.', 'logo' => 'Logo', 'full_multiple_companies_support_help_text' => 'Restricting users (including admins) assigned to companies to their company\'s assets.', 'full_multiple_companies_support_text' => 'Full Multiple Companies Support', From 5a6b8bb856c6d949fa1deffff05150c5569eae78 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 31 May 2018 14:21:18 -0700 Subject: [PATCH 12/12] Make default custom field value null --- ...18_04_16_133902_create_custom_field_default_values_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/2018_04_16_133902_create_custom_field_default_values_table.php b/database/migrations/2018_04_16_133902_create_custom_field_default_values_table.php index b8f9191a2..aea8509b8 100644 --- a/database/migrations/2018_04_16_133902_create_custom_field_default_values_table.php +++ b/database/migrations/2018_04_16_133902_create_custom_field_default_values_table.php @@ -17,7 +17,7 @@ class CreateCustomFieldDefaultValuesTable extends Migration $table->increments('id'); $table->integer('asset_model_id'); $table->integer('custom_field_id'); - $table->text('default_value')->nullable(); + $table->text('default_value')->nullable()->default(null); }); }