From fd73bee8505b766d102cb2003ae6bb6e0437dc92 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:38:05 -0800 Subject: [PATCH 01/32] Fixed hardcoded string and added new checkout count to accessory view Signed-off-by: snipe --- resources/views/accessories/view.blade.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 82d7c8201a..59ff1b9c80 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -327,13 +327,22 @@
- Number remaining + {{ trans('admin/accessories/general.remaining') }}
{{ $accessory->numRemaining() }}
+
+
+ {{ trans('general.checked_out') }} +
+
+ {{ $accessory->users_count }} +
+
+ @can('checkout', \App\Models\Accessory::class) From 56090bc64534f73d9e2cab10ff4f70e4d97d65ef Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:38:35 -0800 Subject: [PATCH 02/32] Re-ordered notes to be more consistent, fixed missing iCheck class Signed-off-by: snipe --- resources/views/accessories/edit.blade.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/views/accessories/edit.blade.php b/resources/views/accessories/edit.blade.php index d6233d4e5a..c16e57cb22 100755 --- a/resources/views/accessories/edit.blade.php +++ b/resources/views/accessories/edit.blade.php @@ -21,22 +21,24 @@ @include ('partials.forms.edit.purchase_cost') @include ('partials.forms.edit.quantity') @include ('partials.forms.edit.minimum_quantity') - +@include ('partials.forms.edit.notes') @if ($item->image)
- {{ Form::checkbox('image_delete') }} - - {!! $errors->first('image_delete', '') !!} + +
+ +
@endif -@include ('partials.forms.edit.notes') - @include ('partials.forms.edit.image-upload') @stop From 46e3e8a3dd9b80e1c33b0a3af951ec547f8b638c Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:39:53 -0800 Subject: [PATCH 03/32] Added new users_count field to API Signed-off-by: snipe --- app/Presenters/AccessoryPresenter.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/Presenters/AccessoryPresenter.php b/app/Presenters/AccessoryPresenter.php index 7d77acc8d7..cc4f9badfc 100644 --- a/app/Presenters/AccessoryPresenter.php +++ b/app/Presenters/AccessoryPresenter.php @@ -80,19 +80,25 @@ class AccessoryPresenter extends Presenter ], [ 'field' => 'qty', 'searchable' => false, - 'sortable' => false, - 'title' => trans('admin/accessories/general.total'), - ], [ - 'field' => 'min_qty', - 'searchable' => false, 'sortable' => true, - 'title' => trans('general.min_amt'), + 'title' => trans('admin/accessories/general.total'), ], [ 'field' => 'remaining_qty', 'searchable' => false, 'sortable' => false, 'visible' => false, 'title' => trans('admin/accessories/general.remaining'), + ],[ + 'field' => 'users_count', + 'searchable' => false, + 'sortable' => true, + 'visible' => true, + 'title' => trans('general.checked_out'), + ], [ + 'field' => 'min_qty', + 'searchable' => false, + 'sortable' => true, + 'title' => trans('general.min_amt'), ], [ 'field' => 'purchase_date', 'searchable' => true, From dceb77d4d4a70df6a1ab0b4a70b1bf0ad500e64a Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:40:20 -0800 Subject: [PATCH 04/32] Refactored numRemaining, removed unnecessary numCheckout Signed-off-by: snipe --- app/Models/Accessory.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index 3f2004b047..d39d653382 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -327,20 +327,6 @@ class Accessory extends SnipeModel return null; } - /** - * Check how many items within an accessory are checked out - * - * @author [A. Gianotto] [] - * @since [v5.0] - * @return int - */ - public function numCheckedOut() - { - $checkedout = 0; - $checkedout = $this->users->count(); - - return $checkedout; - } /** * Check how many items of an accessory remain @@ -351,11 +337,11 @@ class Accessory extends SnipeModel */ public function numRemaining() { - $checkedout = $this->users->count(); + $checkedout = $this->users_count; $total = $this->qty; $remaining = $total - $checkedout; - return $remaining; + return (int) $remaining; } /** From 90c16318201b45fa233e07ca19f0e4f8a38c7c54 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:40:35 -0800 Subject: [PATCH 05/32] Added users_count to transformer for API Signed-off-by: snipe --- app/Http/Transformers/AccessoriesTransformer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Transformers/AccessoriesTransformer.php b/app/Http/Transformers/AccessoriesTransformer.php index 6f254b3b87..00c30f9ea2 100644 --- a/app/Http/Transformers/AccessoriesTransformer.php +++ b/app/Http/Transformers/AccessoriesTransformer.php @@ -38,7 +38,8 @@ class AccessoriesTransformer 'purchase_cost' => Helper::formatCurrencyOutput($accessory->purchase_cost), 'order_number' => ($accessory->order_number) ? e($accessory->order_number) : null, 'min_qty' => ($accessory->min_amt) ? (int) $accessory->min_amt : null, - 'remaining_qty' => $accessory->numRemaining(), + 'remaining_qty' => (int) $accessory->numRemaining(), + 'users_count' => $accessory->users_count, 'created_at' => Helper::getFormattedDateObject($accessory->created_at, 'datetime'), 'updated_at' => Helper::getFormattedDateObject($accessory->updated_at, 'datetime'), From 60eab08735187044240c3f180867411c9b772813 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:41:07 -0800 Subject: [PATCH 06/32] =?UTF-8?q?Added=20`->with(=E2=80=98users=20as=20use?= =?UTF-8?q?rs=5Fcount=E2=80=99)`=20in=20Accessory=20query?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- .../Accessories/AccessoriesController.php | 74 +++++++++---------- .../Controllers/Api/AccessoriesController.php | 5 +- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/app/Http/Controllers/Accessories/AccessoriesController.php b/app/Http/Controllers/Accessories/AccessoriesController.php index d1af79adf1..96f83d7665 100755 --- a/app/Http/Controllers/Accessories/AccessoriesController.php +++ b/app/Http/Controllers/Accessories/AccessoriesController.php @@ -127,45 +127,45 @@ class AccessoriesController extends Controller */ public function update(ImageUploadRequest $request, $accessoryId = null) { - if (is_null($accessory = Accessory::find($accessoryId))) { + if ($accessory = Accessory::withCount('users as users_count')->find($accessoryId)) { + + $validator = Validator::make($request->all(), [ + "qty" => "required|numeric|min:$accessory->users_count" + ]); + + if ($validator->fails()) { + return redirect()->back() + ->withErrors($validator) + ->withInput(); + } + + $this->authorize($accessory); + + // Update the accessory data + $accessory->name = request('name'); + $accessory->location_id = request('location_id'); + $accessory->min_amt = request('min_amt'); + $accessory->category_id = request('category_id'); + $accessory->company_id = Company::getIdForCurrentUser(request('company_id')); + $accessory->manufacturer_id = request('manufacturer_id'); + $accessory->order_number = request('order_number'); + $accessory->model_number = request('model_number'); + $accessory->purchase_date = request('purchase_date'); + $accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost')); + $accessory->qty = request('qty'); + $accessory->supplier_id = request('supplier_id'); + $accessory->notes = request('notes'); + + $accessory = $request->handleImages($accessory); + + // Was the accessory updated? + if ($accessory->save()) { + return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.update.success')); + } + } else { return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist')); } - $min = $accessory->numCheckedOut(); - $validator = Validator::make($request->all(), [ - "qty" => "required|numeric|min:$min" - ]); - - if ($validator->fails()) { - return redirect()->back() - ->withErrors($validator) - ->withInput(); - } - - $this->authorize($accessory); - - // Update the accessory data - $accessory->name = request('name'); - $accessory->location_id = request('location_id'); - $accessory->min_amt = request('min_amt'); - $accessory->category_id = request('category_id'); - $accessory->company_id = Company::getIdForCurrentUser(request('company_id')); - $accessory->manufacturer_id = request('manufacturer_id'); - $accessory->order_number = request('order_number'); - $accessory->model_number = request('model_number'); - $accessory->purchase_date = request('purchase_date'); - $accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost')); - $accessory->qty = request('qty'); - $accessory->supplier_id = request('supplier_id'); - $accessory->notes = request('notes'); - - $accessory = $request->handleImages($accessory); - - // Was the accessory updated? - if ($accessory->save()) { - return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.update.success')); - } - return redirect()->back()->withInput()->withErrors($accessory->getErrors()); } @@ -217,7 +217,7 @@ class AccessoriesController extends Controller */ public function show($accessoryID = null) { - $accessory = Accessory::find($accessoryID); + $accessory = Accessory::withCount('users as users_count')->find($accessoryID); $this->authorize('view', $accessory); if (isset($accessory->id)) { return view('accessories/view', compact('accessory')); diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php index a894dc3760..fd21ebaf3a 100644 --- a/app/Http/Controllers/Api/AccessoriesController.php +++ b/app/Http/Controllers/Api/AccessoriesController.php @@ -41,10 +41,13 @@ class AccessoriesController extends Controller 'min_amt', 'company_id', 'notes', + 'users_count', + 'qty', ]; - $accessories = Accessory::select('accessories.*')->with('category', 'company', 'manufacturer', 'users', 'location', 'supplier'); + $accessories = Accessory::select('accessories.*')->with('category', 'company', 'manufacturer', 'users', 'location', 'supplier') + ->withCount('users as users_count'); if ($request->filled('search')) { $accessories = $accessories->TextSearch($request->input('search')); From 2bdf3d3f44cc460c26f68949891ea16c5f0025c8 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 21 Jan 2023 14:44:10 -0800 Subject: [PATCH 07/32] Missed a few strong HTML tags Signed-off-by: snipe --- resources/views/accessories/view.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/accessories/view.blade.php b/resources/views/accessories/view.blade.php index 59ff1b9c80..fd31722204 100644 --- a/resources/views/accessories/view.blade.php +++ b/resources/views/accessories/view.blade.php @@ -290,7 +290,7 @@ @if ($accessory->company)
- {{ trans('general.company')}} + {{ trans('general.company')}}
{{ $accessory->company->name }} @@ -302,7 +302,7 @@ @if ($accessory->category)
- {{ trans('general.category')}} + {{ trans('general.category')}}
{{ $accessory->category->name }} From dc155846ca11d404aed416bf7bc0bc64f2252b1b Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 23 Jan 2023 21:49:17 -0800 Subject: [PATCH 08/32] =?UTF-8?q?Hoist=20the=20autorization=20higher=20in?= =?UTF-8?q?=20the=20stack=20so=20we=E2=80=99re=20not=20doing=20logic=20or?= =?UTF-8?q?=20math=20when=20the=20user=20isn=E2=80=99t=20authorized=20to?= =?UTF-8?q?=20touch=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- app/Http/Controllers/Accessories/AccessoriesController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Accessories/AccessoriesController.php b/app/Http/Controllers/Accessories/AccessoriesController.php index 96f83d7665..f0b54a9498 100755 --- a/app/Http/Controllers/Accessories/AccessoriesController.php +++ b/app/Http/Controllers/Accessories/AccessoriesController.php @@ -63,6 +63,7 @@ class AccessoriesController extends Controller public function store(ImageUploadRequest $request) { $this->authorize(Accessory::class); + // create a new model instance $accessory = new Accessory(); @@ -82,7 +83,6 @@ class AccessoriesController extends Controller $accessory->supplier_id = request('supplier_id'); $accessory->notes = request('notes'); - $accessory = $request->handleImages($accessory); // Was the accessory created? @@ -129,6 +129,8 @@ class AccessoriesController extends Controller { if ($accessory = Accessory::withCount('users as users_count')->find($accessoryId)) { + $this->authorize($accessory); + $validator = Validator::make($request->all(), [ "qty" => "required|numeric|min:$accessory->users_count" ]); @@ -139,7 +141,7 @@ class AccessoriesController extends Controller ->withInput(); } - $this->authorize($accessory); + // Update the accessory data $accessory->name = request('name'); From cafe8f3074276c33aba4cf7537c008de14f12351 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 24 Jan 2023 16:20:20 -0500 Subject: [PATCH 09/32] notification for slack message --- resources/views/consumables/checkout.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/consumables/checkout.blade.php b/resources/views/consumables/checkout.blade.php index f768f78484..85cec320e2 100644 --- a/resources/views/consumables/checkout.blade.php +++ b/resources/views/consumables/checkout.blade.php @@ -60,7 +60,7 @@ @if ($snipeSettings->slack_endpoint!='') - A slack message will be sent + {{ trans('general.slack_msg_note') }} @endif
From 3ba79600fb6e163c9afec105a345cfabeef07c56 Mon Sep 17 00:00:00 2001 From: akemidx Date: Tue, 24 Jan 2023 18:17:49 -0500 Subject: [PATCH 10/32] checkin limit for the components checkin --- resources/lang/en/admin/components/general.php | 1 + resources/views/components/checkin.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lang/en/admin/components/general.php b/resources/lang/en/admin/components/general.php index f7689a7ad1..5d93036054 100644 --- a/resources/lang/en/admin/components/general.php +++ b/resources/lang/en/admin/components/general.php @@ -12,4 +12,5 @@ return array( 'remaining' => 'Remaining', 'total' => 'Total', 'update' => 'Update Component', + 'checkin_limit' => 'Amount checked in must be equal to or less than this amount' ); diff --git a/resources/views/components/checkin.blade.php b/resources/views/components/checkin.blade.php index 8dca260443..55822fb9cf 100644 --- a/resources/views/components/checkin.blade.php +++ b/resources/views/components/checkin.blade.php @@ -42,7 +42,7 @@
-

Must be {{ $component_assets->assigned_qty }} or less.

+

{{ trans(admin/components/general.checkin_limit) }}: {{ $component_assets->assigned_qty }}

{!! $errors->first('checkin_qty', '') !!}
From 91cf683f3db002299d9237c1411f4969804ed339 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 10 Nov 2022 17:14:37 +0000 Subject: [PATCH 11/32] Re-do the entire SCIM config so it no longer inherits --- app/Models/SnipeSCIMConfig.php | 328 ++++++++++++++++++++------------- 1 file changed, 195 insertions(+), 133 deletions(-) diff --git a/app/Models/SnipeSCIMConfig.php b/app/Models/SnipeSCIMConfig.php index 36a9ac855c..ea442bbdda 100644 --- a/app/Models/SnipeSCIMConfig.php +++ b/app/Models/SnipeSCIMConfig.php @@ -12,94 +12,9 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig { public function getUserConfig() { - $config = parent::getUserConfig(); - // Much of this is copied verbatim from the library, then adjusted for our needs - $config['class'] = SCIMUser::class; - unset($config['mapping']['example:name:space']); - - $config['map_unmapped'] = false; // anything we don't explicitly map will _not_ show up. - - $core_namespace = 'urn:ietf:params:scim:schemas:core:2.0:User'; - $core = $core_namespace.':'; - $mappings =& $config['mapping'][$core_namespace]; //grab this entire key, we don't want to be repeating ourselves - - //username - *REQUIRED* - $config['validations'][$core.'userName'] = 'required'; - $mappings['userName'] = AttributeMapping::eloquent('username'); - - //human name - *FIRST NAME REQUIRED* - $config['validations'][$core.'name.givenName'] = 'required'; - $config['validations'][$core.'name.familyName'] = 'string'; //not required - - $mappings['name']['familyName'] = AttributeMapping::eloquent("last_name"); - $mappings['name']['givenName'] = AttributeMapping::eloquent("first_name"); - $mappings['name']['formatted'] = (new AttributeMapping())->ignoreWrite()->setRead( - function (&$object) { - return $object->getFullNameAttribute(); - } - ); - - // externalId support - $config['validations'][$core.'externalId'] = 'string|nullable'; // not required, but supported mostly just for Okta - // note that the mapping is *not* namespaced like the other $mappings - $config['mapping']['externalId'] = AttributeMapping::eloquent('scim_externalid'); - - $config['validations'][$core.'emails'] = 'nullable|array'; // emails are not required in Snipe-IT... - $config['validations'][$core.'emails.*.value'] = 'email'; // ...(had to remove the recommended 'required' here) - - $mappings['emails'] = [[ - "value" => AttributeMapping::eloquent("email"), - "display" => null, - "type" => AttributeMapping::constant("work")->ignoreWrite(), - "primary" => AttributeMapping::constant(true)->ignoreWrite() - ]]; - - //active - $config['validations'][$core.'active'] = 'boolean'; - - $mappings['active'] = AttributeMapping::eloquent('activated'); - - //phone - $config['validations'][$core.'phoneNumbers'] = 'nullable|array'; - $config['validations'][$core.'phoneNumbers.*.value'] = 'string'; // another one where want to say 'we don't _need_ a phone number, but if you have one it better have a value. - - $mappings['phoneNumbers'] = [[ - "value" => AttributeMapping::eloquent("phone"), - "display" => null, - "type" => AttributeMapping::constant("work")->ignoreWrite(), - "primary" => AttributeMapping::constant(true)->ignoreWrite() - ]]; - - //address - $config['validations'][$core.'addresses'] = 'nullable|array'; - $config['validations'][$core.'addresses.*.streetAddress'] = 'string'; - $config['validations'][$core.'addresses.*.locality'] = 'string'; - $config['validations'][$core.'addresses.*.region'] = 'nullable|string'; - $config['validations'][$core.'addresses.*.postalCode'] = 'nullable|string'; - $config['validations'][$core.'addresses.*.country'] = 'string'; - - $mappings['addresses'] = [[ - 'type' => AttributeMapping::constant("work")->ignoreWrite(), - 'formatted' => AttributeMapping::constant("n/a")->ignoreWrite(), // TODO - is this right? This doesn't look right. - 'streetAddress' => AttributeMapping::eloquent("address"), - 'locality' => AttributeMapping::eloquent("city"), - 'region' => AttributeMapping::eloquent("state"), - 'postalCode' => AttributeMapping::eloquent("zip"), - 'country' => AttributeMapping::eloquent("country"), - 'primary' => AttributeMapping::constant(true)->ignoreWrite() //this isn't in the example? - ]]; - - //title - $config['validations'][$core.'title'] = 'string'; - $mappings['title'] = AttributeMapping::eloquent('jobtitle'); - - //Preferred Language - $config['validations'][$core.'preferredLanguage'] = 'string'; - $mappings['preferredLanguage'] = AttributeMapping::eloquent('locale'); - - /* + /* more snipe-it attributes I'd like to check out (to map to 'enterprise' maybe?): - website - notes? @@ -108,66 +23,213 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig - company_id to "organization?" */ - $enterprise_namespace = 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User'; - $ent = $enterprise_namespace.':'; - // we remove the 'example' namespace and add the Enterprise one - $config['mapping']['schemas'] = AttributeMapping::constant( [$core_namespace, $enterprise_namespace] )->ignoreWrite(); + $user_prefix = 'urn:ietf:params:scim:schemas:core:2.0:User:'; + $enterprise_prefix = 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:'; - $config['validations'][$ent.'employeeNumber'] = 'string'; - $config['validations'][$ent.'department'] = 'string'; - $config['validations'][$ent.'manager'] = 'nullable'; - $config['validations'][$ent.'manager.value'] = 'string'; + return [ - $config['mapping'][$enterprise_namespace] = [ - 'employeeNumber' => AttributeMapping::eloquent('employee_num'), - 'department' =>(new AttributeMapping())->setAdd( // FIXME parent? - function ($value, &$object) { - $department = Department::where("name", $value)->first(); - if ($department) { - $object->department_id = $department->id; - } - } - )->setReplace( - function ($value, &$object) { - $department = Department::where("name", $value)->first(); - if ($department) { - $object->department_id = $department->id; + // Set to 'null' to make use of auth.providers.users.model (App\User::class) + 'class' => SCIMUser::class, + + 'validations' => [ + $user_prefix . 'userName' => 'required', + $user_prefix . 'name.givenName' => 'required', + $user_prefix . 'name.familyName' => 'string', + $user_prefix . 'externalId' => 'string|nullable', + $user_prefix . 'emails' => 'nullable|array', + $user_prefix . 'emails.*.value' => 'email', + $user_prefix . 'active' => 'boolean', + $user_prefix . 'phoneNumbers' => 'nullable|array', + $user_prefix . 'phoneNumbers.*.value' => 'string', + $user_prefix . 'addresses' => 'nullable|array', + $user_prefix . 'addresses.*.streetAddress' => 'string', + $user_prefix . 'addresses.*.locality' => 'string', + $user_prefix . 'addresses.*.region' => 'nullable|string', + $user_prefix . 'addresses.*.postalCode' => 'nullable|string', + $user_prefix . 'addresses.*.country' => 'string', + $user_prefix . 'title' => 'string', + $user_prefix . 'preferredLanguage' => 'string', + + // Enterprise validations: + $enterprise_prefix . 'employeeNumber' => 'string', + $enterprise_prefix . 'department' => 'string', + $enterprise_prefix . 'manager' => 'nullable', + $enterprise_prefix . 'manager.value' => 'string' + ], + + 'singular' => 'User', + 'schema' => [Schema::SCHEMA_USER], + + //eager loading + 'withRelations' => [], + 'map_unmapped' => false, +// 'unmapped_namespace' => 'urn:ietf:params:scim:schemas:laravel:unmapped', + 'description' => 'User Account', + + // Map a SCIM attribute to an attribute of the object. + 'mapping' => [ + + 'id' => AttributeMapping::eloquent("id")->disableWrite(), + + 'externalId' => AttributeMapping::eloquent('scim_externalid'), // FIXME - I have a PR that changes a lot of this. + + 'meta' => [ + 'created' => AttributeMapping::eloquent("created_at")->disableWrite(), + 'lastModified' => AttributeMapping::eloquent("updated_at")->disableWrite(), + + 'location' => (new AttributeMapping())->setRead( + function ($object) { + return route( + 'scim.resource', + [ + 'resourceType' => 'Users', + 'resourceObject' => $object->id + ] + ); } - } - )->setRead( - function (&$object) { - return $object->department ? $object->department->name : null; - } - ), - 'manager' => [ - // FIXME - manager writes are disabled. This kinda works but it leaks errors all over the place. Not cool. - // '$ref' => (new AttributeMapping())->ignoreWrite()->ignoreRead(), - // 'displayName' => (new AttributeMapping())->ignoreWrite()->ignoreRead(), - // NOTE: you could probably do a 'plain' Eloquent mapping here, but we don't for future-proofing - 'value' => (new AttributeMapping())->setAdd( - function ($value, &$object) { - $manager = User::find($value); - if ($manager) { - $object->manager_id = $manager->id; + )->disableWrite(), + + 'resourceType' => AttributeMapping::constant("User") + ], + + 'schemas' => AttributeMapping::constant( + [ + 'urn:ietf:params:scim:schemas:core:2.0:User', + 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User' + ] + )->ignoreWrite(), + + 'urn:ietf:params:scim:schemas:core:2.0:User' => [ + + 'userName' => AttributeMapping::eloquent("username"), + + 'name' => [ + 'formatted' => (new AttributeMapping())->ignoreWrite()->setRead( + function (&$object) { + return $object->getFullNameAttribute(); + } + ), + 'familyName' => AttributeMapping::eloquent("last_name"), + 'givenName' => AttributeMapping::eloquent("first_name"), + 'middleName' => null, + 'honorificPrefix' => null, + 'honorificSuffix' => null + ], + + 'displayName' => null, + 'nickName' => null, + 'profileUrl' => null, + 'title' => AttributeMapping::eloquent('jobtitle'), + 'userType' => null, + 'preferredLanguage' => AttributeMapping::eloquent('locale'), // Section 5.3.5 of [RFC7231] + 'locale' => null, // see RFC5646 + 'timezone' => null, // see RFC6557 + 'active' => AttributeMapping::eloquent('activated'), + + 'password' => AttributeMapping::eloquent('password')->disableRead(), + + // Multi-Valued Attributes + 'emails' => [[ + "value" => AttributeMapping::eloquent("email"), + "display" => null, + "type" => AttributeMapping::constant("work")->ignoreWrite(), + "primary" => AttributeMapping::constant(true)->ignoreWrite() + ]], + + 'phoneNumbers' => [[ + "value" => AttributeMapping::eloquent("phone"), + "display" => null, + "type" => AttributeMapping::constant("work")->ignoreWrite(), + "primary" => AttributeMapping::constant(true)->ignoreWrite() + ]], + + 'ims' => [[ + "value" => null, + "display" => null, + "type" => null, + "primary" => null + ]], // Instant messaging addresses for the User + + 'photos' => [[ + "value" => null, + "display" => null, + "type" => null, + "primary" => null + ]], + + 'addresses' => [[ + 'type' => AttributeMapping::constant("work")->ignoreWrite(), + 'formatted' => AttributeMapping::constant("n/a")->ignoreWrite(), // TODO - is this right? This doesn't look right. + 'streetAddress' => AttributeMapping::eloquent("address"), + 'locality' => AttributeMapping::eloquent("city"), + 'region' => AttributeMapping::eloquent("state"), + 'postalCode' => AttributeMapping::eloquent("zip"), + 'country' => AttributeMapping::eloquent("country"), + 'primary' => AttributeMapping::constant(true)->ignoreWrite() //this isn't in the example? + ]], + + 'groups' => [[ + 'value' => null, + '$ref' => null, + 'display' => null, + 'type' => null, + 'type' => null + ]], + + 'entitlements' => null, + 'roles' => null, + 'x509Certificates' => null + ], + + 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User' => [ + 'employeeNumber' => AttributeMapping::eloquent('employee_num'), + 'department' => (new AttributeMapping())->setAdd( // FIXME parent? + function ($value, &$object) { + $department = Department::where("name", $value)->first(); + if ($department) { + $object->department_id = $department->id; + } } - } )->setReplace( function ($value, &$object) { - $manager = User::find($value); - if ($manager) { - $object->manager_id = $manager->id; + $department = Department::where("name", $value)->first(); + if ($department) { + $object->department_id = $department->id; } } )->setRead( function (&$object) { - return $object->manager_id; - } + return $object->department ? $object->department->name : null; + } ), + 'manager' => [ + // FIXME - manager writes are disabled. This kinda works but it leaks errors all over the place. Not cool. + // '$ref' => (new AttributeMapping())->ignoreWrite()->ignoreRead(), + // 'displayName' => (new AttributeMapping())->ignoreWrite()->ignoreRead(), + // NOTE: you could probably do a 'plain' Eloquent mapping here, but we don't for future-proofing + 'value' => (new AttributeMapping())->setAdd( + function ($value, &$object) { + $manager = User::find($value); + if ($manager) { + $object->manager_id = $manager->id; + } + } + )->setReplace( + function ($value, &$object) { + $manager = User::find($value); + if ($manager) { + $object->manager_id = $manager->id; + } + } + )->setRead( + function (&$object) { + return $object->manager_id; + } + ), + ] + ] ] ]; - - return $config; } - } From cfe9c687f980dfab7656fcaffe7675a8bc1c1b9d Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 4 Jan 2023 12:17:08 -0800 Subject: [PATCH 12/32] Mark a bunch of SCIM config as nullable --- app/Models/SnipeSCIMConfig.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Models/SnipeSCIMConfig.php b/app/Models/SnipeSCIMConfig.php index ea442bbdda..77cbf01c1a 100644 --- a/app/Models/SnipeSCIMConfig.php +++ b/app/Models/SnipeSCIMConfig.php @@ -35,27 +35,27 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig 'validations' => [ $user_prefix . 'userName' => 'required', $user_prefix . 'name.givenName' => 'required', - $user_prefix . 'name.familyName' => 'string', - $user_prefix . 'externalId' => 'string|nullable', + $user_prefix . 'name.familyName' => 'nullable|string', + $user_prefix . 'externalId' => 'nullable|string', $user_prefix . 'emails' => 'nullable|array', - $user_prefix . 'emails.*.value' => 'email', + $user_prefix . 'emails.*.value' => 'nullable|email', $user_prefix . 'active' => 'boolean', $user_prefix . 'phoneNumbers' => 'nullable|array', - $user_prefix . 'phoneNumbers.*.value' => 'string', + $user_prefix . 'phoneNumbers.*.value' => 'nullable|string', $user_prefix . 'addresses' => 'nullable|array', - $user_prefix . 'addresses.*.streetAddress' => 'string', - $user_prefix . 'addresses.*.locality' => 'string', + $user_prefix . 'addresses.*.streetAddress' => 'nullable|string', + $user_prefix . 'addresses.*.locality' => 'nullable|string', $user_prefix . 'addresses.*.region' => 'nullable|string', $user_prefix . 'addresses.*.postalCode' => 'nullable|string', - $user_prefix . 'addresses.*.country' => 'string', - $user_prefix . 'title' => 'string', - $user_prefix . 'preferredLanguage' => 'string', + $user_prefix . 'addresses.*.country' => 'nullable|string', + $user_prefix . 'title' => 'nullable|string', + $user_prefix . 'preferredLanguage' => 'nullable|string', // Enterprise validations: - $enterprise_prefix . 'employeeNumber' => 'string', - $enterprise_prefix . 'department' => 'string', + $enterprise_prefix . 'employeeNumber' => 'nullable|string', + $enterprise_prefix . 'department' => 'nullable|string', $enterprise_prefix . 'manager' => 'nullable', - $enterprise_prefix . 'manager.value' => 'string' + $enterprise_prefix . 'manager.value' => 'nullable|string' ], 'singular' => 'User', From c5d3b3ab8155f485eef6b64af70205be22f75044 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 11 Jan 2023 17:15:52 -0800 Subject: [PATCH 13/32] Change out the SCIM config for a fixed one; update our fork of the SCIM-server --- composer.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.lock b/composer.lock index bf8cb1f758..d6067c5e27 100644 --- a/composer.lock +++ b/composer.lock @@ -78,12 +78,12 @@ "source": { "type": "git", "url": "https://github.com/grokability/laravel-scim-server.git", - "reference": "2c7ecc450eee59234e059ec2e7724b2d8f3a8369" + "reference": "9e8dd2d3958d3c3c05d0a99fe6475361ad9e9419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/grokability/laravel-scim-server/zipball/2c7ecc450eee59234e059ec2e7724b2d8f3a8369", - "reference": "2c7ecc450eee59234e059ec2e7724b2d8f3a8369", + "url": "https://api.github.com/repos/grokability/laravel-scim-server/zipball/9e8dd2d3958d3c3c05d0a99fe6475361ad9e9419", + "reference": "9e8dd2d3958d3c3c05d0a99fe6475361ad9e9419", "shasum": "" }, "require": { @@ -133,7 +133,7 @@ "support": { "source": "https://github.com/grokability/laravel-scim-server/tree/master" }, - "time": "2022-11-22T20:26:54+00:00" + "time": "2023-01-12T00:32:07+00:00" }, { "name": "asm89/stack-cors", From cd573c484ddc19218be1407dcc66e3f329127e54 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 26 Jan 2023 12:48:41 -0800 Subject: [PATCH 14/32] Change the SCIM_STANDARDS_COMPLIANCE config to default to 'true' --- config/scim.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/scim.php b/config/scim.php index d7d578efc2..4e343cd3a6 100644 --- a/config/scim.php +++ b/config/scim.php @@ -3,6 +3,6 @@ return [ "trace" => env("SCIM_TRACE",false), // below, if we ever get 'sure' that we can change this default to 'true' we should - "omit_main_schema_in_return" => env('SCIM_STANDARDS_COMPLIANCE', false), + "omit_main_schema_in_return" => env('SCIM_STANDARDS_COMPLIANCE', true), "publish_routes" => false, ]; From 37f5cfa8ce0844edc65cc4e329d8a70a8fc6f845 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Jan 2023 17:02:53 -0800 Subject: [PATCH 15/32] Added edit button for fieldsets Signed-off-by: snipe --- resources/views/custom_fields/index.blade.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/resources/views/custom_fields/index.blade.php b/resources/views/custom_fields/index.blade.php index 08c43cdd7b..d2435d7db5 100644 --- a/resources/views/custom_fields/index.blade.php +++ b/resources/views/custom_fields/index.blade.php @@ -69,8 +69,18 @@ @endforeach + + + + @can('update', $fieldset) + + + {{ trans('button.edit') }} + + @endcan + @can('delete', $fieldset) - {{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete']) }} + {{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete','style' => 'display:inline-block']) }} @if($fieldset->models->count() > 0) @else @@ -78,6 +88,7 @@ @endif {{ Form::close() }} @endcan + @endforeach From a16604285c5d8460f559af3c5eadbffa433c06cd Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Jan 2023 17:03:07 -0800 Subject: [PATCH 16/32] Normalize the fieldset form Signed-off-by: snipe --- .../custom_fields/fieldsets/edit.blade.php | 58 ++++--------------- 1 file changed, 11 insertions(+), 47 deletions(-) diff --git a/resources/views/custom_fields/fieldsets/edit.blade.php b/resources/views/custom_fields/fieldsets/edit.blade.php index 04885891ec..a43769255d 100644 --- a/resources/views/custom_fields/fieldsets/edit.blade.php +++ b/resources/views/custom_fields/fieldsets/edit.blade.php @@ -1,49 +1,13 @@ -@extends('layouts.default') +@extends('layouts/edit-form', [ + 'createText' => trans('admin/custom_fields/general.create_fieldset') , + 'updateText' => trans('admin/custom_fields/general.update_fieldset'), + 'formAction' => (isset($item->id)) ? route('fieldsets.update', ['fieldset' => $item->id]) : route('fieldsets.store'), +]) + +@section('inputFields') + + @include ('partials.forms.edit.name', ['translated_name' => trans('general.name')]) + + -{{-- Page title --}} -@section('title') - {{ trans('admin/custom_fields/general.create_fieldset') }} -@parent -@stop - -@section('header_right') - - {{ trans('general.back') }} -@stop - - -{{-- Page content --}} -@section('content') -
-
- - {{ Form::open(['route' => 'fieldsets.store', 'class'=>'form-horizontal']) }} - -
-
- - -
- -
- - {!! $errors->first('name', '') !!} -
-
- -
- - -
- {{ Form::close() }} -
-
-

{{ trans('admin/custom_fields/general.about_fieldsets_title') }}

-

{{ trans('admin/custom_fields/general.about_fieldsets_text') }}

-
-
@stop From 583a0412fedba46f36598c5ddc65eb461d55ccc8 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Jan 2023 17:03:23 -0800 Subject: [PATCH 17/32] Added edit fieldsets translations Signed-off-by: snipe --- .../Controllers/CustomFieldsetsController.php | 61 +++++++++++++------ .../lang/en/admin/custom_fields/general.php | 3 + 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/app/Http/Controllers/CustomFieldsetsController.php b/app/Http/Controllers/CustomFieldsetsController.php index c7c00a7bd2..bee0f38e27 100644 --- a/app/Http/Controllers/CustomFieldsetsController.php +++ b/app/Http/Controllers/CustomFieldsetsController.php @@ -75,9 +75,9 @@ class CustomFieldsetsController extends Controller */ public function create() { - $this->authorize('create', CustomFieldset::class); + $this->authorize('create', CustomField::class); - return view('custom_fields.fieldsets.edit'); + return view('custom_fields.fieldsets.edit')->with('item', new CustomFieldset()); } /** @@ -91,7 +91,7 @@ class CustomFieldsetsController extends Controller */ public function store(Request $request) { - $this->authorize('create', CustomFieldset::class); + $this->authorize('create', CustomField::class); $cfset = new CustomFieldset([ 'name' => e($request->get('name')), @@ -110,31 +110,52 @@ class CustomFieldsetsController extends Controller } /** - * What the actual fuck, Brady? + * Presents edit form for fieldset * - * @todo Uhh, build this? - * @author [Brady Wetherington] [] + * @author [A. Gianotto] [] * @param int $id - * @since [v1.8] - * @return Fuckall + * @since [v6.0.14] + * @return Redirect + * @throws \Illuminate\Auth\Access\AuthorizationException */ public function edit($id) { - // + $this->authorize('create', CustomField::class); + + if ($fieldset = CustomFieldset::find($id)) { + return view('custom_fields.fieldsets.edit')->with('item', $fieldset); + } + + return redirect()->route('fields.index')->with('error', trans('admin/custom_fields/general.fieldset_does_not_exist', ['id' => $id])); + } /** - * GET IN THE SEA BRADY. + * Saves updated fieldset data * - * @todo Uhh, build this too? - * @author [Brady Wetherington] [] + * @author [A. Gianotto] [] * @param int $id - * @since [v1.8] - * @return Fuckall + * @since [v6.0.14] + * @return Redirect + * @throws \Illuminate\Auth\Access\AuthorizationException */ - public function update($id) + public function update(Request $request, $id) { - // + $this->authorize('create', CustomField::class); + + if ($fieldset = CustomFieldset::find($id)) { + + $fieldset->name = $request->input('name'); + + if ($fieldset->save()) { + return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/general.fieldset_updated')); + } + + return redirect()->back()->withInput()->withErrors($fieldset->getErrors()); + + } + + return redirect()->route('fields.index')->with('error', trans('admin/custom_fields/general.fieldset_does_not_exist', ['id' => $id])); } /** @@ -148,7 +169,7 @@ class CustomFieldsetsController extends Controller */ public function destroy($id) { - $fieldset = CustomFieldset::find($id); + $fieldset = CustomField::find($id); $this->authorize('delete', $fieldset); @@ -175,7 +196,7 @@ class CustomFieldsetsController extends Controller */ public function associate(Request $request, $id) { - $set = CustomFieldset::find($id); + $set = CustomField::find($id); $this->authorize('update', $set); @@ -202,7 +223,7 @@ class CustomFieldsetsController extends Controller */ public function makeFieldRequired($fieldset_id, $field_id) { - $this->authorize('update', CustomFieldset::class); + $this->authorize('update', CustomField::class); $field = CustomField::findOrFail($field_id); $fieldset = CustomFieldset::findOrFail($fieldset_id); $fields[$field->id] = ['required' => 1]; @@ -220,7 +241,7 @@ class CustomFieldsetsController extends Controller */ public function makeFieldOptional($fieldset_id, $field_id) { - $this->authorize('update', CustomFieldset::class); + $this->authorize('update', CustomField::class); $field = CustomField::findOrFail($field_id); $fieldset = CustomFieldset::findOrFail($fieldset_id); $fields[$field->id] = ['required' => 0]; diff --git a/resources/lang/en/admin/custom_fields/general.php b/resources/lang/en/admin/custom_fields/general.php index 92bf240a76..9dae380aa5 100644 --- a/resources/lang/en/admin/custom_fields/general.php +++ b/resources/lang/en/admin/custom_fields/general.php @@ -27,6 +27,9 @@ return [ 'used_by_models' => 'Used By Models', 'order' => 'Order', 'create_fieldset' => 'New Fieldset', + 'update_fieldset' => 'Update Fieldset', + 'fieldset_does_not_exist' => 'Fieldset :id does not exist', + 'fieldset_updated' => 'Fieldset updated', 'create_fieldset_title' => 'Create a new fieldset', 'create_field' => 'New Custom Field', 'create_field_title' => 'Create a new custom field', From 22b0b9b090b0fc85fa1209cd6fa3a978666383d4 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Jan 2023 17:05:41 -0800 Subject: [PATCH 18/32] Fixed gates on fieldsets Signed-off-by: snipe --- .../Controllers/Api/CustomFieldsetsController.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Api/CustomFieldsetsController.php b/app/Http/Controllers/Api/CustomFieldsetsController.php index 18da1b67c2..27da7733cd 100644 --- a/app/Http/Controllers/Api/CustomFieldsetsController.php +++ b/app/Http/Controllers/Api/CustomFieldsetsController.php @@ -33,7 +33,7 @@ class CustomFieldsetsController extends Controller */ public function index() { - $this->authorize('index', CustomFieldset::class); + $this->authorize('index', CustomField::class); $fieldsets = CustomFieldset::withCount('fields as fields_count', 'models as models_count')->get(); return (new CustomFieldsetsTransformer)->transformCustomFieldsets($fieldsets, $fieldsets->count()); @@ -49,7 +49,7 @@ class CustomFieldsetsController extends Controller */ public function show($id) { - $this->authorize('view', CustomFieldset::class); + $this->authorize('view', CustomField::class); if ($fieldset = CustomFieldset::find($id)) { return (new CustomFieldsetsTransformer)->transformCustomFieldset($fieldset); } @@ -68,7 +68,7 @@ class CustomFieldsetsController extends Controller */ public function update(Request $request, $id) { - $this->authorize('update', CustomFieldset::class); + $this->authorize('update', CustomField::class); $fieldset = CustomFieldset::findOrFail($id); $fieldset->fill($request->all()); @@ -89,7 +89,7 @@ class CustomFieldsetsController extends Controller */ public function store(Request $request) { - $this->authorize('create', CustomFieldset::class); + $this->authorize('create', CustomField::class); $fieldset = new CustomFieldset; $fieldset->fill($request->all()); @@ -109,7 +109,7 @@ class CustomFieldsetsController extends Controller */ public function destroy($id) { - $this->authorize('delete', CustomFieldset::class); + $this->authorize('delete', CustomField::class); $fieldset = CustomFieldset::findOrFail($id); $modelsCount = $fieldset->models->count(); @@ -136,7 +136,7 @@ class CustomFieldsetsController extends Controller */ public function fields($id) { - $this->authorize('view', CustomFieldset::class); + $this->authorize('view', CustomField::class); $set = CustomFieldset::findOrFail($id); $fields = $set->fields; @@ -153,7 +153,7 @@ class CustomFieldsetsController extends Controller */ public function fieldsWithDefaultValues($fieldsetId, $modelId) { - $this->authorize('view', CustomFieldset::class); + $this->authorize('view', CustomField::class); $set = CustomFieldset::findOrFail($fieldsetId); From c2854f1bcb79a9f0fbe8342a4993e9c375b16f57 Mon Sep 17 00:00:00 2001 From: Ben Periton <104396+benperiton@users.noreply.github.com> Date: Tue, 18 Oct 2022 08:00:36 +0100 Subject: [PATCH 19/32] Update database.php Although Postgres is not officially supported, it does seem to work ok, but to help a little bit with the Docker image, this is non-breaking change but allows the env file to specify the pgsql connection port --- config/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/database.php b/config/database.php index 9d94454db2..36440b2127 100755 --- a/config/database.php +++ b/config/database.php @@ -102,6 +102,7 @@ return [ 'pgsql' => [ 'driver' => 'pgsql', 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '5432'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), From ccc7b78f623678ada9ef37a5ec34c45f76521b3c Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Mon, 30 Jan 2023 15:11:41 -0600 Subject: [PATCH 20/32] Store the acceptance dates with format YYY-mm-dd --- app/Http/Controllers/Account/AcceptanceController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Account/AcceptanceController.php b/app/Http/Controllers/Account/AcceptanceController.php index 59c8f88430..726e164ba8 100644 --- a/app/Http/Controllers/Account/AcceptanceController.php +++ b/app/Http/Controllers/Account/AcceptanceController.php @@ -222,8 +222,8 @@ class AcceptanceController extends Controller 'item_model' => $display_model, 'item_serial' => $item->serial, 'eula' => $item->getEula(), - 'check_out_date' => Carbon::parse($acceptance->created_at)->format($branding_settings->date_display_format), - 'accepted_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format), + 'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'), + 'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d'), 'assigned_to' => $assigned_to, 'company_name' => $branding_settings->site_name, 'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null, @@ -273,7 +273,7 @@ class AcceptanceController extends Controller 'item_tag' => $item->asset_tag, 'item_model' => $display_model, 'item_serial' => $item->serial, - 'declined_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format), + 'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'), 'assigned_to' => $assigned_to, 'company_name' => $branding_settings->site_name, 'date_settings' => $branding_settings->date_display_format, From a7a578bf51462d52ef5fdf091ad3c114e3f8ba51 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Tue, 31 Jan 2023 00:13:44 -0600 Subject: [PATCH 21/32] Added head only logo to be used as default in apple-touch-icon --- public/img/snipe-logo-bug.png | Bin 0 -> 22482 bytes resources/views/layouts/default.blade.php | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 public/img/snipe-logo-bug.png diff --git a/public/img/snipe-logo-bug.png b/public/img/snipe-logo-bug.png new file mode 100644 index 0000000000000000000000000000000000000000..423a5b74906c4a1f67dab665a59a6731f0dbaa98 GIT binary patch literal 22482 zcmV*zKs>*RP)H{cw zH-Z76V6&ipv!U)TchtcW2+lsP_+<{^%8EQ%`R*@K-3_ zBFI98GDHaoIf0*S*mLLDMW{2ZU@fTkpm-I~EFvhS5D`%P2$9Vfy55&U`lD5tO+9y2 zgS<+iJ}Sr+2w{{05l{+{6TpuyXq_wXsz9U*_&b61AoYkc08rS<@)W{nHuP;wT*$g# zD(R0-VK(*L6$M!Z@>jqc1PLo}2221%3Mln|Htf0cf(+W1R`x~(ZUlL=QoKooI98pA zSZ@`A^dtP;hQ5vC7oy&mV)~;}m@loos}^B{z?*=DN-0AuL=h1{nIMB4K;)qpTi>Rh z-XMyrMR-5(Dy3A5AfQZLK|pL&gOq~*E3oaw*85UUe-sMyrIo$aBHSjh0YwiGR453* zTx^a^bDo-`aZrMwQcCy%yl_|ABD39~J_hnCpaQUz6H`&JmBvIEge?M_HuPyF6G1690|%aWeJgucA$$bnkeXsA4=k&e8C3PM$u&>zZGSatI8FkVE80z`t$iyYs(Q zfbLxBC8IE#R`v#gwMzIHO5G|V74}pX5waC|c4v3-`0>XXJ9`!pMN54t~)=d8;N^sPbhUWIyhI?YoJLgm4IqnNBFh z7eBFQ;{}iPyj0UmLSZ)b^foH^kO=P*=u&{QC~Ck=?JSQ@Ze{oJU8J-2L>8)ZRa9l- zcKBrkN;fIzk)$8KXUPaS!Z(Wwy%g#z3tFKDMckF=@hu3Ck} z1sZ{R5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wpPmO2?`-oA+`Zi0G$xzCE$Kl-b!?RG=SpJ#}Y6mW%~OPz)pqF2wa2ZZLTf$0GHNR z98x%g>T?3mD)Q7v4JZzM>;dCYroT4^vQ}Z8Sfc7$tR;#D*ZT1p(x6CA;053r(1XB0 hytAkDao!&h`hQiyu`zZVw1EHs002ovPDHLkV1kB*5#ay; literal 0 HcmV?d00001 diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.php index daf4275481..ceabe13553 100644 --- a/resources/views/layouts/default.blade.php +++ b/resources/views/layouts/default.blade.php @@ -15,8 +15,8 @@ - - + + From cddae4869fcce2e4d2de3b313c5e929d4efac5ae Mon Sep 17 00:00:00 2001 From: lukasfehling <6AQmxBp2VWLzo3.LXH*ApJbbje8GYaqq> Date: Tue, 31 Jan 2023 18:27:25 +0100 Subject: [PATCH 22/32] fixed the endpoint for user notification with all their assigned assets --- app/Http/Controllers/Api/UsersController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index cca829c23f..9a9135a380 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -542,9 +542,10 @@ class UsersController extends Controller if (empty($user->email)) { return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.inventorynotification.error'))); } + + $user->notify((new CurrentInventory($user))); - return response()->Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success')); - + return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success'))); } /** From a4173e38819a717e702a487d93112ce6c1e753e3 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Tue, 31 Jan 2023 16:49:41 -0800 Subject: [PATCH 23/32] Permit not-delegated+dont-expire-password+normal-accounts to login --- app/Console/Commands/LdapSync.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index c6f8dd379a..ea99e74d1f 100755 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -303,17 +303,18 @@ class LdapSync extends Command $user->activated = 0; } */ $enabled_accounts = [ - '512', // 0x200 NORMAL_ACCOUNT - '544', // 0x220 NORMAL_ACCOUNT, PASSWD_NOTREQD - '66048', // 0x10200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD - '66080', // 0x10220 NORMAL_ACCOUNT, PASSWD_NOTREQD, DONT_EXPIRE_PASSWORD - '262656', // 0x40200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED - '262688', // 0x40220 NORMAL_ACCOUNT, PASSWD_NOTREQD, SMARTCARD_REQUIRED - '328192', // 0x50200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD - '328224', // 0x50220 NORMAL_ACCOUNT, PASSWD_NOT_REQD, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD - '4194816',// 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH + '512', // 0x200 NORMAL_ACCOUNT + '544', // 0x220 NORMAL_ACCOUNT, PASSWD_NOTREQD + '66048', // 0x10200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD + '66080', // 0x10220 NORMAL_ACCOUNT, PASSWD_NOTREQD, DONT_EXPIRE_PASSWORD + '262656', // 0x40200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED + '262688', // 0x40220 NORMAL_ACCOUNT, PASSWD_NOTREQD, SMARTCARD_REQUIRED + '328192', // 0x50200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD + '328224', // 0x50220 NORMAL_ACCOUNT, PASSWD_NOT_REQD, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD + '4194816',// 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH '4260352', // 0x410200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, DONT_REQ_PREAUTH '1049088', // 0x100200 NORMAL_ACCOUNT, NOT_DELEGATED + '1114624', // 0x110200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, NOT_DELEGATED, ]; $user->activated = (in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts)) ? 1 : 0; From 02ca5248b10670728ef7f5874adea0c8c83b59cc Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Tue, 31 Jan 2023 17:44:09 -0800 Subject: [PATCH 24/32] Don't append username to the user's name if it's already there --- resources/views/partials/bootstrap-table.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.php index 5a6e9dd464..d3a0fddc14 100644 --- a/resources/views/partials/bootstrap-table.blade.php +++ b/resources/views/partials/bootstrap-table.blade.php @@ -327,8 +327,8 @@ item_icon = ''; } - // display the username if it's checked out to a user - if (value.username) { + // display the username if it's checked out to a user, but don't do it if the username's there already + if (value.username && !value.name.match('\\(') && !value.name.match('\\)')) { value.name = value.name + ' (' + value.username + ')'; } From de1141491aa7441e7153f43e3cb73f0de18a9895 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 31 Jan 2023 19:41:42 -0800 Subject: [PATCH 25/32] Replaced help text Signed-off-by: snipe --- .../views/custom_fields/fieldsets/edit.blade.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/views/custom_fields/fieldsets/edit.blade.php b/resources/views/custom_fields/fieldsets/edit.blade.php index a43769255d..7a35ca146f 100644 --- a/resources/views/custom_fields/fieldsets/edit.blade.php +++ b/resources/views/custom_fields/fieldsets/edit.blade.php @@ -1,13 +1,17 @@ @extends('layouts/edit-form', [ 'createText' => trans('admin/custom_fields/general.create_fieldset') , 'updateText' => trans('admin/custom_fields/general.update_fieldset'), + 'helpText' => trans('admin/custom_fields/general.about_fieldsets_text'), + 'helpPosition' => 'right', 'formAction' => (isset($item->id)) ? route('fieldsets.update', ['fieldset' => $item->id]) : route('fieldsets.store'), ]) -@section('inputFields') - - @include ('partials.forms.edit.name', ['translated_name' => trans('general.name')]) - - - +@section('content') + @parent @stop + +@section('inputFields') +@include ('partials.forms.edit.name', ['translated_name' => trans('general.name')]) +@stop + + From a8643e5d35f1535bd28000bcbbaa44dc64b36a0a Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 15:55:16 -0500 Subject: [PATCH 26/32] cleaning up/adding variable --- resources/lang/en/admin/components/general.php | 2 +- resources/views/components/checkin.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/admin/components/general.php b/resources/lang/en/admin/components/general.php index 5d93036054..5b788a51ec 100644 --- a/resources/lang/en/admin/components/general.php +++ b/resources/lang/en/admin/components/general.php @@ -12,5 +12,5 @@ return array( 'remaining' => 'Remaining', 'total' => 'Total', 'update' => 'Update Component', - 'checkin_limit' => 'Amount checked in must be equal to or less than this amount' + 'checkin_limit' => 'Amount checked in must be equal to or less than :assigned_qty' ); diff --git a/resources/views/components/checkin.blade.php b/resources/views/components/checkin.blade.php index 55822fb9cf..0bbc46eff1 100644 --- a/resources/views/components/checkin.blade.php +++ b/resources/views/components/checkin.blade.php @@ -42,7 +42,7 @@
-

{{ trans(admin/components/general.checkin_limit) }}: {{ $component_assets->assigned_qty }}

+

{{ trans(admin/components/general.checkin_limit, ['assigned_qty' => '$component_assets->assigned_qty']) }}

{!! $errors->first('checkin_qty', '') !!}
From 4e5b8fa2136b79f398bca387f6b37740e482e17f Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:05:50 -0500 Subject: [PATCH 27/32] fixing pr --- app/Http/Controllers/Api/UsersController.php | 1 - app/Http/Controllers/Users/UsersController.php | 1 - app/Models/User.php | 1 - app/Presenters/UserPresenter.php | 9 --------- resources/lang/en/admin/users/general.php | 3 --- resources/views/users/edit.blade.php | 13 ------------- 6 files changed, 28 deletions(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 8185583868..cca829c23f 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -246,7 +246,6 @@ class UsersController extends Controller 'two_factor_optin', 'two_factor_enrolled', 'remote', - 'vipuser', 'start_date', 'end_date', ]; diff --git a/app/Http/Controllers/Users/UsersController.php b/app/Http/Controllers/Users/UsersController.php index 9d322ca4d9..52d423036f 100755 --- a/app/Http/Controllers/Users/UsersController.php +++ b/app/Http/Controllers/Users/UsersController.php @@ -271,7 +271,6 @@ class UsersController extends Controller $user->activated = $request->input('activated', 0); $user->zip = $request->input('zip', null); $user->remote = $request->input('remote', 0); - $user->vipuser = $request->input('vipuser', 0); $user->website = $request->input('website', null); $user->start_date = $request->input('start_date', null); $user->end_date = $request->input('end_date', null); diff --git a/app/Models/User.php b/app/Models/User.php index b51d23626f..87a0ef0916 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -62,7 +62,6 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'start_date', 'end_date', 'scim_externalid', - 'vipuser', ]; protected $casts = [ diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index dc41050f5b..8f5cfcccf5 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -85,15 +85,6 @@ class UserPresenter extends Presenter 'visible' => true, 'formatter' => 'usersLinkFormatter', ], - [ - 'field' => 'vipuser', - 'searchable' => false, - 'sortable' => true, - 'switchable' => true, - 'title' => trans('admin/users/general.vip_label'), - 'visible' => false, - 'formatter' => 'trueFalseFormatter', - ], [ 'field' => 'remote', 'searchable' => false, diff --git a/resources/lang/en/admin/users/general.php b/resources/lang/en/admin/users/general.php index 241667c387..8d890d6c08 100644 --- a/resources/lang/en/admin/users/general.php +++ b/resources/lang/en/admin/users/general.php @@ -41,6 +41,3 @@ return [ 'remote' => 'Remote', 'remote_help' => 'This can be useful if you need to filter by remote users who never or rarely come into your physical locations.', 'not_remote_label' => 'This is not a remote user', - 'vip_label' => 'VIP user', - 'vip_help' => 'This can be helpful to mark important people if you would like', -]; diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index b06dcad237..93b8fb7a21 100755 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -362,19 +362,6 @@ @include ('partials.forms.edit.datepicker', ['translated_name' => trans('general.end_date'), 'fieldname' => 'end_date', 'item' => $user]) - -
-
- -

{{ trans('admin/users/general.vip_help') }} -

-
-
-
From 4d9d73483fc35a299c766aa53c7d2b781a3b6e69 Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:09:19 -0500 Subject: [PATCH 28/32] fixing pr --- .../2023_01_23_232933_add_vip_to_users.php | 34 ------------------- resources/views/users/view.blade.php | 10 ------ 2 files changed, 44 deletions(-) delete mode 100644 database/migrations/2023_01_23_232933_add_vip_to_users.php diff --git a/database/migrations/2023_01_23_232933_add_vip_to_users.php b/database/migrations/2023_01_23_232933_add_vip_to_users.php deleted file mode 100644 index 40db001b17..0000000000 --- a/database/migrations/2023_01_23_232933_add_vip_to_users.php +++ /dev/null @@ -1,34 +0,0 @@ -boolean('vipuser')->nullable()->default(0); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('users', function (Blueprint $table) { - if (Schema::hasColumn('users', 'vipuser')) { - $table->dropColumn('vipuser'); - } - }); - } -} diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index f12929a9d4..725a97ebe7 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -518,16 +518,6 @@
@endif - - -
-
- {{ trans('admin/users/general.vip_label') }} -
-
- {!! ($user->vipuser=='1') ? ' '.trans('general.yes') : ' '.trans('general.no') !!} -
-
From 3702dd87ce25a202be53ba090500a0dc0c8d4e0e Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:10:30 -0500 Subject: [PATCH 29/32] fixing pr --- resources/lang/en/admin/users/general.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/en/admin/users/general.php b/resources/lang/en/admin/users/general.php index 8d890d6c08..ff482b8ebb 100644 --- a/resources/lang/en/admin/users/general.php +++ b/resources/lang/en/admin/users/general.php @@ -41,3 +41,4 @@ return [ 'remote' => 'Remote', 'remote_help' => 'This can be useful if you need to filter by remote users who never or rarely come into your physical locations.', 'not_remote_label' => 'This is not a remote user', +]; \ No newline at end of file From 90c1bfe03df1278c4ae6b03eb6bf76e78590207e Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:12:39 -0500 Subject: [PATCH 30/32] fixing pr --- app/Models/User.php | 1 - resources/views/users/view.blade.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 87a0ef0916..1b336503c8 100755 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -69,7 +69,6 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo 'manager_id' => 'integer', 'location_id' => 'integer', 'company_id' => 'integer', - 'vipuser' => 'boolean', ]; diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 725a97ebe7..75be81a886 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -518,7 +518,7 @@
@endif - +
From 33d819fd41df9b8a3bbaa274549db4db1f34976b Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:13:53 -0500 Subject: [PATCH 31/32] fixing pr --- resources/views/users/view.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 75be81a886..5d959589e6 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -519,7 +519,7 @@
@endif - +
{{ trans('admin/users/general.remote') }} From 0ffd40a2170a51feea442a8eac3e0f3f4a4473da Mon Sep 17 00:00:00 2001 From: akemidx Date: Wed, 1 Feb 2023 16:30:07 -0500 Subject: [PATCH 32/32] fixing syntax --- resources/views/components/checkin.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/checkin.blade.php b/resources/views/components/checkin.blade.php index 0bbc46eff1..6a7055f727 100644 --- a/resources/views/components/checkin.blade.php +++ b/resources/views/components/checkin.blade.php @@ -42,7 +42,7 @@
-

{{ trans(admin/components/general.checkin_limit, ['assigned_qty' => '$component_assets->assigned_qty']) }}

+

{{ trans('admin/components/general.checkin_limit', ['assigned_qty' => $component_assets->assigned_qty]) }}

{!! $errors->first('checkin_qty', '') !!}