diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index dc1c5b1611..d2c8fe25d8 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -478,6 +478,11 @@ class SettingsController extends Controller $setting->two_factor_enabled = null; } else { $setting->two_factor_enabled = $request->input('two_factor_enabled'); + + # remote user login + $setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled'); + $setting->login_common_disabled= (int)$request->input('login_common_disabled'); + $setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url'); } } @@ -486,10 +491,6 @@ class SettingsController extends Controller $setting->pwd_secure_min = (int) $request->input('pwd_secure_min'); $setting->pwd_secure_complexity = ''; - # remote user login - $setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled'); - $setting->login_common_disabled= (int)$request->input('login_common_disabled'); - $setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url'); if ($request->has('pwd_secure_complexity')) { $setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity')); diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 6a4398b2e3..5595b2d2b1 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/app/Notifications/ExpectedCheckinNotification.php b/app/Notifications/ExpectedCheckinNotification.php index d1562832a2..3dc41950d9 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) diff --git a/config/database.php b/config/database.php index c7f0b89d8b..183d30cf5e 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 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 b8f9191a26..aea8509b8b 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); }); } diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 2fc2242649..52ec0da75e 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -17,7 +17,7 @@ else fi # create data directories -for dir in 'data/private_uploads' 'data/uploads' 'data/uploads/avatars' 'data/uploads/barcodes' 'data/uploads/categories' 'data/uploads/companies' 'data/uploads/departments' 'data/uploads/locations' 'data/uploads/manufacturers' 'data/uploads/models' 'data/uploads/suppliers' 'dumps'; do +for dir in 'data/private_uploads' 'data/uploads' 'data/uploads/avatars' 'data/uploads/barcodes' 'data/uploads/categories' 'data/uploads/companies' 'data/uploads/departments' 'data/uploads/locations' 'data/uploads/manufacturers' 'data/uploads/models' 'data/uploads/suppliers' 'dumps' 'keys'; do mkdir -p "/var/lib/snipeit/$dir" done diff --git a/resources/lang/en/admin/settings/general.php b/resources/lang/en/admin/settings/general.php index b1679b1268..753fbb0d71 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', diff --git a/resources/views/accessories/checkout.blade.php b/resources/views/accessories/checkout.blade.php index 74a2878033..295de1454b 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') !!} +
+
diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php index 45ed4bd80e..bc71460b4b 100644 --- a/resources/views/vendor/mail/html/header.blade.php +++ b/resources/views/vendor/mail/html/header.blade.php @@ -1,5 +1,5 @@ - + header_color!='') ? ' style="background-color: '.e($snipeSettings->header_color).'"' : '' !!}> @if (($snipeSettings->show_images_in_email=='1' ) && ($snipeSettings::setupCompleted())) @if ($snipeSettings->brand == '3')