From 7432e3fb2d68c6e1adc9231825a32dc26f7fd9cd Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 15:28:29 -0800 Subject: [PATCH 01/13] Add @dampfklon as a contributor --- .all-contributorsrc | 9 +++++++++ README.md | 6 ++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 0790d4ee16..a21d12045e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1938,6 +1938,15 @@ "contributions": [ "code" ] + }, + { + "login": "dampfklon", + "name": "Dampfklon", + "avatar_url": "https://avatars1.githubusercontent.com/u/1733625?v=4", + "profile": "https://github.com/dampfklon", + "contributions": [ + "code" + ] } ] } diff --git a/README.md b/README.md index 2e85a4ed60..cbffd40ec8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=master)](https://travis-ci.org/snipe/snipe-it) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade) -[![All Contributors](https://img.shields.io/badge/all_contributors-189-orange.svg?style=flat-square)](#contributors) [![Open Source Helpers](https://www.codetriage.com/snipe/snipe-it/badges/users.svg)](https://www.codetriage.com/snipe/snipe-it) +[![All Contributors](https://img.shields.io/badge/all_contributors-213-orange.svg?style=flat-square)](#contributors) [![Open Source Helpers](https://www.codetriage.com/snipe/snipe-it/badges/users.svg)](https://www.codetriage.com/snipe/snipe-it) [![All Contributors](https://img.shields.io/badge/all_contributors-212-orange.svg?style=flat-square)](#contributors) [![Open Source Helpers](https://www.codetriage.com/snipe/snipe-it/badges/users.svg)](https://www.codetriage.com/snipe/snipe-it) @@ -115,14 +115,12 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken | [
Martin Stub](http://martinstub.dk)
[🌍](#translation-stubben "Translation") | [
Meyer Flavio](https://github.com/meyerf99)
[🌍](#translation-meyerf99 "Translation") | [
Micael Rodrigues](https://github.com/MicaelRodrigues)
[🌍](#translation-MicaelRodrigues "Translation") | [
Mikael Rasmussen](http://rubixy.com/)
[🌍](#translation-mikaelssen "Translation") | [
IxFail](https://github.com/IxFail)
[🌍](#translation-IxFail "Translation") | [
Mohammed Fota](http://www.mohammedfota.com)
[🌍](#translation-MohammedFota "Translation") | [
Moayad Alserihi](https://github.com/omego)
[🌍](#translation-omego "Translation") | | [
saymd](https://github.com/saymd)
[🌍](#translation-saymd "Translation") | [
Patrik Larsson](https://nordsken.se)
[🌍](#translation-pooot "Translation") | [
drcryo](https://github.com/drcryo)
[🌍](#translation-drcryo "Translation") | [
pawel1615](https://github.com/pawel1615)
[🌍](#translation-pawel1615 "Translation") | [
bodrovics](https://github.com/bodrovics)
[🌍](#translation-bodrovics "Translation") | [
priatna](https://github.com/priatna)
[🌍](#translation-priatna "Translation") | [
Fan Jiang](https://amayume.net)
[🌍](#translation-ProfFan "Translation") | | [
ragnarcx](https://github.com/ragnarcx)
[🌍](#translation-ragnarcx "Translation") | [
Rein van Haaren](http://www.reinvanhaaren.nl/)
[🌍](#translation-reinvanhaaren "Translation") | [
Teguh Dwicaksana](http://dheche.songolimo.net)
[🌍](#translation-dheche "Translation") | [
fraccie](https://github.com/FRaccie)
[🌍](#translation-FRaccie "Translation") | [
vinzruzell](https://github.com/vinzruzell)
[🌍](#translation-vinzruzell "Translation") | [
Kevin Austin](http://kevinaustin.com)
[🌍](#translation-vipsystem "Translation") | [
Wira Sandy](http://azuraweb.xyz)
[🌍](#translation-wira-sandy "Translation") | -| [
Илья](https://github.com/GrayHoax)
[🌍](#translation-GrayHoax "Translation") | [
GodUseVPN](https://github.com/godusevpn)
[🌍](#translation-godusevpn "Translation") | [
周周](https://github.com/EngrZhou)
[🌍](#translation-EngrZhou "Translation") | [
Sam](https://github.com/takuy)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=takuy "Code") | [
Azerothian](https://www.illisian.com.au)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Azerothian "Code") | [
Tim Farmer](https://github.com/timothyfarmer)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=timothyfarmer "Code") | [
MariΓ‘n Skrip](https://github.com/mskrip)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=mskrip "Code") | -| [
Godfrey Martinez](https://github.com/Godmartinz)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Godmartinz "Code") | [
bigtreeEdo](https://github.com/bigtreeEdo)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=bigtreeEdo "Code") | [
Colin McNeil](https://colinmcneil.me/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=ColinMcNeil "Code") | [
JoKneeMo](https://github.com/JoKneeMo)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=JoKneeMo "Code") | [
Joshi](http://www.redbridge.se)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=joshi-redbridge "Code") | [
Anthony Burns](https://github.com/anthonypburns)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=anthonypburns "Code") | [
Alexander Chibrikin](http://phpprofi.ru/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=alek13 "Code") | | [
Илья](https://github.com/GrayHoax)
[🌍](#translation-GrayHoax "Translation") | [
GodUseVPN](https://github.com/godusevpn)
[🌍](#translation-godusevpn "Translation") | [
周周](https://github.com/EngrZhou)
[🌍](#translation-EngrZhou "Translation") | [
Sam](https://github.com/takuy)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=takuy "Code") | [
Azerothian](https://www.illisian.com.au)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Azerothian "Code") | [
Wes Hulette](http://macfoo.wordpress.com/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=jwhulette "Code") | [
patrict](https://github.com/patrict)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=patrict "Code") | | [
Dmitriy Minaev](https://github.com/VELIKII-DIVAN)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=VELIKII-DIVAN "Code") | [
liquidhorse](https://github.com/liquidhorse)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=liquidhorse "Code") | [
Jordi Boggiano](https://seld.be/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Seldaek "Code") | [
Ivan Nieto](https://github.com/inietov)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=inietov "Code") | [
Ben RUBSON](https://github.com/benrubson)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=benrubson "Code") | [
NMathar](https://github.com/NMathar)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=NMathar "Code") | [
Steffen](https://github.com/smb)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=smb "Code") | | [
Sxderp](https://github.com/Sxderp)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Sxderp "Code") | [
fanta8897](https://github.com/fanta8897)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=fanta8897 "Code") | [
Andrey Bolonin](https://andreybolonin.com/phpconsulting/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=andreybolonin "Code") | [
shinayoshi](http://www.shinayoshi.net/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=shinayoshi "Code") | [
Hubert](https://github.com/reuser)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=reuser "Code") | [
KeenRivals](https://brashear.me)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=KeenRivals "Code") | [
omyno](https://github.com/omyno)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=omyno "Code") | | [
Evgeny](https://github.com/jackka)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=jackka "Code") | [
Colin Campbell](https://digitalist.se)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=colin-campbell "Code") | [
Ľubomír Kučera](https://github.com/lubo)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=lubo "Code") | [
Martin Meredith](https://www.sourceguru.net)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Mezzle "Code") | [
Tim Farmer](https://github.com/timothyfarmer)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=timothyfarmer "Code") | [
MariΓ‘n Skrip](https://github.com/mskrip)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=mskrip "Code") | [
Godfrey Martinez](https://github.com/Godmartinz)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=Godmartinz "Code") | | [
bigtreeEdo](https://github.com/bigtreeEdo)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=bigtreeEdo "Code") | [
Colin McNeil](https://colinmcneil.me/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=ColinMcNeil "Code") | [
JoKneeMo](https://github.com/JoKneeMo)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=JoKneeMo "Code") | [
Joshi](http://www.redbridge.se)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=joshi-redbridge "Code") | [
Anthony Burns](https://github.com/anthonypburns)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=anthonypburns "Code") | [
johnson-yi](https://github.com/johnson-yi)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=johnson-yi "Code") | [
Sanjay Govind](https://tangentmc.net)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=sanjay900 "Code") | -| [
Peter Upfold](https://peter.upfold.org.uk/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=PeterUpfold "Code") | [
Jared Biel](https://github.com/jbiel)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=jbiel "Code") | +| [
Peter Upfold](https://peter.upfold.org.uk/)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=PeterUpfold "Code") | [
Jared Biel](https://github.com/jbiel)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=jbiel "Code") | [
Dampfklon](https://github.com/dampfklon)
[πŸ’»](https://github.com/snipe/snipe-it/commits?author=dampfklon "Code") | This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! From 6dccf399a51b3d4ac33b10169d365412ba2c4dcd Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 15:51:31 -0800 Subject: [PATCH 02/13] Fixed offset issue for #8732 --- app/Console/Commands/MoveUploadsToNewDisk.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/MoveUploadsToNewDisk.php b/app/Console/Commands/MoveUploadsToNewDisk.php index 95689a8035..a6c93e1735 100644 --- a/app/Console/Commands/MoveUploadsToNewDisk.php +++ b/app/Console/Commands/MoveUploadsToNewDisk.php @@ -88,7 +88,7 @@ class MoveUploadsToNewDisk extends Command $this->info("\nThere are ".count($logos).' files that might be logos.'); $type_count = 0; - for ($l = 0; $l < count($logos); $l++) { + for ($l = 0; $l <= count($logos); $l++) { $type_count++; $filename = basename($logos[$l]); $new_url = Storage::disk('public')->url($logos[$l], file_get_contents($public_upload[$l])); From 7765c873874c7be51fdf84ed570a0fa1f4152103 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 18:47:19 -0800 Subject: [PATCH 03/13] Fixed #8669 - Allow application/xml in SAML upload in Safari --- resources/views/settings/saml.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/settings/saml.blade.php b/resources/views/settings/saml.blade.php index 2f0a0d1e7c..f4a53f6cbe 100644 --- a/resources/views/settings/saml.blade.php +++ b/resources/views/settings/saml.blade.php @@ -101,7 +101,7 @@ + accept="text/xml,application/xml" style="display:none; max-width: 90%">

{{ trans('admin/settings/general.saml_idp_metadata_help') }}

From d2805442ad12a0d7fdb4313de4d0387d3b7a647d Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 18:54:49 -0800 Subject: [PATCH 04/13] Updated Laravel version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cbffd40ec8..95c5da8650 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc. -It is built on [Laravel 5.5](http://laravel.com). +It is built on [Laravel 6](http://laravel.com). Snipe-IT is actively developed and we [release quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](https://snipeitapp.com/demo/).) From 502617716165f0abc65442fe03fb09b602477152 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 18:55:02 -0800 Subject: [PATCH 05/13] Added link to bricelabelle/snipe-it-bulkedit --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 95c5da8650..413abc6e9e 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ Since the release of the JSON REST API, several third-party developers have been - [Snipe-IT plugin for Jira Service Desk (beta)](https://marketplace.atlassian.com/apps/1220379/snipe-it-for-jira-service-desk-beta?hosting=cloud&tab=overview) - for the upcoming Snipe-IT v5 only - [Python 3 CSV importer](https://github.com/gastamper/snipeit-csvimporter) - allows importing assets into Snipe-IT based on Item Name rather than Asset Tag. - [Snipe-IT Kubernetes Helm Chart](https://github.com/t3n/helm-charts/tree/master/snipeit) - For more information, [click here](https://hub.helm.sh/charts/t3n/snipeit). - +- [Snipe-IT Bulk Edit](https://github.com/bricelabelle/snipe-it-bulkedit) - Google Script files to use Google Sheets as a bulk checkout/checkin/edit tool for Snipe-it. + As these were created by third-parties, Snipe-IT cannot provide support for these project, and you should contact the developers directly if you need assistance. Additionally, Snipe-IT makes no guarantees as to the reliability, accuracy or maintainability of these libraries. Use at your own risk. :) ----- From c7d752fb65b64f372aeafd0452145f16be07ea98 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 19:50:01 -0800 Subject: [PATCH 06/13] Added S3 url into CSP --- app/Http/Middleware/SecurityHeaders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/SecurityHeaders.php b/app/Http/Middleware/SecurityHeaders.php index 5f77c21e14..4a75d6ec29 100644 --- a/app/Http/Middleware/SecurityHeaders.php +++ b/app/Http/Middleware/SecurityHeaders.php @@ -106,7 +106,7 @@ class SecurityHeaders $csp_policy[] = "connect-src 'self'"; $csp_policy[] = "object-src 'none'"; $csp_policy[] = "font-src 'self' data:"; - $csp_policy[] = "img-src 'self' data: ".config('app.url')." https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"; + $csp_policy[] = "img-src 'self' data: ".config('app.url')." ".env('PUBLIC_AWS_URL')." https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"; $csp_policy = join(';', $csp_policy); $response->headers->set('Content-Security-Policy', $csp_policy); } From 9db191f0b2476680c5cfc687db57ddbc0924fee7 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 21:46:06 -0800 Subject: [PATCH 07/13] Fixes for #8732 - Flysystem paths, migrator script --- app/Console/Commands/MoveUploadsToNewDisk.php | 46 +++++++++---------- app/Http/Requests/ImageUploadRequest.php | 3 +- resources/views/hardware/view.blade.php | 8 ++-- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/app/Console/Commands/MoveUploadsToNewDisk.php b/app/Console/Commands/MoveUploadsToNewDisk.php index a6c93e1735..9bd3a94aba 100644 --- a/app/Console/Commands/MoveUploadsToNewDisk.php +++ b/app/Console/Commands/MoveUploadsToNewDisk.php @@ -47,33 +47,33 @@ class MoveUploadsToNewDisk extends Command } $delete_local = $this->argument('delete_local'); - $public_uploads['accessories'] = glob('storage/app/public/accessories'."/*.*"); - $public_uploads['assets'] = glob('storage/app/public/assets'."/*.*"); - $public_uploads['avatars'] = glob('storage/app/public/avatars'."/*.*"); - $public_uploads['categories'] = glob('storage/app/public/categories'."/*.*"); - $public_uploads['companies'] = glob('storage/app/public/companies'."/*.*"); - $public_uploads['components'] = glob('storage/app/public/components'."/*.*"); - $public_uploads['consumables'] = glob('storage/app/public/consumables'."/*.*"); - $public_uploads['departments'] = glob('storage/app/public/departments'."/*.*"); - $public_uploads['locations'] = glob('storage/app/public/locations'."/*.*"); - $public_uploads['manufacturers'] = glob('storage/app/public/manufacturers'."/*.*"); - $public_uploads['suppliers'] = glob('storage/app/public/suppliers'."/*.*"); - $public_uploads['assetmodels'] = glob('storage/app/public/models'."/*.*"); + $public_uploads['accessories'] = glob('public/accessories'."/*.*"); + $public_uploads['assets'] = glob('public/assets'."/*.*"); + $public_uploads['avatars'] = glob('public/avatars'."/*.*"); + $public_uploads['categories'] = glob('public/categories'."/*.*"); + $public_uploads['companies'] = glob('public/companies'."/*.*"); + $public_uploads['components'] = glob('public/components'."/*.*"); + $public_uploads['consumables'] = glob('public/consumables'."/*.*"); + $public_uploads['departments'] = glob('public/departments'."/*.*"); + $public_uploads['locations'] = glob('public/locations'."/*.*"); + $public_uploads['manufacturers'] = glob('public/manufacturers'."/*.*"); + $public_uploads['suppliers'] = glob('public/suppliers'."/*.*"); + $public_uploads['assetmodels'] = glob('public/models'."/*.*"); // iterate files foreach($public_uploads as $public_type => $public_upload) { $type_count = 0; - $this->info("\nThere are ".count($public_upload).' PUBLIC '.$public_type.' files.'); + $this->info("- There are ".count($public_upload).' PUBLIC '.$public_type.' files.'); for ($i = 0; $i < count($public_upload); $i++) { $type_count++; $filename = basename($public_upload[$i]); try { - Storage::disk('public')->put($public_type.'/'.$filename, file_get_contents($public_upload[$i])); - $new_url = Storage::disk('public')->url($public_type.'/'.$filename, $filename); + Storage::disk('public')->put('uploads/'.public_type.'/'.$filename, file_get_contents($public_upload[$i])); + $new_url = Storage::disk('public')->url('uploads/'.$public_type.'/'.$filename, $filename); $this->info($type_count.'. PUBLIC: '.$filename.' was copied to '.$new_url); } catch (\Exception $e) { \Log::debug($e); @@ -84,15 +84,16 @@ class MoveUploadsToNewDisk extends Command } - $logos = glob('public/uploads'."/setting*.*"); - $this->info("\nThere are ".count($logos).' files that might be logos.'); + $logos = glob("public/uploads/setting*.*"); + $this->info("- There are ".count($logos).' files that might be logos.'); $type_count = 0; - for ($l = 0; $l <= count($logos); $l++) { + foreach ($logos as $logo) { + $this->info($logo); $type_count++; - $filename = basename($logos[$l]); - $new_url = Storage::disk('public')->url($logos[$l], file_get_contents($public_upload[$l])); - $this->info($type_count.'. LOGO: '.$filename.' was copied to '.$new_url); + $filename = basename($logo); + Storage::disk('public')->put('uploads/'.$filename, file_get_contents($logo)); + $this->info($type_count.'. LOGO: '.$filename.' was copied to '.env('PUBLIC_AWS_URL').'/uploads/'.$filename); } $private_uploads['assets'] = glob('storage/private_uploads/assets'."/*.*"); @@ -107,8 +108,7 @@ class MoveUploadsToNewDisk extends Command foreach($private_uploads as $private_type => $private_upload) { - $this->info("\nThere are ".count($private_upload).' PRIVATE '.$private_type.' files.'); - // $this->info(print_r($private_upload, true)); + $this->info("- There are ".count($private_upload).' PRIVATE '.$private_type.' files.'); $type_count = 0; for ($x = 0; $x < count($private_upload); $x++) { diff --git a/app/Http/Requests/ImageUploadRequest.php b/app/Http/Requests/ImageUploadRequest.php index 2b43f9194d..73518880d6 100644 --- a/app/Http/Requests/ImageUploadRequest.php +++ b/app/Http/Requests/ImageUploadRequest.php @@ -49,7 +49,8 @@ class ImageUploadRequest extends Request $type = strtolower(class_basename(get_class($item))); if (is_null($path)) { - $path = str_plural($type); + $path = 'uploads/'; + $path .= str_plural($type); if ($type == 'assetmodel') { $path = 'models'; diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 121286459b..e5e5be6a85 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -731,14 +731,14 @@ @if ($asset->image) @elseif (($asset->model) && ($asset->model->image!='')) @endif From 896ce3456e840377e612e30efa97c8b4803ce35c Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 22:18:49 -0800 Subject: [PATCH 08/13] Possible fix for #8670 - LDAP users deactivated on login --- app/Http/Controllers/Auth/LoginController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 3ed9940118..e4034e6204 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -234,6 +234,7 @@ class LoginController extends Controller if ($user = Auth::user()) { $user->last_login = \Carbon::now(); + $user->activated = 1; $user->save(); } // Redirect to the users page From fc6a33ad38ccf42bbf2737cc6f50085ef556a07b Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 22:19:16 -0800 Subject: [PATCH 09/13] Added some LDAP debugging - related to #8670 --- app/Services/LdapAd.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Services/LdapAd.php b/app/Services/LdapAd.php index 5e495dc920..5f68c83549 100644 --- a/app/Services/LdapAd.php +++ b/app/Services/LdapAd.php @@ -292,12 +292,19 @@ class LdapAd extends LdapAdConfiguration * if so, check the Active Directory User Account Control Flags */ if ($user->hasAttribute($user->getSchema()->userAccountControl())) { + \Log::debug('This is AD - userAccountControl is'. $user->getSchema()->userAccountControl()); $activeStatus = (in_array($user->getUserAccountControl(), self::AD_USER_ACCOUNT_CONTROL_FLAGS)) ? 1 : 0; } else { + + \Log::debug('This looks like LDAP'); // If there is no activated flag, assume this is handled via the OU and activate the users if (false == $this->ldapSettings['ldap_active_flag']) { + \Log::debug('ldap_active_flag is false - no ldap_active_flag is set'); $activeStatus = 1; } + + \Log::debug('ldap_active_flag is not false - do nothing? that seems dumb/wrong?'); + } return $activeStatus; From 9d2363741e192ea82d67c5ae0c0b9369371bb2ce Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 22:25:07 -0800 Subject: [PATCH 10/13] Improved 2FA reset layout --- resources/views/users/view.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index a2846c51f9..852d3a3d80 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -285,12 +285,12 @@ {{ trans('admin/users/general.two_factor_enrolled') }}
-
+
{!! ($user->two_factor_active_and_enrolled()) ? ' '.trans('general.yes') : ' '.trans('general.no') !!}
@if ((Auth::user()->isSuperUser()) && ($snipeSettings->two_factor_enabled!='0') && ($snipeSettings->two_factor_enabled!='')) -
+
{{ trans('admin/settings/general.two_factor_reset') }} @@ -679,7 +679,7 @@ $(function () { dataType: 'json', success: function (data) { - $("#two_factor_reset_toggle").html('').html('{{ trans('general.no') }}'); + $("#two_factor_reset_toggle").html('').html(' {{ trans('general.no') }}'); $("#two_factor_reseticon").html(''); $("#two_factor_resetstatus").html('' + data.message); From b2a8af2fa9d67eaf62333db7c88db8f712802a34 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Nov 2020 22:46:51 -0800 Subject: [PATCH 11/13] Fixed #8647 - Added additional help info on importer page --- public/js/build/app.js | Bin 446909 -> 446805 bytes public/js/dist/all.js | Bin 816022 -> 815918 bytes public/mix-manifest.json | 4 ++-- .../js/components/importer/importer-file.vue | 8 +++----- resources/lang/en/general.php | 8 ++------ resources/views/importer/import.blade.php | 9 +++++++-- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/public/js/build/app.js b/public/js/build/app.js index b29082883df32c9f27a0ffa7b7b7d401c378e38a..7a4875b797aa8426e63ce02631db1763be526a5e 100644 GIT binary patch delta 123 zcmdnHSo-QB>4p}@7N!>FEi7qOETK`B$4p}@7N!>FEi7qOEFqzmhSLwGvE81&zJyJH(RljDgN#zs^~>1Ux9?A9 zE8t=_QmUQ)u$WDg(PFz{5t}^+SiriPO^4B9`sorjx$P6G*fR# jV%gqM#cKCv`^;*#P<=L#4N98RSCzA9ZkJunW}yZEB|$9% diff --git a/public/js/dist/all.js b/public/js/dist/all.js index 1aeb7d4b2dfc11b904b090829a73c8be6f84bdcf..0b4328a385756701988cdc972fcc826ee501a668 100644 GIT binary patch delta 4061 zcmZWseOMINxqoKP*`3*4B+93t5O!l>MwSJPsfvt%fX1q*nMtLtfD1dYBg-tz4x$mv zmuXF+3F$_UN$jJhP2!as6D9RLX`3%^(&*Dh^I?*kYE+1=rpA2qCR)_m`yR0Ey-)v{ z-+9k@&wJkUJLi4RJKN5c?)y{ei@|~2FKz*a3D5k_3EH0yfZE`91KDh~@u&KDq?T!e z{b!26m&B_>8Cdfh@x;A_X^ADD34EEB_--f&HkJ*q8~tV_&JM@NT7zAmjX01d`^g&y zmpXXQ=LhF;Dw$EjO+lKjklml+JhGvLJI1NBu9Uk74$<;kxg|WOkdG?=i@!JjZ0RX)b>sRt-g?$<=%ifq~WY_`PX>=|O%mm!#Q}?bqe?YeH5Y*}sy{ zpc_~6&j>I+HO#lV0UtB@{!~EUef;~(ukY^X^8qGrj0YzyH=567(C8=_S8qiH!x5`v{ehdEtI2d~CQ~YTcVCpmc zzHu<&&;kA_fW|@or(pUUfQh_nlKo{#*}Pw)yMNDn;0Vd{@ACx!AHL7;0$B3_{~w^8 zcbu;WipjbU`K=({^b!AtTL2ckr7-j3GyDi#GWyN}|6C?AIghIQyF0@nTZcX8WuZ6uOfAqEvVexVSXh^AdA1?xa(=!> zuTDajxJg=|#nM5&HmY|pB~`KmX58N?muVy^7pdUSs$5t`qg!$j=D?a^#&ye{tGC81 zu;GwMy(0-?@M-3(VpjA$4P>Cp~28km?#m*$~DcCNi%w0sP*=tVEu>zMd& z7Ta#jd!Ya+pn9aXlu14cX$4TTO?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