Compare commits

..

1284 Commits

Author SHA1 Message Date
snipe c125eb8e6e Moved faker out of dev so we can use the seeders
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 17:17:19 +01:00
snipe de6206ce78 Merge pull request #16982 from grokability/fixes#16958-expiring-assets-unarchived
Fixed #16958 - exclude archived assets from expiring assets report
2025-05-23 15:51:27 +02:00
snipe a181ba308a Fixed #16958 - exclude archived assets from expiring assets report
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 14:48:54 +01:00
snipe 5a9ac01cf8 Set audit warnings as int
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 14:30:56 +01:00
snipe a5cd306b1d Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 13:12:30 +01:00
snipe 57d3abab5f Merge pull request #16979 from marcusmoore/bug/sc-29178
Improved creator on accessory show page
2025-05-23 14:05:28 +02:00
snipe b6eb3185d5 Merge pull request #16968 from marcusmoore/bug/sc-29233
Fixed potential slack webhook setting inconsistencies
2025-05-23 14:05:01 +02:00
snipe 286f78778c Merge pull request #16980 from uberbrady/add_new_checkin_checkout_counters_tests_rebased
New tests for checkin/checkout counters
2025-05-23 13:55:38 +02:00
Brady Wetherington 4b95790e2f WIP: new tests for checkin/checkout counters
note that the test isnt going to work

More WIP for checkout counters

Got all tests passing
2025-05-23 12:37:29 +01:00
snipe 97883971f7 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 10:43:32 +01:00
snipe b3c12d4ee6 Wider text fields
Signed-off-by: snipe <snipe@snipe.net>
2025-05-23 10:42:24 +01:00
Marcus Moore bea426d8e6 Add test 2025-05-22 16:54:52 -07:00
Marcus Moore be60370eae Add test 2025-05-22 16:33:45 -07:00
Marcus Moore 7cc216eb38 Extract variable 2025-05-22 15:05:24 -07:00
Marcus Moore 8c90efe745 Add authorization check 2025-05-22 15:02:14 -07:00
snipe 4b9f4423f6 Merge pull request #16932 from marcusmoore/fixes/webhook-checkin-checkout-fix
Improve notifications
2025-05-22 10:53:43 +01:00
Marcus Moore 932b589bd9 Do not show section if user doesn't exist 2025-05-21 17:28:41 -07:00
Marcus Moore ce18b91b03 Add translation 2025-05-21 16:49:15 -07:00
Marcus Moore 5f883310b5 Improve display of user on accessory show page 2025-05-21 16:48:26 -07:00
Marcus Moore 69cc46c2b8 Improve method name 2025-05-20 16:41:52 -07:00
Marcus Moore dc6951f341 Improve method name 2025-05-20 16:28:49 -07:00
Marcus Moore f7ed336f99 Remove typehint 2025-05-20 16:26:05 -07:00
Marcus Moore 47f287c031 Fix assertion 2025-05-20 16:25:22 -07:00
Marcus Moore 5739393f8d Check to make sure settings exist before attempting to update them 2025-05-20 12:45:23 -07:00
Marcus Moore 13956254ce Add migration to fix webhook settings 2025-05-20 12:27:19 -07:00
Marcus Moore d6b69c8cc2 Fix webhook selected value in mount method 2025-05-20 12:00:58 -07:00
Marcus Moore 7a79fd18f0 Bind the selected webhook and avoid clearing from database 2025-05-20 11:40:44 -07:00
snipe e3ffe79c4c Merge pull request #16962 from Godmartinz/audit_notifications_fix
Added dynamic properties to audit notifications
2025-05-20 12:34:33 +02:00
Marcus Moore 043325b966 Merge branch 'develop' into fixes/webhook-checkin-checkout-fix
# Conflicts:
#	app/Listeners/CheckoutableListener.php
2025-05-19 14:41:05 -07:00
Marcus Moore a2696b799f Standardize test names 2025-05-19 14:33:18 -07:00
snipe eb8ef37808 Merge pull request #16963 from Godmartinz/fix-double-scroll-bar-permission-groups
Removes double scrollbar from groups
2025-05-19 20:32:30 +02:00
Godfrey M 8416c6df05 removes double scrollbar 2025-05-19 11:21:52 -07:00
Godfrey M 3aa4814342 allow dynamic assignment to audit notifications 2025-05-19 11:08:03 -07:00
snipe 186f322bb5 Merge pull request #16953 from uberbrady/fix_checkin_emails
Make checkin emails not send when not configured to be
2025-05-16 11:14:31 +02:00
Brady Wetherington 28e2e7c924 Get rid of more editorialization 2025-05-16 10:57:34 +02:00
Brady Wetherington 97351028b5 Get rid of editorializing in comments 2025-05-16 10:56:36 +02:00
Brady Wetherington 0ef0863b59 Make checkin emails not send unless the send-emails attribute is set on the category 2025-05-16 10:48:17 +02:00
Marcus Moore 2e80b4ace8 WIP 2025-05-15 17:50:07 -07:00
Marcus Moore 0d896c2ef6 Extract method 2025-05-15 17:44:27 -07:00
Marcus Moore dc9df04237 WIP 2025-05-15 17:40:51 -07:00
Marcus Moore b469a64db3 WIP 2025-05-15 17:35:28 -07:00
Marcus Moore 73f19ff4e7 Scaffold tests 2025-05-15 17:30:06 -07:00
Marcus Moore 22b4fac3ee Formatting 2025-05-15 17:24:56 -07:00
Marcus Moore c97884c8b0 WIP 2025-05-15 16:59:10 -07:00
Marcus Moore b972fb514a Remove type hint 2025-05-15 16:54:46 -07:00
Marcus Moore a3871bd1f2 WIP 2025-05-15 16:47:29 -07:00
Marcus Moore 2069f99b2b WIP 2025-05-15 16:42:20 -07:00
Marcus Moore 882d55fd09 Improve tests 2025-05-15 16:31:07 -07:00
Marcus Moore 68ef975726 WIP 2025-05-15 16:22:31 -07:00
Marcus Moore 0685ff3818 WIP 2025-05-15 16:12:51 -07:00
Marcus Moore b28839d907 Scaffold tests 2025-05-15 15:57:52 -07:00
Marcus Moore 7f0a947de4 WIP 2025-05-15 15:43:57 -07:00
Marcus Moore c8fc4afe65 Fix method name 2025-05-15 15:31:18 -07:00
Marcus Moore 3b7162cb02 Improve test setup 2025-05-15 15:30:16 -07:00
Marcus Moore 4245456382 Scaffold more tests 2025-05-15 15:27:15 -07:00
Marcus Moore cdf43e31e2 Remove randomness from factory 2025-05-15 15:14:01 -07:00
Marcus Moore f19d6b3c52 Scaffold tests 2025-05-15 15:13:50 -07:00
snipe ca66e29072 Merge pull request #16946 from marcusmoore/bug/sc-29166
Gracefully handle error when editing of soft deleted users
2025-05-15 22:46:48 +02:00
Marcus Moore 6ff76a12f8 Strengthen test scenario 2025-05-15 13:39:27 -07:00
Marcus Moore 8b13997597 Merge branch 'develop' into fixes/webhook-checkin-checkout-fix
# Conflicts:
#	app/Listeners/CheckoutableListener.php
2025-05-15 13:38:20 -07:00
Marcus Moore 9600adee6b Don't allow viewing edit page if user soft deleted 2025-05-15 11:14:15 -07:00
snipe 6eb3819492 Apply correct unique custom field validation for audit API
Signed-off-by: snipe <snipe@snipe.net>
2025-05-15 18:31:49 +02:00
snipe 95226f87bc Use same logic for auditStore for validating unique fields
Signed-off-by: snipe <snipe@snipe.net>
2025-05-15 18:02:23 +02:00
snipe ee3ae803b9 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-05-15 17:51:28 +02:00
snipe 057667c425 Removed duplicate unique display in table
Signed-off-by: snipe <snipe@snipe.net>
2025-05-15 17:10:47 +02:00
Marcus Moore f644642fac Add comment 2025-05-14 12:48:32 -07:00
Marcus Moore 3374a9e5a9 Add assertion 2025-05-14 12:48:11 -07:00
Marcus Moore d3a74a5740 Use route bound user instead of re-querying 2025-05-14 12:46:34 -07:00
Marcus Moore c458cc904a Add failing test 2025-05-14 12:45:55 -07:00
snipe 5c7b74e17e Merge pull request #16943 from grokability/small-tweaks-to-status-label-text
Clearer text on status label types
2025-05-14 17:35:40 +02:00
snipe e07b0f65a1 Clearer text on status label types
Signed-off-by: snipe <snipe@snipe.net>
2025-05-14 17:33:12 +02:00
snipe b06fd5bbca Merge pull request #16942 from uberbrady/quick_temp_fix_notifications
A quick check to make sure that webhooks still fire when email is off
2025-05-14 16:21:37 +02:00
Brady Wetherington 6306f78fe0 A quick check to make sure that webhooks still fire when email is off 2025-05-14 16:14:03 +02:00
snipe da4bce0c89 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-05-14 15:02:43 +02:00
snipe 053e815206 Add @JassonCordones as a contributor 2025-05-14 15:02:43 +02:00
snipe ab1053ecda Merge pull request #16916 from marcusmoore/bug/sc-29153
Handle potential hard exception in Asset@getImageUrl method
2025-05-14 14:52:33 +02:00
snipe 9a61a3391b Merge pull request #16921 from marcusmoore/chore/locale-select
Replace locales macro
2025-05-14 14:52:02 +02:00
snipe d3c19e28ec Merge pull request #16918 from marcusmoore/bug/sc-29151
Handle displaying deleted creator of an accessory
2025-05-14 13:36:08 +02:00
snipe 87115f2e50 Merge branch 'develop' into bug/sc-29151 2025-05-14 13:35:38 +02:00
Marcus Moore 5f7aadfba0 Ensure CC emails are always sent for assets 2025-05-13 17:56:35 -07:00
Marcus Moore e954e066b4 Scaffold tests 2025-05-13 17:41:19 -07:00
Marcus Moore e336182d79 Formatting 2025-05-13 14:45:09 -07:00
Marcus Moore 3eb0743446 Separate checking for sending email and webhook notifications 2025-05-13 14:43:16 -07:00
Marcus Moore 95c1c37ab1 Invert method 2025-05-13 14:25:03 -07:00
Marcus Moore a7054f0b1e Improve method name 2025-05-13 14:20:42 -07:00
Marcus Moore e4bfabfabe Add failing tests 2025-05-13 14:12:51 -07:00
snipe 6b56929a06 Null operator for missing created_by record
Signed-off-by: snipe <snipe@snipe.net>
2025-05-13 20:44:25 +02:00
Marcus Moore e3642bb513 Remove unneeded div 2025-05-12 17:07:17 -07:00
Marcus Moore ca7c416e19 Remove the replaced locales form macro 2025-05-12 16:35:40 -07:00
snipe ac6d964e28 Merge pull request #16920 from marcusmoore/fixes/remove-outline-from-label
Remove logo outline from L7162_B
2025-05-12 23:04:49 +01:00
Marcus Moore e2772c816d Remove label logo outline from L7162_B label 2025-05-12 13:58:13 -07:00
Marcus Moore 916f7401f3 Handle creator being deleted 2025-05-12 12:30:32 -07:00
Marcus Moore b53a71d523 Add failing test 2025-05-12 12:30:06 -07:00
Marcus Moore 510a2b0889 Formatting 2025-05-12 12:03:15 -07:00
Marcus Moore 73057454c6 Fix bug in getImageUrl method 2025-05-12 11:56:40 -07:00
Marcus Moore 5a6cf2a296 Add test for existing functionality 2025-05-12 11:44:25 -07:00
snipe 9e3e04521e Merge pull request #16900 from marcusmoore/fixes/user-full-name-accessor
Handle settings not being available in full name accessor
2025-05-10 12:26:19 +01:00
snipe 65dfbd02fe Use develop branch
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 21:00:55 +01:00
snipe 649ab53320 Updated codacy link
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 21:00:18 +01:00
snipe 9250624f79 Merge pull request #16909 from grokability/fixes-#16554-category-delete
Fixed #16554 - Added models to deletable check
2025-05-09 19:23:35 +01:00
snipe 995e2090f5 Added/updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 19:17:53 +01:00
snipe 9b91584776 Added models to deletable check
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 19:17:48 +01:00
snipe 8fd97ea501 Merge pull request #16908 from grokability/bug/sc-28724
Fixed #16535 - more info to side rail in accessories
2025-05-09 18:03:05 +01:00
snipe a80b9ab362 Fixed #16535 - more info to side rail in accessories
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 17:48:02 +01:00
snipe 556e1081b3 Added two more selectors for byod
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 17:23:08 +01:00
snipe b070916f0b Merge pull request #16907 from grokability/add_ids_to_menus
Fixed #16456 - added ids to sidenav options and bod
2025-05-09 17:22:19 +01:00
snipe 940caf14b0 Added ids to menu items
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 17:09:59 +01:00
snipe 76da1d6663 Added class to checkbox
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 17:04:19 +01:00
snipe bafff9020a Merge pull request #16611 from Godmartinz/MS_teams_deprecation_update
Reworked MS Teams deprecation warnings and notifications visibility
2025-05-09 16:38:25 +01:00
snipe 0d5dca6456 Fixed #16690 - fallback to category image if no model image is present
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 14:46:27 +01:00
snipe 0f9b7119c0 Merge pull request #16905 from grokability/fixes_#16901
Fixed #16901 - use default currency for asset maintenance cost
2025-05-09 12:45:46 +01:00
snipe d4181549e8 Fixes #16901 - use default currency for maintenance cost display
Signed-off-by: snipe <snipe@snipe.net>
2025-05-09 12:43:49 +01:00
Marcus Moore d57f56e44f Handle settings not being available 2025-05-08 16:20:26 -07:00
Marcus Moore f7777ca8a5 Replace Form::locales on user setup 2025-05-08 15:38:49 -07:00
Marcus Moore fce5530bc7 Replace Form::locales on bulk edit users page 2025-05-08 15:31:41 -07:00
Marcus Moore ad1530e9ff Replace Form::locales on user edit page 2025-05-08 15:17:15 -07:00
Marcus Moore abb2dcbbe4 Replace Form::locales on localization page 2025-05-08 15:05:48 -07:00
Marcus Moore 437499c5df Fix input name 2025-05-08 15:04:45 -07:00
Marcus Moore f739c2c84a Introduce locale select component and make replacement on profile page 2025-05-08 15:02:35 -07:00
snipe 7d9b87f059 Merge pull request #16898 from marcusmoore/chore/form-radio-replacement
Replaced Form::radio helpers
2025-05-08 20:50:29 +01:00
Marcus Moore c157f4190e Replace Form::radio in location partial 2025-05-08 12:25:48 -07:00
Marcus Moore 9357eca1cd Replace Form::radio on asset checkin page 2025-05-08 12:16:55 -07:00
snipe 40c65a07a4 Merge pull request #16896 from grokability/removed_seat_number
Removed seat "name" from licenses seats API/UI response
2025-05-08 17:57:40 +01:00
snipe 13521bcf75 Removed seat “name” from license seats API/UI
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 17:37:27 +01:00
snipe 1c09dc139a Undo previous change
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 16:40:24 +01:00
snipe d5f955b1e0 License seats are not numbered correctly [sc-29113]
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 16:25:49 +01:00
snipe 9e6e8f0931 Moved incomplete test marker
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 16:22:09 +01:00
snipe c93ef30801 Ignore flaky test
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 15:43:40 +01:00
snipe 3e0dec4856 Fixed #16893 - more specific upload failure text
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 15:38:38 +01:00
snipe 0b167f5f6f Grab location uploads from backup
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 15:22:26 +01:00
snipe f6b21fdb82 Merge pull request #16895 from grokability/fixed_#16863_custom_fields_validation
Fixed #16863 - better handle custom fields validation when unique but not required
2025-05-08 15:09:04 +01:00
snipe f151628808 Merge pull request #16894 from grokability/resolve-webserver-permissions
Fix webserver/user file permissions issue
2025-05-08 15:08:40 +01:00
snipe e44aad0328 Fixed typeos 2025-05-08 15:08:14 +01:00
snipe 1881054c92 Fixed #16863 - better handle unique not required custom field redirects
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 15:00:43 +01:00
Jeremy Price f7533c5e41 Fix webserver/user file permissions issue
Fixes https://github.com/grokability/snipe-it/issues/16777

We weren't adding the webserver user to the app-user's group, which was
a problem for the webserver trying to write to the log file if it had
been created by a user-owned process (like a cron) or the installation
script chown-ing everything... even though the log file was created 664

This would often present in mysterious ways. In the linked case, trying
to upload a cvs for import would fail with an unhelpful message, because
the actual error is swallowed in the generic error handler for the page.

I've filed an issue to hopefully help with that: https://github.com/grokability/snipe-it/issues/16893

Used this opportunity to condense some logic that was
identical between architectures,
2025-05-08 13:55:23 +02:00
snipe f181e0fa55 Merge pull request #16877 from marcusmoore/bug/sc-29012
Allow updating asset model image via api
2025-05-08 06:27:49 +01:00
snipe b04efdfefc Merge pull request #16889 from grokability/add_updated_range_to_custom_report
Added #16887 - last updated date range for custom report
2025-05-08 06:27:32 +01:00
snipe 352b935dee Merge pull request #16884 from marcusmoore/bug/sc-29097
Removed `2fa_authed` from session upon logout
2025-05-08 06:23:26 +01:00
snipe 0ba3b9975a Added #16887 - last updated date range for custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-05-08 06:21:06 +01:00
Marcus Moore cc06187f31 Remove 2fa_authed from session upon logout 2025-05-07 14:04:33 -07:00
snipe a916767392 Show the QR code on the asset page regardless of label settings
Signed-off-by: snipe <snipe@snipe.net>
2025-05-07 11:34:21 +01:00
snipe 1c57bfaa39 Small cosmetic change to offset
Signed-off-by: snipe <snipe@snipe.net>
2025-05-07 11:28:01 +01:00
snipe 4a5adeb661 Fixed #16866 - use singular translation for custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-05-07 10:55:28 +01:00
snipe 01f9772291 Updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2025-05-07 10:37:10 +01:00
snipe 960b3aebed Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-05-07 10:24:07 +01:00
Marcus Moore d75de73867 Allow updating asset model image via api 2025-05-06 17:13:23 -07:00
snipe e75df97902 Merge pull request #16876 from grokability/switch-back-to-multiarch-docker-with-emulation
Move back to multiarch builds with emulation (for now)
2025-05-06 21:39:23 +01:00
Jeremy Price 5be14ec750 Move back to multiarch builds with emulation (for now)
Turns out it's not straightforward to have multiarchitecture images
within the same namespace, if you want to run each architecture's build
on native runners.

While we work on getting that going, we're moving back to
build-everything-on-intel-runners-with-emulation-for-arm

it means slowwwww arm builds, but it also means we should get our images
straightened out
2025-05-06 22:27:53 +02:00
snipe 717a82f46a Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-05-06 21:27:02 +01:00
snipe e40038900b Merge pull request #16875 from ubc-cpsc/bugfix/CVE-2025-46734
Fixes CVE-2025-46734: league/commonmark contains a XSS vulnerability in Attributes extension
2025-05-06 19:19:09 +01:00
Joël Pittet 099eabc240 Fixes CVE-2025-46734 2025-05-06 11:01:45 -07:00
snipe 3a4fa35398 Merge pull request #16874 from grokability/clone_breadcrumb_fix
Fixed breadcrumbs for cloning
2025-05-06 16:42:52 +01:00
snipe 500d6a0cc2 Merge pull request #16873 from grokability/redirect_on_audit
Redirect options on audit
2025-05-06 16:39:29 +01:00
snipe 38e5bf71bc Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-05-06 16:36:09 +01:00
snipe 45ff195f11 Fixed breadcrumbs for cloning
Signed-off-by: snipe <snipe@snipe.net>
2025-05-06 16:17:02 +01:00
snipe ce543c8179 Use consistent icon
Signed-off-by: snipe <snipe@snipe.net>
2025-05-06 16:12:15 +01:00
snipe 5c11a8c1e0 Modified helper
Signed-off-by: snipe <snipe@snipe.net>
2025-05-06 16:12:06 +01:00
snipe f013a4c5ea Merge pull request #16871 from grokability/one-more-docker-fix
One more docker repo name fix
2025-05-06 15:16:48 +01:00
Jeremy Price 194a22452e stop building intel image in arm server 2025-05-06 16:10:44 +02:00
Jeremy Price 930a6a2ac8 One more docker repo name fix
i feel like i'm taking crazy pills

also right-naming the arm builds again
2025-05-06 16:06:13 +02:00
snipe 444dea8b42 Merge pull request #16868 from grokability/fix-dockerhub-references
OMG fix 2 more (only 1 active) dockerhub repo references
2025-05-06 10:15:28 +01:00
Jeremy Price 6cc3f69c2a OMG fix 2 more (only 1 active) dockerhub repo references 2025-05-06 07:54:20 +02:00
snipe 36f3834ca5 Merge pull request #16865 from ntaylor-86/fixes/alerts-enabled-new-install
Fixed #16815: Avoids potential error when settings table is empty
2025-05-06 00:59:52 +01:00
Nathan Taylor d4b73b4fb9 Avoids potential error when alerts table is empty
Updates the Kernel to use the null-safe operator
when accessing the alerts_enabled setting. This prevents
a potential error if the settings object is null.
2025-05-06 09:47:33 +10:00
snipe b37f488117 Merge pull request #16864 from marcusmoore/update-contributors
Added missing contributors
2025-05-05 22:18:11 +01:00
snipe ee0a9e834a Fixed BulkDeleteAssetsTest test
Signed-off-by: snipe <snipe@snipe.net>
2025-05-05 22:12:08 +01:00
snipe c776e0e7e9 Merge pull request #16851 from grokability/fix-dockerhub-repo
Fix dockerhub repo we're pushing to, and arm build names
2025-05-05 22:03:58 +01:00
Jeremy Price 54d3193b6f run arm builds on arm 2025-05-05 22:55:38 +02:00
Marcus Moore 326657c709 contributors:generate 2025-05-05 13:30:49 -07:00
Marcus Moore c72e86ea2e Update casing for contributor 2025-05-05 13:29:05 -07:00
Marcus Moore 34b1ca29d3 Remove duplicate contributor (QveenSi) 2025-05-05 13:28:25 -07:00
Marcus Moore 1dc876a436 docs: add @austinsasko as a contributor 2025-05-05 13:19:37 -07:00
Marcus Moore b28bc2c500 docs: add @drexljo as a contributor 2025-05-05 13:18:53 -07:00
Marcus Moore c38d98b00a docs: add @jfwiebe as a contributor 2025-05-05 13:18:29 -07:00
Marcus Moore 7b83df088b docs: add @JemCdo as a contributor 2025-05-05 13:18:29 -07:00
Marcus Moore c8b1240665 docs: add @jjasghar as a contributor 2025-05-05 13:18:28 -07:00
Marcus Moore 8a9d6bbdca docs: add @pottom as a contributor 2025-05-05 13:18:27 -07:00
Marcus Moore 6859b36e7c docs: add @dasjoe as a contributor 2025-05-05 13:18:26 -07:00
Marcus Moore f0073c1528 docs: add @gl-pup as a contributor 2025-05-05 13:18:26 -07:00
Marcus Moore f6b7e621b7 docs: add @gastamper as a contributor 2025-05-05 13:18:25 -07:00
Marcus Moore 108a0179ca docs: add @LeafedFox as a contributor 2025-05-05 13:18:24 -07:00
Marcus Moore 2baf65aa62 docs: add @m4us1ne as a contributor 2025-05-05 13:18:24 -07:00
Marcus Moore 74c4e9665e docs: add @lopezio as a contributor 2025-05-05 13:18:23 -07:00
Marcus Moore ae9c22f327 docs: add @loganswartz as a contributor 2025-05-05 13:18:22 -07:00
Marcus Moore 37bca6febd docs: add @sniff122 as a contributor 2025-05-05 13:18:22 -07:00
Marcus Moore 30196793bd docs: add @KorvinSzanto as a contributor 2025-05-05 13:18:21 -07:00
Marcus Moore 3060282ffb docs: add @juhotaipale as a contributor 2025-05-05 13:18:20 -07:00
Marcus Moore d63bba8db7 docs: add @juanfont as a contributor 2025-05-05 13:18:20 -07:00
Marcus Moore 2c12ee01a0 docs: add @CalvinSchwartz as a contributor 2025-05-05 13:18:19 -07:00
Marcus Moore aa76424a74 docs: add @byronwolfman as a contributor 2025-05-05 13:18:18 -07:00
Marcus Moore 9188d6229e docs: add @benperiton as a contributor 2025-05-05 13:18:18 -07:00
Marcus Moore 5555f32ffe docs: add @arukompas as a contributor 2025-05-05 13:18:17 -07:00
Marcus Moore 59062980ff docs: add @hex128 as a contributor 2025-05-05 13:18:16 -07:00
Marcus Moore f4aac5f0b7 docs: add @disc as a contributor 2025-05-05 13:18:16 -07:00
Marcus Moore 5c167aa2a9 docs: add @AlexanderWPapyrus as a contributor 2025-05-05 13:18:15 -07:00
Marcus Moore 8e1eed498e docs: add @MelonSmasher as a contributor 2025-05-05 13:18:14 -07:00
Marcus Moore e449f39ea6 docs: add @fabiang as a contributor 2025-05-05 13:16:43 -07:00
Marcus Moore 97171e0e1c docs: add @Jarli01 as a contributor 2025-05-05 13:16:42 -07:00
Marcus Moore 5935ca4664 docs: add @dkmansion as a contributor 2025-05-05 13:16:42 -07:00
Marcus Moore 21c88cd311 docs: add @splashx as a contributor 2025-05-05 13:16:41 -07:00
Marcus Moore 5c786d8b70 docs: add @corydlamb as a contributor 2025-05-05 13:09:28 -07:00
Marcus Moore d718d210ed docs: add @bricelabelle as a contributor 2025-05-05 13:09:27 -07:00
Marcus Moore f50c5d22b8 docs: add @bmkalle as a contributor 2025-05-05 13:09:27 -07:00
Marcus Moore c36f9a432e docs: add @terwey as a contributor 2025-05-05 13:09:26 -07:00
Marcus Moore 65b6b02b1d docs: add @xWyatt as a contributor 2025-05-05 12:54:08 -07:00
Marcus Moore 9c65d7c057 docs: add @Wouter0100 as a contributor 2025-05-05 12:54:08 -07:00
Marcus Moore eab07834cf docs: add @valentyntu as a contributor 2025-05-05 12:54:07 -07:00
Marcus Moore eb38f33baf docs: add @viclou as a contributor 2025-05-05 12:54:06 -07:00
Marcus Moore 462f9f2f39 docs: add @yannikp as a contributor 2025-05-05 12:54:05 -07:00
Marcus Moore 1021ccb230 docs: add @timwsuqld as a contributor 2025-05-05 12:54:05 -07:00
Marcus Moore 84e9a3a7d6 docs: add @p3nj as a contributor 2025-05-05 12:54:04 -07:00
Marcus Moore c0060b3625 docs: add @sreyemnayr as a contributor 2025-05-05 12:54:03 -07:00
Marcus Moore 197aa12c61 docs: add @octobunny as a contributor 2025-05-05 12:54:02 -07:00
Marcus Moore dfb2959751 docs: add @nixn as a contributor 2025-05-05 12:54:01 -07:00
Marcus Moore 95fb4f0e45 docs: add @rcmcdonald91 as a contributor 2025-05-05 12:54:00 -07:00
Marcus Moore b2c729b7b8 docs: add @owalerys as a contributor 2025-05-05 12:53:59 -07:00
Marcus Moore fe9b224a44 docs: add @nunomaduro as a contributor 2025-05-05 12:53:59 -07:00
Marcus Moore fc4e8c68f2 docs: add @Scorcher as a contributor 2025-05-05 12:53:58 -07:00
Marcus Moore 6fb1c03908 docs: add @nticaric as a contributor 2025-05-05 12:53:57 -07:00
Marcus Moore 96ccfdb8cc docs: add @firefrei as a contributor 2025-05-05 12:53:57 -07:00
Marcus Moore 75fd07e057 docs: add @mzack5020 as a contributor 2025-05-05 12:53:56 -07:00
Marcus Moore 87fe69ecfb docs: add @Mateus-Romera as a contributor 2025-05-05 12:53:55 -07:00
Marcus Moore 19b47030ca docs: add @Nevets82 as a contributor 2025-05-05 12:53:54 -07:00
Marcus Moore cf4e3fcc37 docs: add @snazy2000 as a contributor 2025-05-05 12:53:54 -07:00
Marcus Moore bef4133f51 docs: add @smcpeck as a contributor 2025-05-05 12:53:53 -07:00
Marcus Moore 7ac24efced docs: add @cendai-mis as a contributor 2025-05-05 12:53:52 -07:00
Marcus Moore d8d4a7075e docs: add @Shankschn as a contributor 2025-05-05 12:53:51 -07:00
Marcus Moore dd4c9df6d1 docs: add @serkanerip as a contributor 2025-05-05 12:53:50 -07:00
Marcus Moore da28c02b50 docs: add @SBrown2021 as a contributor 2025-05-05 12:53:50 -07:00
Marcus Moore 54858402e3 docs: add @McG800 as a contributor 2025-05-05 12:53:49 -07:00
Marcus Moore b39d8cc0b9 docs: add @rosscdh as a contributor 2025-05-05 12:53:48 -07:00
Marcus Moore 4c7c33800a docs: add @rickheil as a contributor 2025-05-05 12:53:47 -07:00
Marcus Moore d2c604a7ce docs: add @Nothing4You as a contributor 2025-05-05 12:53:47 -07:00
Marcus Moore 91243fb6c0 docs: add @mbrrg as a contributor 2025-05-05 12:53:46 -07:00
Marcus Moore 940a85888a docs: add @deloz as a contributor 2025-05-05 12:53:45 -07:00
Marcus Moore 280c12e22b docs: add @Galaxy102 as a contributor 2025-05-05 12:53:44 -07:00
Marcus Moore 39e644d048 docs: add @manu-crealytics as a contributor 2025-05-05 12:53:44 -07:00
Marcus Moore 9acb3e5935 docs: add @marcquark as a contributor 2025-05-05 12:53:43 -07:00
Marcus Moore 8ac5b5df61 docs: add @brandon-bailey as a contributor 2025-05-05 12:53:42 -07:00
Marcus Moore 434932599c docs: add @thinkl33t as a contributor 2025-05-05 12:53:42 -07:00
Marcus Moore 81b8c445c6 docs: add @vicleos as a contributor 2025-05-05 12:53:41 -07:00
Marcus Moore 002bb72a8d docs: add @herroworrd as a contributor 2025-05-05 12:53:40 -07:00
Marcus Moore 288770900e docs: add @robintemme as a contributor 2025-05-05 12:53:39 -07:00
Marcus Moore f6f6a23f8b docs: add @wewhite as a contributor 2025-05-05 12:53:39 -07:00
Marcus Moore 522fa7be44 docs: add @Serdnad as a contributor 2025-05-05 12:53:38 -07:00
Marcus Moore 272d9e0552 docs: add @mink-adao-duy as a contributor 2025-05-05 12:53:37 -07:00
Marcus Moore 9060a3cc13 docs: add @ahpaleus as a contributor 2025-05-05 12:53:36 -07:00
Marcus Moore b6a9c0e68b docs: add @DanielRuf as a contributor 2025-05-05 12:53:36 -07:00
Marcus Moore b43ae5be13 docs: add @dkaatz as a contributor 2025-05-05 12:53:35 -07:00
Marcus Moore 6384041107 docs: add @seanborg-codethink as a contributor 2025-05-05 12:53:34 -07:00
Marcus Moore 89703cd9df docs: add @sorvani as a contributor 2025-05-05 12:53:33 -07:00
Marcus Moore f6aa9f1318 docs: add @fe80 as a contributor 2025-05-05 12:53:33 -07:00
Marcus Moore 838e214b24 docs: add @phil-flip as a contributor 2025-05-05 12:53:32 -07:00
Marcus Moore 628c444cd4 docs: add @aranar-pro as a contributor 2025-05-05 12:53:31 -07:00
Marcus Moore e8289b0f45 docs: add @JonathonReinhart as a contributor 2025-05-05 12:53:31 -07:00
Marcus Moore 86816f632f docs: add @test1337ahp as a contributor 2025-05-05 12:53:30 -07:00
Marcus Moore 494710306b docs: add @NebelKreis as a contributor 2025-05-05 12:53:29 -07:00
Marcus Moore 7a5fe4981f docs: add @mnemonicly as a contributor 2025-05-05 12:53:29 -07:00
snipe a67b320cae Merge pull request #15907 from uberbrady/protect_assigned_to_assigned_type_rebased
Rebased version of #15629 - prevent setting assigned_to without setting assigned_type
2025-05-05 20:42:46 +01:00
Godfrey M e3a2397b74 removed hiding the notifications icon 2025-05-05 10:28:08 -07:00
Godfrey M 3b34654dd7 Merge branch 'develop' into MS_teams_deprecation_update
# Conflicts:
#	resources/lang/en-US/admin/settings/message.php
2025-05-05 09:33:32 -07:00
Godfrey M 4b6437854c swapped out hard coded text with translation 2025-05-05 09:31:23 -07:00
snipe 9ef20997a5 Merge pull request #16861 from uberbrady/cherry_pick_avery_3490
adds support for Avery 3490 (Cherry-picked from 'master')
2025-05-05 15:01:00 +01:00
Calvin Schwartz cfd10ae294 adds support for Avery 3490 2025-05-05 14:59:10 +01:00
snipe 9b85e9a071 Add @realchrisolin as a contributor 2025-05-05 14:44:04 +01:00
snipe 407962d998 Merge pull request #16790 from Godmartinz/empty_field_columns_labels
Adds Label fields offset as an option
2025-05-05 14:09:40 +01:00
snipe 1245289906 Add @chfsx as a contributor 2025-05-05 14:08:31 +01:00
snipe 76c19202ed Merge pull request #16806 from chfsx/patch-1
[FIX] set upload-limit
2025-05-05 14:07:42 +01:00
snipe ada8195e2e Merge pull request #16860 from grokability/better_location_scope_check
Livewire component for smoother check for location companies
2025-05-05 14:04:23 +01:00
snipe 83d6e9ad8a Removed log error
Signed-off-by: snipe <snipe@snipe.net>
2025-05-05 14:00:05 +01:00
snipe 4469db0bd3 Livewire component for smoother check for location companies
Signed-off-by: snipe <snipe@snipe.net>
2025-05-05 13:55:28 +01:00
snipe 5e2dba5483 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-05-05 11:15:46 +01:00
Fabian Schmid 9de97694c3 [FIX] set upload-limit 2025-05-05 08:35:45 +02:00
Jeremy Price 8349065b0a stop buiulding intel on arm 2025-05-02 10:59:42 +02:00
Jeremy Price bb82b2513e Fix dockerhub repo we're pushing to, and arm build names 2025-05-02 10:58:25 +02:00
snipe e781c170f3 Merge pull request #16841 from Godmartinz/dark_mode_black_input_group_add_on_color_fix
remove duplicate input-group color corrections from theme skins
2025-05-01 01:48:49 +01:00
Godfrey M 43dfbd3d21 remove duplicate input-group color correction from other themes 2025-04-30 16:21:15 -07:00
Godfrey M 073c9f5f7c remove duplicate input-group color correction 2025-04-30 16:16:14 -07:00
snipe f9d67dd431 Merge pull request #16840 from uberbrady/docker_backmerge
Copy changes from 'master' to develop for docker builds
2025-04-30 21:19:22 +01:00
Brady Wetherington a2ea4c7fd0 Copy changes from 'master' to develop for docker builds 2025-04-30 21:12:10 +01:00
snipe a0358e32d7 Removed escaping
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 16:46:06 +01:00
snipe c2023c5c56 Ampersand showing in Custom fields [sc-29051]
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 16:25:44 +01:00
snipe 43c310c82d Merge pull request #16531 from akemidx/bug/sc-28715
FIXED: Purchase Cost Column Always Shown
2025-04-30 15:54:31 +01:00
snipe 939a0c44dc Merge pull request #16826 from Godmartinz/fix_multiple_inline_label_field_options
Reworked fix for for 24mm_D label indent errror
2025-04-30 15:47:57 +01:00
snipe 2b9cf1663b Merge pull request #16837 from grokability/fmcs_scoping_improvements
Small improvements to scoped views
2025-04-30 15:33:53 +01:00
snipe 0a29e90701 Smal improvements to scoping displays
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 15:24:42 +01:00
snipe d1be13e7d4 Added button text to translations
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 14:32:29 +01:00
snipe 049a777ca8 Added buttons to dashboard
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 14:32:20 +01:00
snipe 0dcaa83a3e Nicer breadcrumb
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 14:22:13 +01:00
snipe db706269e6 Fixed validation message
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 14:22:06 +01:00
snipe 4f72505dc3 Merge pull request #16836 from grokability/fixes/#16834_handle_bad_data_in_permissions
Fixed #16834 - better handle bad data in permissions
2025-04-30 13:56:59 +01:00
snipe 340f8b73a5 Updated comments
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 13:56:37 +01:00
snipe 6c6b37000a Better handle permissions with bad data
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 13:43:05 +01:00
snipe b5c79624c6 Display notes in group listing
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 11:14:42 +01:00
snipe 49d66dedf4 Nicer existing image display
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 10:19:12 +01:00
snipe ebbcdbc864 Nicer breadcrumb
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 10:11:55 +01:00
snipe a18691c09f Set image path in singleton
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 10:11:48 +01:00
snipe 245b0b0f8f Added image path
Signed-off-by: snipe <snipe@snipe.net>
2025-04-30 10:11:40 +01:00
snipe 1d3b0478f9 Merge pull request #16829 from marcusmoore/fixes/contributors-fix
Fixed updating CONTRIBUTORS.md via cli
2025-04-30 01:23:59 +01:00
Marcus Moore a5d0307532 Wrap username in quotes 2025-04-29 16:20:00 -07:00
snipe 7daecdd53f Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 23:17:03 +01:00
snipe 667b4a49c3 Merge pull request #16828 from grokability/chore/sc-29037
Add audit button to BS table partial, redirect if asset won't validate
2025-04-29 23:07:45 +01:00
snipe 2518e60a5e Corrected gates
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 22:59:05 +01:00
snipe 9ff8b62cee Updated icon
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 22:58:58 +01:00
snipe 5086c80658 Invoke a validator, redirect to edit screen if invalid
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 22:47:34 +01:00
snipe cb852fc20f Added audit gate to API
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 22:47:12 +01:00
snipe fb3b34e0f6 Add audit button to BS table partial
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 22:47:02 +01:00
snipe 8d4fc07f63 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 20:37:47 +01:00
snipe a0514ad8c1 Merge pull request #16799 from marcusmoore/bug/sc-28990
Handle category being null in CheckoutableListener
2025-04-29 20:37:11 +01:00
snipe 4e03e525a4 Merge pull request #16797 from Godmartinz/dark_mode_green_fix
Fixed Dark Mode color choices for fieldset links
2025-04-29 20:35:59 +01:00
snipe 0efdebcfd8 Merge pull request #16827 from grokability/fixed_custom_field_fieldset_display
Fixed fieldset display if custom fields are not available
2025-04-29 20:26:14 +01:00
snipe c7835d2d1d Fixed copypasta
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 20:08:34 +01:00
snipe 3e3bc0a347 Removed test tab
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 20:01:22 +01:00
snipe 184a22828f Use input vs get
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 19:22:10 +01:00
snipe f26e27d23e Display in checkboxes not saving on custom [sc-29028]
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 19:21:50 +01:00
snipe e717f1e780 Removed logging
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 19:21:18 +01:00
snipe d1085a0f46 Move notes above custom fields
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 18:53:31 +01:00
Godfrey M 2e0913bb3b remove unused method 2025-04-29 10:49:19 -07:00
Godfrey M 851ae46ea9 reworked fix for for 24mm_D label indent errior 2025-04-29 10:45:29 -07:00
snipe 89a52b7551 Fixed fieldset display if custom fields are not available
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 18:09:32 +01:00
snipe 15870d0e75 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 12:38:07 +01:00
snipe eb2c536221 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 12:36:55 +01:00
snipe bced7df539 Merge pull request #16822 from grokability/nicer_optional_disclosures
Nicer disclosure UI for optional data
2025-04-29 12:31:14 +01:00
snipe fe672ed727 Nicer disclosure UI for optional data
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 12:10:09 +01:00
snipe 6e60594e66 Fixed escaped text
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 10:25:20 +01:00
snipe f357dd690b Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 10:21:24 +01:00
snipe 255e0c3bdc Merge pull request #16602 from akemidx/bug/sc-25897-2
FIXED: Text Overflow on Settings Tiles
2025-04-29 10:20:45 +01:00
snipe 8984d60c39 Merge pull request #16798 from grokability/more-mint-support-and-newer-ubuntus
Support more Mint versions and verify newer Ubuntu versions in snipeit.sh
2025-04-29 10:19:28 +01:00
snipe 6dbfc8875b Merge pull request #16817 from marcusmoore/fixes/restore-custom-field-values-on-asset-edit-v2
Maintain checkbox and radio custom field values on asset edit page
2025-04-29 10:17:10 +01:00
snipe 139f45872c Merge pull request #16819 from marcusmoore/chore/migrate-radio-helpers
Replaced calls to Form::radio helper on user create and edit pages
2025-04-29 10:16:16 +01:00
snipe eb223a4c09 Merge pull request #16821 from grokability/small_settings_ui_fixes
Use default BS tables “no results” view, small UI formatting improvements
2025-04-29 10:15:16 +01:00
snipe c3531e9eba Nicer formatting on smaller screens
Signed-off-by: snipe <snipe@snipe.net>
2025-04-29 10:11:00 +01:00
Marcus Moore db3f8e5d68 Replace a Form::radio on user edit page 2025-04-28 15:08:05 -07:00
Marcus Moore 8ca11542f8 Replace a Form::radio on user edit page 2025-04-28 15:03:54 -07:00
Marcus Moore 36be23f7e4 Replace a Form::radio on user edit page 2025-04-28 14:57:03 -07:00
Marcus Moore 51f67082f4 Replace a Form::radio on user edit page 2025-04-28 14:23:39 -07:00
Marcus Moore ea2f0cdd7b Replace a Form::radio on user edit page 2025-04-28 14:18:01 -07:00
Marcus Moore 97d2e6f9d4 Replace a Form::radio on user edit page 2025-04-28 14:03:27 -07:00
Marcus Moore 28ea75512c Replace from Form::radio on user edit page 2025-04-28 13:47:23 -07:00
snipe 9b6683ae16 Merge pull request #16818 from Godmartinz/fix_multiple_inline_label_field_options
Fixed label fields multiple option alignment bug
2025-04-28 21:37:19 +01:00
Godfrey M 149d276e06 fix field alignment issue 2025-04-28 13:26:49 -07:00
snipe a519ebe19b Default BS table no results
Signed-off-by: snipe <snipe@snipe.net>
2025-04-28 09:59:52 +01:00
snipe 66b537bc64 Fixed duplicate ID
Signed-off-by: snipe <snipe@snipe.net>
2025-04-28 09:59:28 +01:00
snipe 9722d29070 Use default BS tables “no results” view
Signed-off-by: snipe <snipe@snipe.net>
2025-04-28 09:59:17 +01:00
snipe c748278637 Merge pull request #16810 from grokability/settings_improvements_branding
Use fieldsets for branding page
2025-04-26 17:53:11 +01:00
snipe 23c39520e5 Added empty alt tags to images since we don’t have additional info
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:42:49 +01:00
snipe 41f68d8a30 Use locked x-icon
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:33:18 +01:00
snipe 7320e823ad Added alt text for sad panda
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:33:09 +01:00
snipe 1aeda546fd Added urls for pa11y
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:33:00 +01:00
snipe 91fcff5faf Added translations
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:32:52 +01:00
snipe d97e54f85e Use fieldsets for branding page
Signed-off-by: snipe <snipe@snipe.net>
2025-04-26 17:32:41 +01:00
snipe 4b58af8850 Fixed message while processing audit on quickscan
Signed-off-by: snipe <snipe@snipe.net>
2025-04-24 14:25:42 +01:00
snipe 0822aa985d Fixed #16802 - use asset endpoint for assets assigned to locations
Signed-off-by: snipe <snipe@snipe.net>
2025-04-24 14:05:44 +01:00
snipe e5c6e294ec Added #16239 - make city searchabke in users
Signed-off-by: snipe <snipe@snipe.net>
2025-04-24 12:16:41 +01:00
Marcus Moore 25fdde1807 Handle null category 2025-04-23 14:16:28 -07:00
snipe fa45ca1453 Stupid fix for when people use id instead of an actual ID
@todo - use RMB for these

Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 21:56:43 +01:00
Jeremy Price 67ec042ee3 Support more Mint versions and verify newer Ubuntu versions in snipeit.sh
In https://github.com/grokability/snipe-it/pull/16763 we added support
for Linux Mint 22.1, which is the newest stable version of Mint, but but
didn't get around to testing or adding support for less-recent versions.

With this PR, we're adding support for the following LinuxMint versions
* 22
* 21.3
* 21.2
* 21.1
* 21

We recommend using the newest version, but at least now you won't be
blocked so long as you're remotely up-to-date.

We're not going back any further because prior versions are based on
Ubuntu 20.04 (Focal), which is out of support as of April 2025, aka this
month.

Additionally, the most recent Ubuntu version specifically mentioned in
the script is 23.10. The script in its current version works all the way
up to the most recent version, so we're adding notation to that
effect.

Newly included Ubuntu versions are
25.04
24.10
24.04 (LTS)
2025-04-23 13:37:33 -07:00
snipe 8b6c88a7c6 Okay…
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 21:27:28 +01:00
snipe 9f8fddb4c5 Removed accidentally commited generated images
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 21:23:58 +01:00
snipe 8fcf7e3b9d Merge pull request #16792 from grokability/add_pa11y
Added pa11y
2025-04-23 21:17:35 +01:00
snipe d9326fc555 Removed sky-is-blue text
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 21:13:40 +01:00
snipe c1196599e1 Merge branch 'develop' into add_pa11y 2025-04-23 21:11:59 +01:00
Godfrey M a26279e0b9 adds custom field link color correction to all dark modes 2025-04-23 12:38:58 -07:00
Marcus Moore 29433882ea Restore custom field checkbox and radio button values when switching model 2025-04-23 12:38:09 -07:00
snipe e3f511ec7c Small accessibility improvements
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 15:53:41 +01:00
snipe f0b18042f9 Added aria label to admin settings search
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 14:01:52 +01:00
snipe 75c9936dbb Added alt text
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 12:37:13 +01:00
snipe ddd4065c81 Merge pull request #16793 from spencerrlongg/bug/sc-28972
Added Nullsafe Checks to Users
2025-04-23 12:01:25 +01:00
snipe ad88a72d0a Override legend style
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 06:31:25 +01:00
snipe 6a00620552 More urls
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 06:27:20 +01:00
snipe a9db8d6898 Added more urls
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 06:20:23 +01:00
snipe 65cc1bbd7e Ignore screenshots
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 05:53:11 +01:00
spencerrlongg 2935697209 added nullsafe checks to user 2025-04-22 23:39:24 -05:00
snipe 3ae2454228 This doesn’t work the way I thought
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 05:35:49 +01:00
snipe 11b48ee636 Removed dupes
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 05:21:32 +01:00
snipe 2aa864afaa Updated rules
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 05:16:22 +01:00
snipe ec65e64a67 Updated ignore rules
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 05:06:34 +01:00
snipe 7e01d23aa2 Renamed file
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 04:50:14 +01:00
snipe f05b2ad9be First stabs at improvements
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 04:48:47 +01:00
snipe eaaac76435 Added configs
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 04:48:39 +01:00
snipe 41160c64a8 Merge pull request #16791 from grokability/location_company_scoping_improvements
Improved settings page for location-company scoping
2025-04-23 01:25:54 +01:00
snipe 0cfef59568 Updated string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 01:22:25 +01:00
snipe d953d1a889 Use translation strings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 01:21:54 +01:00
snipe 4aa06f6a75 Update dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-23 00:30:06 +01:00
snipe 07a9bded95 Added strings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 23:50:28 +01:00
snipe f686e86afb Refactored setting page
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 23:50:21 +01:00
snipe 9f28dae01b Invoke the artisan command
This *might* suck for people with a lot of assets, etc

Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 23:50:11 +01:00
snipe 67ab584dc7 Updated text
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 23:49:31 +01:00
Godfrey M 5da492cbf5 set max to 5 2025-04-22 12:07:02 -07:00
Godfrey M d871c529d1 fix input max, and help block position 2025-04-22 11:59:19 -07:00
Godfrey M 7c2c5ea98d adds Field offset option to labels 2025-04-22 10:50:20 -07:00
snipe 2e31a0530f Merge pull request #16789 from grokability/fixes/#16475_delete_oauth_clients
Fixed #16475 - Allow deleting oauth client
2025-04-22 17:48:24 +01:00
snipe 5f66fb0bba Allow deleting oauth user
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 17:42:07 +01:00
snipe 143e9cdd61 Merge pull request #16788 from grokability/better_handle_arrays_for_model_ids
Better handle model_id arrays passed to the API
2025-04-22 16:33:47 +01:00
snipe aed32e6ada Better handle arrays in API rerquests for model_id
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 16:23:34 +01:00
snipe ed86c90b7e Merge pull request #16787 from uberbrady/suppress_action_date_error_in_loggable
Fixed: [RB-19645] Suppress error message about 'action_date' not existing
2025-04-22 14:48:38 +01:00
snipe 7dc606fd3b Merge pull request #16786 from grokability/populate_manufacturers
Added ability to seed common manufacturers
2025-04-22 14:35:20 +01:00
snipe 185fd559c9 Added test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 14:34:03 +01:00
snipe 473c684fa5 Nicer translation
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 14:22:58 +01:00
Brady Wetherington d3dbd82ce2 Check that array key exists before accessing it 2025-04-22 14:20:01 +01:00
snipe e5dc13e48c Added ability to seed manufacturers
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 14:13:46 +01:00
snipe 2a2d118973 Updated readme with star count
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 12:38:05 +01:00
snipe f2f17402c9 Merge pull request #16785 from grokability/feature/sc-28956
Added checkout date to license seats
2025-04-22 11:41:52 +01:00
snipe 39f764803d Added checkout date to license seats
Signed-off-by: snipe <snipe@snipe.net>
2025-04-22 11:38:54 +01:00
snipe 55176816aa Merge pull request #16784 from marcusmoore/fix-flaky-timestamp-tests
Fixed flaky test
2025-04-22 11:03:58 +01:00
Marcus Moore 1f7d4e0793 Fix flaky test 2025-04-21 15:14:53 -07:00
snipe e17fae02ad Merge pull request #16783 from uberbrady/upgrade_debugbar
Upgrade Debugbar to make deprecation warnings easier to find
2025-04-21 21:44:28 +01:00
Brady Wetherington 3c1099a6a9 Upgrade Debugbar to make deprecation warnings easier to find 2025-04-21 21:00:02 +01:00
snipe b1761ec246 Merge pull request #16781 from uberbrady/make_min_qty_not_required
min_amt wasn't correctly being set to required or not
2025-04-21 18:44:20 +01:00
Brady Wetherington 03f0f13727 min_amt wasn't correctly being set to required or not 2025-04-21 18:32:53 +01:00
snipe 12648912aa Added test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 16:45:10 +01:00
snipe 4c898a8741 Fixed filename
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 16:44:47 +01:00
snipe 6bef8620e4 Merge pull request #16780 from grokability/feature/sc-23604
Fixed #9249 - added file uploads to locations
2025-04-21 14:49:02 +01:00
snipe beb5560dce Added files tab
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 14:43:04 +01:00
snipe 2ebe1ebc69 Load location route files
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 14:42:58 +01:00
snipe 00092a079f Added uploads method
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 14:42:10 +01:00
snipe 9d313eb2d9 Added locations dir
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 14:42:02 +01:00
snipe e8404c8720 Moved location routes
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 14:41:52 +01:00
snipe e71e25955a Check for array
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 12:20:03 +01:00
snipe fa9ac3c449 Return value as int
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 11:53:26 +01:00
snipe 70854b2c42 Small fix or groups API
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 11:49:49 +01:00
snipe e2a1be9762 Int values for group permissions on API
Signed-off-by: snipe <snipe@snipe.net>
2025-04-21 10:49:28 +01:00
snipe f2c2fefd99 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 15:28:48 +01:00
snipe b5a960e933 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 15:27:41 +01:00
snipe 66b2cc2e28 Set empty array if permissions are null
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 15:17:55 +01:00
snipe 47246a3fdf Merge pull request #15420 from grokability/return_boolean_in_api
Possible fix for #15315 - decode as permissions as boolean
2025-04-19 15:01:36 +01:00
snipe 4d01b2bb4f Removed invalid json_decode() flag
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:57:43 +01:00
snipe 876715b3c5 Merge pull request #16435 from marcusmoore/fixes/prevent-deleting-accessories-with-checkouts
Disallow deleting accessories that have active checkouts
2025-04-19 14:38:14 +01:00
snipe 93d74587e1 Merge pull request #16538 from marcusmoore/bug/sc-28305
Return null from accessory transformer for missing assignment
2025-04-19 14:37:45 +01:00
snipe 5bae74bc1b Merge pull request #16688 from 36864/patch-1
Fixes #14734: Only show signatures for the printed user
2025-04-19 14:36:26 +01:00
snipe 0259c91a06 Added @mrdahbi as a contributor
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:34:15 +01:00
snipe 04ccfc3002 Fixed: escape '/' in preg_quote of asset tag prefix (Applied #16542 to develop)
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:32:21 +01:00
snipe 495b7db72b Merge branch 'chore/sc-28495' into develop
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:29:30 +01:00
snipe 6e5eb55b45 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-19 14:28:01 +01:00
snipe 9ad99c1d81 Merge pull request #16494 from marcusmoore/bug/sc-28675
Avoid logging consumable checkins and purge action log of bad entries
2025-04-19 14:24:52 +01:00
snipe 622626bb27 Merge pull request #16521 from grokability/add-disable-saml-command
Add console command to disable SAML logins
2025-04-19 14:23:49 +01:00
snipe f66575393a Merge pull request #16766 from CloCkWeRX/fix-placeholder-translations
Fixed: Admin > General Settings - Some placeholders not translatable
2025-04-18 16:40:53 +01:00
snipe f67548cd70 Merge pull request #16738 from CloCkWeRX/patch-9
Fixed: Update SECURITY.md to indicate v8 is supported
2025-04-18 16:33:18 +01:00
snipe cd63657a92 Merge pull request #16694 from r-xyz/api-files-notes
Fixed #16689: re-add `note` field in API files listing for AssetModel
2025-04-18 14:06:30 +01:00
snipe 54f2b62294 Fixed consumable item_no import field
Signed-off-by: snipe <snipe@snipe.net>
2025-04-18 00:55:56 +01:00
snipe 1a1120220c Merge pull request #16765 from grokability/#15035-add-company_name_to_slack
Fixed #15035 - adds company to slack message
2025-04-18 00:36:25 +01:00
Daniel O'Connor 82d93b6980 Point to existing translation 2025-04-17 23:32:11 +00:00
Daniel O'Connor 72b2b2d819 Refactor to translatable placeholder text 2025-04-17 23:30:08 +00:00
snipe ad6352adc4 Fixed #15035 - adds company to slack message
Signed-off-by: snipe <snipe@snipe.net>
2025-04-18 00:28:37 +01:00
snipe 4170397094 Merge pull request #16731 from CloCkWeRX/patch-4
Fixed: Editing > Email input > Utilise HTML5 controls
2025-04-17 23:16:23 +01:00
snipe 1e15aca809 Merge pull request #16733 from CloCkWeRX/patch-6
Fixed: Suppliers > Edit > Mark URL inputs as HTML5 URL inputs
2025-04-17 23:15:53 +01:00
snipe 8234c3eb0f Merge pull request #16734 from CloCkWeRX/patch-7
Fixed: Users > Edit > Mark website as a URL field
2025-04-17 23:14:59 +01:00
snipe 80eea7b064 Merge pull request #16757 from CloCkWeRX/fields
Fixed: Admin > Custom Fields > Ensure name field is marked required
2025-04-17 23:14:26 +01:00
snipe 779c28661e Merge pull request #16753 from CloCkWeRX/admin-slack-hook
Fixed: Admin > Webhooks > Swap to url input
2025-04-17 23:13:58 +01:00
snipe 516f59f0fc Added @BeatSpark as contributor
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 23:12:51 +01:00
snipe bfb55da1a3 Repeat #16571 without conflicts, correctly targeted
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 23:10:20 +01:00
snipe 79e2e5c272 Merge pull request #16729 from CloCkWeRX/patch-2
Fixed #16727: Bulk Audit > Mark Asset Tag input required
2025-04-17 23:06:26 +01:00
snipe db1af98992 Merge pull request #16764 from grokability/fixed_flaky_user_create_tests
Fixed flaky user creation tests
2025-04-17 22:46:42 +01:00
snipe c8ea3ba79a Merge pull request #16763 from grokability/add-linux-mint
Fixed: #16715 - Added LinuxMint support to snipeit.sh
2025-04-17 22:40:33 +01:00
snipe 96d5e072fe Fixed flaky tests on user creation
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 22:39:04 +01:00
snipe d25ba74123 Merge pull request #16762 from grokability/fixes/#15702-min_amt_and_termination_date_on_license_import
Fixed #15702 - Added termination_date, reordered fields for clarity
2025-04-17 21:37:27 +01:00
snipe f05dce8960 Added min_amt explicitly
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 21:31:20 +01:00
snipe 0758e73c5f Added termination_date, reordered fields for clarity
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 21:29:27 +01:00
Jeremy Price 617ee026c0 Add LinuxMint support to snipeit.sh
Fixes: https://github.com/grokability/snipe-it/issues/16715

@synergy34 requested LinuxMint support in our installer script. Mint is
Ubuntu-based, so i figured this wouldn't be too big of an issue, and
indeed it wasn't.

It mostly involved just supporting the OS version strings, and removing
the ondrej ppa because 22.1 ships with php8.3 already.

We only support 22.1 for the moment, as that's the most recent version
and the only one I tested on.

If you're on 22/Wilma and want to try, change the 221 on line 579 to 22 and
give it a whirl... If 22/Wilma also has php8.3, then it will probably be
fine
2025-04-17 12:22:42 -07:00
Daniel O'Connor 0cec64c056 Update SECURITY.md to indicate v8 is support
Unsure if v7 still is
2025-04-17 16:02:31 +00:00
snipe 915c730dae Fixed #16714 - moved custom validation out of array
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 16:42:25 +01:00
snipe 0451f1219a Merge pull request #16732 from CloCkWeRX/patch-5
Fixed: Manufacturers > Edit > Mark URL inputs as HTML5 url inputs
2025-04-17 16:27:03 +01:00
Daniel O'Connor 5290a95b6b Update resources/views/hardware/quickscan.blade.php 2025-04-18 00:53:37 +09:30
snipe e407695ff9 Merge pull request #16741 from CloCkWeRX/patch-10
Fixed: Change Password > Mark password fields required for change password
2025-04-17 16:22:01 +01:00
snipe c5b53b00c1 Merge pull request #16742 from CloCkWeRX/security-url
Fixed: Admin > Security - Mark url fields as URL type
2025-04-17 16:21:26 +01:00
snipe d2ac9b9610 Added @CloCkWeRX as contributor
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 16:18:29 +01:00
snipe 537e695ae9 Merge pull request #16730 from CloCkWeRX/patch-3
Fixed: Depreciations > Create/Edit > Change controls to various number inputs
2025-04-17 16:15:24 +01:00
snipe b4b158da9e Merge pull request #16747 from CloCkWeRX/admin-oauth-required
Fixed: Admin > OAuth > Mark fields required
2025-04-17 16:09:42 +01:00
snipe ad072c0546 Moved validation email_array
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 16:04:56 +01:00
snipe 713e1671d4 Merge pull request #16749 from CloCkWeRX/admin-ldap-change-password-url
Fixed: Admin > LDAP > Use HTML5 inputs
2025-04-17 15:58:45 +01:00
snipe 087f9756a2 Merge pull request #16744 from CloCkWeRX/api-token-required
Fixed: Manage API Keys > New name field not marked required
2025-04-17 15:58:07 +01:00
snipe eb0408703e Merge pull request #16725 from CloCkWeRX/patch-1
Fixed #16723: Mark category name as required in modals
2025-04-17 15:47:07 +01:00
Daniel O'Connor 7e961b690a Mark required 2025-04-17 11:05:03 +00:00
snipe 81f3730d84 Merge pull request #16754 from grokability/fixes/ambiguous_clause_for_company_id
Fixed ambiguous clause using company_id
2025-04-17 11:58:15 +01:00
snipe 141fad8393 Fixed ambiguous clause using company_id
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 11:56:39 +01:00
Daniel O'Connor 58ff63845e Admin > Slack > Swap to url input 2025-04-17 10:47:37 +00:00
Daniel O'Connor a8150b7864 Update resources/views/settings/ldap.blade.php 2025-04-17 19:57:52 +09:30
Daniel O'Connor ce6724f788 Admin > LDAP > Swap to URL input 2025-04-17 10:25:23 +00:00
Daniel O'Connor 13faa8ab00 Admin > LDAP > Swap to URL input 2025-04-17 10:23:43 +00:00
Daniel O'Connor 89beb73836 Swap to URL input 2025-04-17 19:49:28 +09:30
Daniel O'Connor 8b7e36a697 Mark fields required 2025-04-17 10:17:32 +00:00
Daniel O'Connor c0f3d89b0b Fixed: Manage API Keys > New name field not marked required 2025-04-17 10:00:26 +00:00
Daniel O'Connor ec62a59e57 Update resources/views/depreciations/edit.blade.php 2025-04-17 19:20:44 +09:30
Daniel O'Connor f9269cfc63 Mark required 2025-04-17 19:19:19 +09:30
Daniel O'Connor 56bc06746c Set max limit 2025-04-17 19:18:31 +09:30
Daniel O'Connor 497e94d8a0 Admin > Security - Mark url fields as URL type 2025-04-17 09:42:45 +00:00
Daniel O'Connor aa77c8c528 Mark password fields required for change password 2025-04-17 09:40:27 +00:00
Daniel O'Connor 6cd2a5d1a5 Users > Edit > Mark website as a URL field 2025-04-17 09:35:35 +00:00
Daniel O'Connor e4a3a1a35f Suppliers > Edit > Mark URL inputs as HTML5 URL inputs 2025-04-17 09:34:45 +00:00
Daniel O'Connor 06f3cc1345 Manufacturers > Edit > Opt into HTML fields 2025-04-17 09:33:24 +00:00
Daniel O'Connor 3a6832ea58 Editing > Email input > Utilise HTML5 controls
Should be safe as this is validated by the UI as a singular email.
2025-04-17 09:32:02 +00:00
Daniel O'Connor d2bb7fc926 Deprecations > Create/Edit > Mark number of months as a numeric control 2025-04-17 09:30:56 +00:00
Daniel O'Connor 4b93f329c2 Bulk Audit > Mark Asset Tag input required
Fix https://github.com/grokability/snipe-it/issues/16727
2025-04-17 09:29:43 +00:00
Daniel O'Connor f03da92152 Mark category name as required in modals
Fix #16723
2025-04-17 09:27:04 +00:00
snipe 88acdbcc28 Move array return
Signed-off-by: snipe <snipe@snipe.net>
2025-04-17 01:00:09 +01:00
snipe 23623cca2c Merge pull request #16719 from grokability/fixes_weird_layout_datepicker
Use x-icon blade component, nicer small-screen form size for datepicker on assets checkout
2025-04-16 21:13:21 +01:00
snipe 93e66aae54 Nicer form sizing on smaller screens
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 21:05:56 +01:00
snipe 02b831c174 Use x-icon blade component
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 21:05:43 +01:00
snipe cd20486fe2 Merge pull request #16667 from Godmartinz/user-redirect-checkin-option
Adds option to redirect back to checkedInBy user for assets/licenses/accessories
2025-04-16 20:54:47 +01:00
snipe 1464f80425 Merge pull request #16717 from Godmartinz/fix_checkin_mail_test
Adds a check for category email alert boolean, bolster Check in Test
2025-04-16 18:10:29 +01:00
Godfrey M 8f673a7e3e default checkin_email to true in category factory 2025-04-16 10:05:37 -07:00
Godfrey M c44d037933 removed some words 2025-04-16 09:57:40 -07:00
Godfrey M c8b5b3f176 adds a check for category checkin/out emails, also updates our test 2025-04-16 09:51:44 -07:00
snipe ce94470a10 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 16:41:25 +01:00
snipe e7592eeeb9 Use disable admin CC
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 16:41:14 +01:00
snipe 46253b421e Added disableAdminCC to settings test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 16:41:04 +01:00
snipe 7d4e77a7c8 Updated string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 15:52:05 +01:00
snipe 9a4f21e0cb Merge pull request #16716 from grokability/log_deprecations
Allow toggle for logging deprecation warnings
2025-04-16 14:28:07 +01:00
snipe 934aa3da7f Allow toggle for logging deprecation warnings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 14:25:51 +01:00
snipe e4244d60f1 Check for username
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 09:47:06 +01:00
snipe 0b6c6bf1df Send email to CC addresses even if the target doesn’t have an email
Signed-off-by: snipe <snipe@snipe.net>
2025-04-16 09:18:50 +01:00
snipe b35181c289 Removed deleted accessories (for now) from transformer
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 21:15:43 +01:00
snipe 277564436b Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 20:45:13 +01:00
snipe 87a03ec1ed Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 20:41:43 +01:00
snipe f8833241ef Added @36864 as contributor
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 20:28:36 +01:00
snipe 7f62c5cbb6 Add @fvollmer as a contributor 2025-04-15 20:22:23 +01:00
snipe 93b4749993 Update @ntaylor-86 as a contributor 2025-04-15 20:20:36 +01:00
snipe b2dac291da Merge pull request #16712 from grokability/fixes/snipe-api-token
Removed deprecation resulting in `Creation of dynamic property` error
2025-04-15 20:16:56 +01:00
Jermops bec83d4343 Merge pull request #16713 from grokability/fix-docker-arm-buildname
Fix name of ARM docker container workflow
2025-04-15 12:16:40 -07:00
snipe 4f3b3721c4 Remove comments
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 20:15:44 +01:00
Jeremy Price e5cf296b79 Fix name of ARM docker container workflow 2025-04-15 12:15:44 -07:00
snipe e1abdd1c7b Removed deprecation resulting in Creation of dynamic property
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 20:11:26 +01:00
snipe 71d8f1eb89 Merge pull request #16701 from grokability/repo-move
Update references to the repo to reflect move to Grokability org
2025-04-15 19:54:08 +01:00
snipe 68c1568345 Merge pull request #16711 from snipe/publish_assets
Updated dev CSS/LESS/JS assets
2025-04-15 19:40:48 +01:00
snipe b5be0844ec Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 19:39:58 +01:00
snipe f76e80ba68 Merge pull request #16710 from snipe/localizations/2025-04-15
Updated localization strings
2025-04-15 19:32:12 +01:00
snipe ffbab554be Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 19:30:19 +01:00
snipe 0be50e803e Merge pull request #16709 from snipe/#16699-fix-email-locales-when-none-set-on-user
Fixed #16699 - Better handle user locales in mailables
2025-04-15 16:44:38 +01:00
snipe 7133a1b262 Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:41:09 +01:00
snipe 5876418eed Search on email partial
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:31:03 +01:00
snipe 950472b935 Fixed typos
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:30:54 +01:00
snipe c0c5699e38 Added public property name
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:21:02 +01:00
snipe 49fee3a211 Removed manually setting locale on mailable
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:10:54 +01:00
snipe a21ca92c90 Added boot method to set name property for mailable
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 16:08:21 +01:00
snipe 260174dfd9 Added test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 15:46:12 +01:00
snipe afc5e08716 Added email as searchable field in select list
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 15:45:25 +01:00
snipe 89616727a1 Remove english as default
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 15:45:11 +01:00
snipe ba55dfb841 Fixed #16699 - added mutator for user locale
Signed-off-by: snipe <snipe@snipe.net>
2025-04-15 13:41:24 +01:00
snipe 65b956143c Merge pull request #16700 from snipe/docker-arm-size-fix
[Docker] Don't cache composer deps, remove any .git repos that creep in
2025-04-14 22:15:10 +01:00
snipe 42e1987147 Merge pull request #16702 from snipe/separate-docker-architecture-builds
Separate docker builds into Intel/ARM builds
2025-04-14 22:14:48 +01:00
Jeremy Price 545e07455b Separate docker builds into Intel/ARM builds
Now that we're moving to a paid org, we have native ARM github action
runners available, which means we can streamline our ARM-based docker
image builds by not having them run emulated.

I've switched our worker split from ubuntu/alpine to Intel/ARM...  if we
hate this we can make it 4 separate workflows, but i don't see an issue
with this one.
2025-04-14 12:55:36 -07:00
Jeremy Price b00594052c [Docker] Don't cache composer deps, remove any .git repos that creep in
There is a failure mode in composer where if it has a connection trying to get
a dependency tarball from the github API, it will fall-back to
downloading the entire repo for the dependency and use that... and it
will cache it outside of vendor/, using a whopping 1.5G of space

that full 1.5G is _then_ copied into vendor/

```
98M     league
100M	tecnickcom
133M	laravel
323M	sebastian
681M	aws
```

for a total of a 1.8G vendor/ directory

vs the trimmed-down version with a 552M vendor/ directory

```
53M	league
30M	tecnickcom
31M	laravel
70M	sebastian
241M	aws
```

This is still a far cry from the proper 150M version when everything
works as it should, but it's still a vast improvement

```
3.2M    league
14M     laravel
30M     tecnickcom
260K	sebastian
52M     aws
```

Ideally this never happens, but it'd be great tp avoid the bloat if/when
it does..

To wit: Our ARM/Ubuntu Docker images are currently bloated because of this
issue due builds happening on an emulated ARM environment, and the resultant
performance penalties causing composer issues

All that to say, this change sets OMPOSER_CACHE_DIR to /dev/null to
avoid the caching, and then removes vendor/*/*/.git to remove that
needless bloat if it occurs. It's a no-op in general practice.
2025-04-14 11:55:20 -07:00
snipe 1c387795fe Merge pull request #16683 from marcusmoore/bug/sc-28755
Create default label when importing assets if none exists
2025-04-14 09:52:48 +01:00
snipe 102f26cac1 Merge pull request #16676 from marcusmoore/fixes/acceptance-logging
Store accepted_at and declined_at in action log when accepting/declining assets
2025-04-14 09:18:54 +01:00
snipe c7e89ff879 Merge pull request #16682 from akemidx/bug/sc-28860
FIXED: Location Being Overwritten By Default Location
2025-04-14 09:17:52 +01:00
r-xyz 565b8f5c7f Fixed #16689: re-add note field in API files listing for AssetModel 2025-04-13 00:33:22 +02:00
36864 3b314086f9 New method to get latest signature event
This makes the print page much tidier.
2025-04-11 16:28:54 +00:00
36864 06fc140626 Optimize eager loading of log entries 2025-04-11 16:27:29 +00:00
36864 e4bfc6c5ae Fix signatures for accessories and consumables
Also unifies the way these things are fetched.
2025-04-11 16:24:06 +00:00
Marcus Moore b82d835f4f Remove created_by since it is not available 2025-04-10 13:59:28 -07:00
Marcus Moore d593365c9c Create pending default status label if none exists 2025-04-10 13:38:30 -07:00
Marcus Moore ea6a903d8a Implement tests including test failure 2025-04-10 13:29:05 -07:00
Marcus Moore 9086e5dba7 Scaffold some asset importer tests 2025-04-10 13:03:50 -07:00
akemidx cd10cd34f4 location update bug fix and test 2025-04-10 14:46:52 -04:00
snipe 0d6a83197a Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2025-04-09 21:29:31 +01:00
snipe 6d784e36d7 Updated language
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 21:29:27 +01:00
snipe 9c88aa6974 Merge pull request #16637 from akemidx/lastnameemail
Fixed #8188 - Added Last Name as an email format
2025-04-09 21:27:10 +01:00
akemidx 1307146831 changing where translations live. coalescing 2025-04-09 16:21:48 -04:00
Marcus Moore e5d7bcb629 Use declinded at for action date in log 2025-04-09 11:20:46 -07:00
Marcus Moore c2123e307a Add failing test 2025-04-09 11:20:07 -07:00
Marcus Moore 7a9d5bfc07 Add test for declining assets 2025-04-09 11:18:52 -07:00
Marcus Moore aed798800c Improve assertions 2025-04-09 11:17:57 -07:00
Marcus Moore dbfa952a69 Improve test name 2025-04-09 11:15:25 -07:00
Marcus Moore aa58f08b3d Use accepted at for action date in log 2025-04-09 11:13:46 -07:00
Marcus Moore d76871760c Add failing test 2025-04-09 11:11:30 -07:00
Marcus Moore d29f5fa13e Implement tests 2025-04-09 11:07:47 -07:00
Marcus Moore 7275299165 Scaffold some tests 2025-04-09 11:02:56 -07:00
Godfrey M 9824f43780 added other target options to accessories and assets 2025-04-09 10:50:42 -07:00
snipe 1b7486c342 Merge pull request #16674 from spencerrlongg/bug/allow-avif-restore-and-logo
Add Support for Uploading AVIF Logo Images
2025-04-09 17:46:53 +01:00
spencerrlongg cd9ee8af90 Add support for AVIF logo uploads and restoring avifs from public uploads
Extended the list of allowed file extensions and MIME types to include AVIF format in both backend file validation and the file input field for logo uploads. This update ensures compatibility with modern image formats.
2025-04-09 11:36:16 -05:00
snipe cbf4fef45b Merge pull request #16671 from snipe/fixed_list_view_of_asset_files
Partial fix for #16135 - normalized asset file listing at API endpoint
2025-04-09 06:45:32 +01:00
snipe 8892a11e7e Updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 06:40:14 +01:00
snipe fc390dd107 Merge pull request #16672 from snipe/added_missing_gate_to_some_location_methods
Added gates to printing locations
2025-04-09 06:28:38 +01:00
snipe 99dfb51d70 Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 06:23:40 +01:00
snipe 04f8ebb4d8 Added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 06:17:08 +01:00
snipe 41fb058adb Added gates around printing location assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 06:06:44 +01:00
snipe f29146b319 Fixed asset file listing display at API endpoint
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 05:53:24 +01:00
snipe ce0bd68716 RMB for file routes
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 05:52:59 +01:00
snipe f3f26b3824 Added UploadedFilesTransformer
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 05:52:48 +01:00
snipe 7be3d6072f Removed erroneous comment
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 05:52:35 +01:00
snipe 1d030b59df Merge pull request #16592 from fvollmer/anonymous-ldap
Improve Settings: Remove username and password requirement for ldap
2025-04-09 05:19:09 +01:00
snipe 07d2d8c549 Merge pull request #16669 from snipe/translations_for_skins
Fixed  #16130 - Added translations for skins, other settings
2025-04-09 02:37:17 +01:00
snipe 691ccbbebc Additional branding placeholders
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 02:32:22 +01:00
snipe 9daa09277d Added translations for skins
Signed-off-by: snipe <snipe@snipe.net>
2025-04-09 02:23:18 +01:00
snipe 79eaf62c9e Merge pull request #16668 from spencerrlongg/bug/sc-28768
Handle Potentially Unsafe File Output Better During Restore
2025-04-09 01:01:59 +01:00
spencerrlongg dd078785ac always show unsafe files 2025-04-08 18:06:18 -05:00
spencerrlongg 12a8c54331 Handle and log skipped unsafe files during restore
Introduced a mechanism to track and log potentially unsafe files skipped during the restore process. These files are collected in an array and displayed as warnings before exiting, improving transparency and debugging capability.
2025-04-08 16:43:36 -05:00
Godfrey M 715fc2de59 more cleaning 2025-04-08 11:58:23 -07:00
Godfrey M af53559ca3 cleaned up code 2025-04-08 11:54:50 -07:00
Godfrey M 17b8ea9c86 removed unnecessary code 2025-04-08 11:51:29 -07:00
Godfrey M 1ad96e891b added option logic to licenses 2025-04-08 11:50:45 -07:00
Jeremy Price 4e2b4195b4 Grokability-ize .well-known/security.txt 2025-04-08 11:50:03 -07:00
Godfrey M b7492928ad reworked checkedInBy, added option logic to accessories 2025-04-08 11:43:02 -07:00
snipe 9f04254963 Merge pull request #16666 from snipe/print_view_tweaks
Added signature to licenses in print view, misc other fixes
2025-04-08 19:34:02 +01:00
snipe 10b8055b29 Added monospace class
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 19:10:16 +01:00
snipe 2b85ddeb74 Use correct date
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 19:10:06 +01:00
snipe 9017ae8545 Added category to consumable checkout
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 19:09:58 +01:00
snipe d0359a42fb Added signature to licenses
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 18:56:34 +01:00
akemidx 7701c6097f adding username split 2025-04-08 13:21:32 -04:00
akemidx 275e1beda2 updating for conflicts and adding test 2025-04-08 13:15:28 -04:00
Godfrey M 85b67dbb71 adds redirect to user option from checkin blades 2025-04-08 10:13:27 -07:00
akemidx f659b7631d Merge branch 'develop' into lastnameemail 2025-04-08 13:10:26 -04:00
Godfrey M a602b2fd47 adds option to redirect back to checkedInBy user for assets 2025-04-08 10:09:43 -07:00
snipe e0c6483b43 Merge pull request #16660 from snipe/cleanup_for_scoped_locations
Small improvements to location-by-company scoping
2025-04-08 17:57:50 +01:00
snipe c2e12f69d8 Merge pull request #16664 from 36864/patch-1
Fixes #16661: Empty signatures in print page
2025-04-08 17:57:11 +01:00
snipe 890702f66d A few more display tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 17:47:39 +01:00
36864 dfdbc95b5c Fix empty signatures in print page
Fixes snipe#16661 

Assuming that whatever happens between the user accepting and signing for the asset and the print page being accessed isn't another user somehow signing for the same asset and it not being assigned to that second user.
2025-04-08 15:50:59 +00:00
snipe ea365e5645 More fields visible
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 16:17:57 +01:00
snipe 548ae49c69 Small tweaks to table
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:30:07 +01:00
snipe 34f8f50a4a Use localization, turned display into table
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:13:57 +01:00
snipe da2c760227 Renamed variables, skipped breaking out of loop
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:13:19 +01:00
snipe a96abeac5f Use localization w/trans_choice
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:12:58 +01:00
snipe 420278c63b Nicer layout for settings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:12:36 +01:00
snipe e0a04fe1ce Localized message
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 15:12:19 +01:00
snipe c42f53e846 Use table layout
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 12:34:11 +01:00
snipe 44ee287cc0 Nicer formatting
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 12:34:00 +01:00
fvollmer a56f6148fc Improve Settings: Remove username and password requirement for ldap
Since 9d62793 anonymous LDAP login is available. Remove username and password requirement in settings dialog.
2025-04-08 11:04:37 +02:00
snipe 5b1d6dbe14 Merge pull request #12577 from Toreg87/feature/locations_with_companies
Added #2353: Add ability to tie locations to companies - 2023 edition
2025-04-08 09:54:37 +01:00
snipe 43c15ef134 Merge branch 'develop' into feature/locations_with_companies 2025-04-08 09:18:48 +01:00
snipe a7203b0bbf Updated links, added mobile apps
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 08:32:15 +01:00
snipe a14d3ad856 Merge pull request #16493 from snipe/min_qty_in_bulk_model_edit
Add min_qty to asset model bulk edit
2025-04-08 08:22:03 +01:00
snipe fcd0ca3b94 Merge branch 'develop' into min_qty_in_bulk_model_edit 2025-04-08 07:14:15 +01:00
snipe 90329a2b2f Merge pull request #16529 from Godmartinz/location_tab_active-n-scroll_bar_fix
Fix active table tab and double scroll bar under locations
2025-04-08 07:12:33 +01:00
snipe 7448f67e12 Merge pull request #16658 from snipe/fix_bad_data_on_permission_groups
Set empty array if group permission is a string or null
2025-04-08 07:10:02 +01:00
snipe 22be89fbea Set empty array if group permission is a string or null
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 07:06:56 +01:00
snipe fe65ffc384 Merge pull request #16527 from Godmartinz/license_seat_notes_fix
add notes as fillable to license seat model
2025-04-08 06:49:26 +01:00
snipe d44553c6dd Merge pull request #16553 from marcusmoore/tests/user-show
Added tests around emailing and printing assigned assets
2025-04-08 06:48:39 +01:00
snipe cfd845aefa Merge pull request #16500 from marcusmoore/bug/sc-28644-command
Added command to fix bulk checkin action log entries
2025-04-08 06:44:25 +01:00
snipe a98b277fa9 Merge pull request #16560 from spencerrlongg/bug/meta_status_multi_comp
Meta Status Fix for Multi Company
2025-04-08 06:43:57 +01:00
snipe 237975577d Merge pull request #16636 from marcusmoore/tests/delete-asset-tests
Added tests around deleting assets
2025-04-08 06:32:40 +01:00
snipe 2275186222 Merge pull request #16652 from akemidx/feature/sc-28820
Username dropdown to show Usernames and not Emails as Examples
2025-04-08 06:32:19 +01:00
snipe 5a1c81954f Merge pull request #16651 from Godmartinz/qr_code_location_option
Fixes #9660 - Adds location qr code option to labels
2025-04-08 05:53:48 +01:00
snipe 68e7d172a4 Merge pull request #16655 from snipe/adds_more_searchable_relations_to_activity
Fixed #13274 - Adds more searchable relations to activity report
2025-04-08 05:53:18 +01:00
snipe b2e0f48ed9 Added purchase date
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:50:03 +01:00
snipe 733ef9e23b Few more
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:44:49 +01:00
snipe 83562cfa83 Added additional searchable relations to activity report
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:23:39 +01:00
snipe de426c2d2c Merge pull request #16653 from snipe/add_audit_custom_fields
Fixed #13475 - Add custom fields to audit screen
2025-04-08 05:16:23 +01:00
snipe 05e66c33ee Added audits string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:09:08 +01:00
snipe 744e844291 Added audit tab
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:08:58 +01:00
snipe 31c9ffa32b Added audits method
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:08:42 +01:00
snipe c46a9a773d Fixed admin string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 05:08:08 +01:00
snipe 849da2fb63 Use correct audit icon
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 04:15:59 +01:00
snipe b51939ae76 Derp. Use correct model info
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 04:07:31 +01:00
snipe e95d7076b9 Added action_date
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 04:07:04 +01:00
snipe d2c7385197 Updated class for error text
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 04:06:54 +01:00
snipe 5beb0bf534 Added assertion for success in test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:39:17 +01:00
snipe c59e9770b7 Removed unusued property
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:39:05 +01:00
snipe 908bb35792 Use upload file request
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:38:35 +01:00
snipe c4d0afb8d4 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:24:33 +01:00
snipe 4b21f0d00b Removed stray character
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:03:45 +01:00
snipe 4aeba2a96b Try to fix tests
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:02:37 +01:00
snipe 74f8cb5298 Updated url in bootstrap partial
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:02:28 +01:00
snipe 62e863a0fa Removed tooltip code
This throws an error currently

Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:02:10 +01:00
snipe 5bbba56b0e Added orginal values for logging
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:01:39 +01:00
snipe e4180c2194 Removed duplicated code
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:01:29 +01:00
snipe f4e3e6ceb6 Added display_audit to custom fields transformer
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:01:08 +01:00
snipe f37ed3e055 Add display_audit to custom fields controller
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:00:51 +01:00
snipe 9bb349d34b Try to get the asset from the route if there is RMB
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 02:00:37 +01:00
snipe 362f14a01d Manually invoke a validator
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 01:59:33 +01:00
snipe 226ad52f07 Better UI route
Signed-off-by: snipe <snipe@snipe.net>
2025-04-08 01:59:08 +01:00
akemidx 443a5c2348 chaning username dropdown to be usernames and not emails 2025-04-07 19:25:32 -04:00
snipe ce460c9ab0 Updated route
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:15:09 +01:00
snipe c344c40310 Added auditAssets() to user factory
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:10:36 +01:00
snipe 95fef9682f Added migration
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:10:18 +01:00
snipe 241777c1fd Added translation string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:10:12 +01:00
snipe acdbf452e2 Added checkbox to custom field form
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:10:01 +01:00
snipe b8a9db2faf Added display_audit to custom fields list
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:09:51 +01:00
snipe dfdc24936d Added custom fields partial
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:09:29 +01:00
snipe 6a1bb06c13 Added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:09:14 +01:00
snipe cfa8ddffc0 Keep legacy URL for audit
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:08:05 +01:00
snipe 5b524399d9 Use RMB for asset audit API
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 22:07:51 +01:00
Godfrey M bc3b3cf86e add psuedo example location_id for preview 2025-04-07 12:53:17 -07:00
Godfrey M a69133e2ae adds location qr code option to labels 2025-04-07 12:36:05 -07:00
snipe b66618ff3f Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-04-07 13:54:10 +01:00
snipe b5ef856d9e Translate request cancel string
Signed-off-by: snipe <snipe@snipe.net>
2025-04-05 17:24:06 +01:00
snipe a302cc145a Merge pull request #16643 from snipe/small_requestable_improvements
Text tweaks and nicer buttons for requestable items
2025-04-05 16:07:57 +01:00
snipe d203c4e49c Text tweaks and nicer buttons
Signed-off-by: snipe <snipe@snipe.net>
2025-04-05 15:58:03 +01:00
snipe b5c7e60408 Merge pull request #16642 from snipe/fixed_#16640-FIFO-for-requestable
Fixed #16640 - FIFO for requestable assets
2025-04-05 15:39:29 +01:00
snipe 3684e9c1e8 Fixed #16640 - FIFO for requestable assets
Signed-off-by: snipe <snipe@snipe.net>
2025-04-05 15:38:13 +01:00
snipe f2c730bd57 Fix wrapping on #16628
Signed-off-by: snipe <snipe@snipe.net>
2025-04-05 14:10:23 +01:00
akemidx f0bf77735d adding last name only as a email choice 2025-04-03 23:34:04 -04:00
Marcus Moore 1b95b29832 Add tests for deleting asset via ui 2025-04-03 16:12:13 -07:00
Marcus Moore 9a8e5bf61e Backup before running updates 2025-04-03 14:39:40 -07:00
Marcus Moore 18ef88bd67 Improve comment 2025-04-03 13:13:52 -07:00
Marcus Moore 4ba58b2546 Constrain query 2025-04-03 13:10:45 -07:00
Marcus Moore 6dd3ab2ec9 Exit early if no logs found 2025-04-03 12:56:46 -07:00
Marcus Moore faee50c222 Use dry-run instead of dryrun 2025-04-03 12:56:07 -07:00
Jeremy Price afd9282785 Update remaining comments from snipe/snipe-it to grokability/snipe-it 2025-04-03 12:07:05 -07:00
Jeremy Price 1344ed1d16 Update app & composer files from snipe/snipe-it to grokability/snipe-it 2025-04-03 12:04:12 -07:00
Jeremy Price cbea096403 Update Vagrantfile files from snipe/snipe-it to grokability/snipe-it 2025-04-03 12:02:42 -07:00
Jeremy Price 094edbd114 Update css and less files from snipe/snipe-it to grokability/snipe-it 2025-04-03 12:00:51 -07:00
Jeremy Price f016b6b988 Update relevant README sections from snipe/snipe-it to grokability/snipe-it 2025-04-03 11:54:39 -07:00
Jeremy Price 782b35e0f1 Update scripts from snipe/snipe-it to grokability/snipe-it 2025-04-03 11:51:12 -07:00
Jeremy Price 70e9c6b947 Update relevant snipe/snipe-it references to grokability/snipe-it in Docker files 2025-04-03 11:44:27 -07:00
Jeremy Price 4a457c96e8 Update Contributors links from snipe/snipe-it to grokability/snipe-it 2025-04-03 11:39:21 -07:00
Jeremy Price 2e2516825e Update github workflows from snipe/snipe-it to grokability/snipe-it 2025-04-03 11:36:57 -07:00
snipe ba621cb1f2 Merge pull request #16632 from uberbrady/fix_paveit_command
Paveit had old Doctrine code to list tables; use the new method
2025-04-03 15:39:38 +01:00
snipe b1e2b5ab4a Merge pull request #16623 from Godmartinz/accessories_history_view_fix
Fixes Accessories history table color contrast
2025-04-03 15:37:55 +01:00
snipe 7c1438c370 Merge pull request #16446 from marcusmoore/feature/improve-checkout-asset-mail-wording
Improved wording in asset checkout emails
2025-04-03 15:37:30 +01:00
Brady Wetherington 760768f42d Paveit had old Doctrine code to list tables; use the new method 2025-04-03 15:35:07 +01:00
snipe cc8c2064c1 Merge pull request #16630 from snipe/license_key_formatting
Fixed #16628 - added formatting for license keys
2025-04-03 15:26:14 +01:00
snipe 33a921119c Merge pull request #16631 from snipe/add_webp_to_inline
Added webp as inline-able images
2025-04-03 15:25:48 +01:00
snipe 0e65498799 Added webp as inline-able images
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 15:24:03 +01:00
snipe 274c5fe4d3 Added max-width
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 15:07:10 +01:00
snipe b7c011dd2d Use new one line code style
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 15:03:31 +01:00
snipe a4a99adf80 Added one-line code style
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 15:03:16 +01:00
snipe c7890f4c3b Use id as copy key
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 13:52:55 +01:00
snipe 6d7f061a1d Larger key box
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 13:39:31 +01:00
snipe 45d3c0444b Added copy to license keys
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 12:29:30 +01:00
snipe 9204309d67 Checkin/Checkout note added to language file
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 12:28:47 +01:00
snipe a2035693e6 Added licenseKeyFormatter
Signed-off-by: snipe <snipe@snipe.net>
2025-04-03 12:28:30 +01:00
akemidx 392db81499 requested changes 2025-04-02 21:28:34 -04:00
snipe abfea8e349 Merge pull request #16624 from snipe/bug/sc-28682
Fixed [SC-28682] - Consumable import not importing supplier and item number
2025-04-03 01:45:52 +01:00
snipe ef20bd4aa8 Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:41:12 +01:00
snipe 2d9be4e9e0 Added supplier_id as fillable
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:10:25 +01:00
snipe 36767c0a5c Added more common fields for mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:10:16 +01:00
snipe 0d099263e3 Removed unneeded lines
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:09:28 +01:00
snipe 8f50e01d18 Shrink sample CSVs
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:09:04 +01:00
snipe d898288397 Remove email user for comonent import type
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 21:08:54 +01:00
Marcus Moore af88ce5801 Merge branch 'develop' into feature/improve-checkout-asset-mail-wording 2025-04-02 12:01:53 -07:00
Godfrey M b1b248f03d removed duplicate class from accessories history table 2025-04-02 11:29:01 -07:00
snipe df1c7c4f95 Merge pull request #16609 from snipe/login_throttle_update
Updated login attempts and throttle duration
2025-04-02 18:28:34 +01:00
snipe 7120b19d3b Fixed namespace
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 18:24:27 +01:00
snipe 2197b46658 Link to admin user
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 14:03:09 +01:00
snipe 785f576b19 Merge pull request #16621 from snipe/add_notes_to_location_sidebar
Fixed #16618 - added notes to location sidebar
2025-04-02 13:27:48 +01:00
snipe 31e337255a Use adminuser instead of created_by
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 13:26:12 +01:00
snipe f12d173581 Fixed #16618 - added notes to location sidebar
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 13:23:33 +01:00
snipe eb3dbb8c7a Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:49:53 +01:00
snipe ed908be2eb Merge pull request #16620 from snipe/#16619_fix_accessory_clone_population
Fixed #16619 - cloning accessory was not populating fields
2025-04-02 12:48:25 +01:00
snipe e215c5f9ee Fixed #16619 - accesory clone
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:43:42 +01:00
snipe 78f3c879ff Merge pull request #16617 from snipe/add_pdf_logo_upload
Fixed #16257 - Added acceptance PDF logo upload
2025-04-02 12:22:43 +01:00
snipe cb59c23f0b Added pdf logo to the blade
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:13:34 +01:00
snipe d0f750edea Added pdf logo to the controller
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:13:28 +01:00
snipe 56ae9d0ba9 Nicer upload logo labels
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:10:27 +01:00
snipe 15917d5f99 Use new logo
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:10:14 +01:00
snipe a59d69cb0d Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:10:05 +01:00
snipe 97cba45509 Added migration
Signed-off-by: snipe <snipe@snipe.net>
2025-04-02 12:09:57 +01:00
snipe 365ce34940 Merge pull request #16613 from marcusmoore/chore/update-rollbar
Update rollbar-laravel to 8.1
2025-04-02 10:48:51 +01:00
Marcus Moore 7048eceb9d Update rollbar/rollbar-laravel 2025-04-01 16:05:32 -07:00
snipe 9d61234f0c Merge pull request #16612 from snipe/re-fix_db_dump_ssl_fix
Fixes #16610, regression in #16543
2025-04-01 21:32:15 +01:00
snipe bef650757d Fixes #16610, regression in #16543
Signed-off-by: snipe <snipe@snipe.net>
2025-04-01 21:25:35 +01:00
Godfrey M 4ef161214d notification icon only appears when there are notifications 2025-04-01 12:01:35 -07:00
Godfrey M 29d0380db3 reword warning messages, remove warning if webhook cleared and saved, deprecations only for superadmins 2025-04-01 11:53:32 -07:00
snipe cb6e7f7b6e Merge pull request #16561 from spencerrlongg/bug/api_get_by_serial_add_pagination
Adds Pagination to Hardware By Serial API Request
2025-04-01 19:26:28 +01:00
snipe c305284930 Merge pull request #15922 from spencerrlongg/feature/sc-24347
Requestable/Request Item API Endpoints
2025-04-01 18:15:42 +01:00
snipe 6c47f1c07f Added test
Signed-off-by: snipe <snipe@snipe.net>
2025-04-01 17:44:44 +01:00
snipe 5d265f5bfd Change to minutes
Signed-off-by: snipe <snipe@snipe.net>
2025-04-01 15:01:34 +01:00
snipe daaad4fe9d Removed unneeded strings
Signed-off-by: snipe <snipe@snipe.net>
2025-04-01 14:36:53 +01:00
snipe 40ae5d421b Updated maxLoginAttempts and throttle duration
Signed-off-by: snipe <snipe@snipe.net>
2025-04-01 14:36:45 +01:00
akemidx d96498ab1f this is a redo after a borked rebase 2025-03-31 18:33:20 -04:00
spencerrlongg bfd827e529 added more eager loading 2025-03-31 12:28:03 -05:00
snipe d95549bbcf Merge pull request #16594 from uberbrady/fix_consumable_model_copy
Fixes [FD-47675 ] Fix consumable model number copy-to-clipboard button
2025-03-31 18:26:46 +01:00
snipe e10071a68e Merge pull request #16595 from uberbrady/fix_whitespace_encrypted_custom_fields_display
Fix whitespace encrypted custom fields display [FD-46570]
2025-03-31 18:25:13 +01:00
Brady Wetherington 92a77afd0b Fixes the clipboard button copying whitespace at the end of custom fields 2025-03-31 13:55:38 +01:00
Brady Wetherington 1369b993a4 Fix JS copy-to-clipboard for consumable model_num 2025-03-31 13:13:37 +01:00
snipe 382414df98 Merge pull request #16559 from Godmartinz/StoreLabelSettings_fix
Fix Form save error when using old label engine
2025-03-31 12:39:08 +01:00
snipe 6846c7d510 Merge pull request #16536 from akemidx/moving_warranty_info
Moving warranty/depreciation to be with the other cost/eol values
2025-03-31 12:35:32 +01:00
snipe 1d3069fe84 Merge pull request #16540 from marcusmoore/bug/sc-28607
Early return null from location transformer for missing accessory
2025-03-31 12:34:22 +01:00
snipe 13940071a9 Merge pull request #16546 from marcusmoore/bug/sc-28024
Fixed potential bad method call and premature email sending in bulk asset checkout
2025-03-31 12:32:50 +01:00
snipe 6870698cdc Add @ntaylor-86 as a contributor 2025-03-31 12:32:25 +01:00
snipe 4aa13c8dd4 Merge pull request #16543 from ntaylor-86/fixes/laravel-backup-ssl-error
Fixed #16217: database config, added option to skip ssl on the database dump
2025-03-31 12:32:00 +01:00
snipe 44db2dc78e Merge pull request #16520 from marcusmoore/bug/sc-28673
Remove unneeded eager loading for user show page
2025-03-31 12:31:12 +01:00
snipe 2e17e80ea9 [Snyk] Upgrade acorn from 8.14.0 to 8.14.1 #16587
Signed-off-by: snipe <snipe@snipe.net>
2025-03-31 12:30:09 +01:00
snipe 836d7ca8f9 [Snyk] Upgrade bootstrap-table from 1.24.0 to 1.24.1 #16588
Signed-off-by: snipe <snipe@snipe.net>
2025-03-31 12:29:00 +01:00
snipe 18e6a18389 Merge pull request #16576 from marcusmoore/fixes/api_company_note
Fixed notes not being saved and update for companies via api
2025-03-31 12:20:36 +01:00
snipe 1dd050ac0f Merge pull request #16577 from marcusmoore/tests/login-logging
Added tests around login attempt logging
2025-03-29 23:30:05 -01:00
Marcus Moore b8b0e3200e Add tests around loggin login attempts 2025-03-27 17:27:28 -07:00
Marcus Moore bc77c8c885 Add notes to $fillable 2025-03-27 10:57:34 -07:00
Marcus Moore c095f330e1 Add failing tests 2025-03-27 10:56:33 -07:00
Marcus Moore e0e08f284e Add tests for creating and patching companies via api 2025-03-27 10:54:42 -07:00
spencerrlongg e273c7cbc5 Refactor asset retrieval to support pagination.
Introduced offset and limit handling for API asset queries to enable proper pagination. Adjusted the total count logic to maintain consistency in responses and ensure accurate transformation of assets.
2025-03-25 15:21:18 -05:00
Godfrey M d28cc024cf add DefaultLabel if no label2_template is selected 2025-03-25 12:40:23 -07:00
spencerrlongg 168a3df157 Fix condition in statusMeta for correct property check
Updated the conditional check to use 'assigned_to' instead of 'assigned' for determining the deployment status. This ensures the code references the correct property on the model.
2025-03-25 14:39:51 -05:00
Marcus Moore ac597b517b Remove blank line 2025-03-24 12:39:17 -07:00
Marcus Moore ac56640d40 Spilt test scenarios 2025-03-20 16:21:42 -07:00
Marcus Moore ce585539aa Improve test name 2025-03-20 16:13:13 -07:00
Marcus Moore 2cfff8e07c Formatting 2025-03-20 16:12:31 -07:00
Marcus Moore 0ceda098ff Spilt test scenarios 2025-03-20 16:10:01 -07:00
Marcus Moore db81209fe1 Organize existing tests 2025-03-20 16:01:28 -07:00
Marcus Moore 02f109c3b5 Include input when redirecting back 2025-03-20 14:04:19 -07:00
Marcus Moore 0ed0a7f9f3 Avoid sending emails for asset checkouts that failed 2025-03-20 14:01:48 -07:00
Marcus Moore b721b7d9c9 Add tests 2025-03-20 13:57:42 -07:00
Marcus Moore 976b3dc5ae Improve test case 2025-03-20 13:38:12 -07:00
snipe 2d3514bbf8 Merge pull request #16545 from Godmartinz/activity_report_column_name_fix
changes translation from Admin Settings to Created By on the Activity Report
2025-03-20 19:37:42 -01:00
Marcus Moore 5dcd4b2942 Return valid error message 2025-03-20 13:26:27 -07:00
Marcus Moore d645b42e12 Add failing test 2025-03-20 13:26:06 -07:00
Godfrey M 0ad985cbcd change translation 2025-03-20 12:40:46 -07:00
ntaylor-86 ad5099fac9 added .env variable to the other .env files 2025-03-20 23:27:29 +10:00
ntaylor-86 32736e2f74 added .env variable and database config to skip ssl for DB DUMP 2025-03-20 23:06:15 +10:00
Marcus Moore cef83ad652 Avoid hard failure on missing accessory in location transformer 2025-03-19 14:11:47 -07:00
Marcus Moore e6ccff103f Add simple null check to avoid attempting to transform missing relationship 2025-03-19 12:52:01 -07:00
akemidx 5944034b8b moving warranty/depreciation to be with the other cost/eol values 2025-03-19 15:22:09 -04:00
Godfrey M 881cde4d98 change namesspaces and use create instead of make 2025-03-18 14:18:49 -07:00
akemidx e408b902f0 removing depreciation from purchase cost (unneeded, should go elsewhere if wanted) 2025-03-18 16:38:44 -04:00
akemidx a398c4ab84 reset 2025-03-18 16:37:27 -04:00
akemidx 27417cdec7 removing depreciation logic (unneeded for purchase cost) 2025-03-18 16:36:36 -04:00
Godfrey M bf3837c49d add checkin test for api 2025-03-18 12:54:03 -07:00
Godfrey M 66fd46fe75 add checkout test for api 2025-03-18 12:46:56 -07:00
Godfrey M 29cbf43d68 remove duplicate table class div 2025-03-18 11:48:09 -07:00
Godfrey M 07096c8a31 rename note to notes 2025-03-18 10:37:00 -07:00
Godfrey M cbc6c2754c add notes as fillable to license seat model 2025-03-18 10:27:56 -07:00
Jermops 711235f49c Merge pull request #16519 from marcusmoore/bug/sc-28696
Fixed issue with bad email addresses in expiration alerts and upcoming audits
2025-03-18 09:15:41 -07:00
Jeremy Price 3d2d7684aa Add console command to disable SAML logins
If a Snipe-IT sire has SAML enabled, and the SAML config is sufficiently
borked, the site will fail to even load the login page. That's probably
something that should be examined, but in the meantime, it'd be handy to
not have to manually edit the database to turn off SAML.

In this commit, I'm creating a saml-disable console command. And by
create, i mean i'm copypasta-ing the existing ldap-disable command.
2025-03-17 19:58:21 -07:00
Marcus Moore 9aede45918 Remove unneeded eager loads 2025-03-17 14:43:23 -07:00
Marcus Moore b26a73e385 Filter out empty email address in alerts 2025-03-17 12:30:15 -07:00
Marcus Moore 650839b68a Update command name 2025-03-12 17:05:16 -07:00
Marcus Moore 388dc23241 Add comments 2025-03-12 17:02:05 -07:00
Marcus Moore 32b194ddc7 Update description 2025-03-12 16:44:37 -07:00
Marcus Moore 9cea6cee26 Docblock 2025-03-12 16:42:50 -07:00
Marcus Moore 73f64c53b1 Skip logs where created_by cannot be set 2025-03-12 16:42:39 -07:00
Marcus Moore 2091f66f5b Reorganize 2025-03-12 16:30:36 -07:00
snipe c711278b8b Merge pull request #16486 from marcusmoore/bug/sc-28639
Fixed location being automatically populated on asset checkin screen
2025-03-12 23:26:08 +00:00
snipe ff637f1926 Merge pull request #16497 from marcusmoore/fixes/diff-in
Fixed various carbon displays
2025-03-12 23:17:48 +00:00
Marcus Moore 4d978e0fc6 Fix eol rate in upcoming audit notification 2025-03-12 16:04:16 -07:00
Marcus Moore 167001ed54 Fix eol rate in tests 2025-03-12 16:01:32 -07:00
Marcus Moore 25fb1abc95 Fix eol rate in AssetObserver 2025-03-12 15:58:11 -07:00
Marcus Moore 658bef447d Fix eol rate in Actionlog 2025-03-12 15:55:13 -07:00
Marcus Moore a28ff22d03 Fix eol rate in ReportsController 2025-03-12 15:44:06 -07:00
Marcus Moore 63a1ee0047 Fix eol rate in AssetMaintenancesController 2025-03-12 15:38:54 -07:00
Marcus Moore ab8f4454d1 Add failing test for updating asset maintenance 2025-03-12 15:38:46 -07:00
Marcus Moore e439f1f42b Fix eol rate in AssetMaintenancesController 2025-03-12 15:35:46 -07:00
Marcus Moore 9be27bdf07 Add failing test for creating asset maintenance 2025-03-12 15:35:14 -07:00
snipe bfc122469c Merge pull request #16495 from snipe/add_highlight_for_low_qty
Added highlight to items when the remaining is less than the min_amt
2025-03-12 21:23:15 +00:00
snipe 036c225dcf Fixed dashboard string
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 21:22:24 +00:00
snipe 083cf78305 Added footer style for nicer number cell padding
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 21:17:41 +00:00
Marcus Moore 824271078e Fix eol rate in AssetsController 2025-03-12 13:55:12 -07:00
Marcus Moore 1122cd8567 Fix eol rate in asset transformer 2025-03-12 13:33:15 -07:00
Marcus Moore 6cf7df22cd Fix eol rate on asset show page 2025-03-12 13:28:34 -07:00
snipe 7421d089ff Added formatter and centering in presenters
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 20:25:00 +00:00
snipe bdb4bd73d2 Return an indicator for no value set
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 20:18:51 +00:00
snipe bf88597132 Added qtySumFormatter and made seats formatter more generic
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 20:14:23 +00:00
snipe dfacd876d5 Added remaining/min_amt to transformers
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 20:13:15 +00:00
Marcus Moore d5bc5caacd Purge activity log of consumable bulk checkins 2025-03-12 11:57:18 -07:00
Marcus Moore be6caf936e Avoid logging consumable checkins 2025-03-12 11:48:14 -07:00
snipe f1e70eb7a0 Add min_qty to asset model bulk edit
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 18:27:27 +00:00
snipe dbe78c30d5 Merge pull request #16491 from snipe/bug/sc-28671
Fixed new user modal pre-populating with first name and last name of acting user
2025-03-12 18:05:57 +00:00
snipe c1601b9a8c Updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 17:28:50 +00:00
snipe aa8e9f61d2 Check for value override
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 17:28:44 +00:00
snipe 163ddc8026 Check for value override
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 17:28:29 +00:00
snipe c73dba4a43 Better visual spacing
Signed-off-by: snipe <snipe@snipe.net>
2025-03-12 17:28:05 +00:00
snipe 5e61a814a7 Merge pull request #16489 from marcusmoore/bug/sc-28644
Fixed timestamp in action log for bulk accessory check in
2025-03-12 14:56:52 +00:00
Marcus Moore 935d3eea9f Attempt to match and populate created_by 2025-03-11 17:17:39 -07:00
Marcus Moore fffc606d9a Improve output 2025-03-11 17:06:02 -07:00
Marcus Moore c3a48182fd Display the created_by 2025-03-11 17:03:26 -07:00
Marcus Moore 147e610062 Add todos 2025-03-11 17:00:36 -07:00
Marcus Moore dd14eac1eb Prompt for confirmation 2025-03-11 16:56:07 -07:00
Marcus Moore 4954d972bb Write table of ids 2025-03-11 16:52:20 -07:00
Marcus Moore c8177eb51e Update timestamps 2025-03-11 16:50:16 -07:00
Marcus Moore a8cccffa1e Update output 2025-03-11 16:41:22 -07:00
Marcus Moore c774e969d7 Scaffold command 2025-03-11 16:34:07 -07:00
Marcus Moore b5fa538a54 Set created_by correctly in he action log 2025-03-11 16:05:02 -07:00
snipe fcdc1494c2 Merge pull request #16443 from azmcnutt/feature/labels_Avery_5520_1DBarcode
Nice work! Thank you!
2025-03-11 22:12:09 +00:00
snipe badb367e74 Merge pull request #16445 from ubc-cpsc/bugfix/CVE-2025-27515
Fixes CVE-2025-27515: Laravel has a File Validation Bypass
2025-03-11 21:55:58 +00:00
snipe 2960a13772 Upgrade webpack from 5.97.1 to 5.98.0 #16461
Signed-off-by: snipe <snipe@snipe.net>
2025-03-11 21:24:44 +00:00
snipe 5e10c213f6 Merge pull request #16488 from marcusmoore/bug/sc-28631
Nice catch!
2025-03-11 21:05:46 +00:00
snipe b61eacbdab Merge pull request #16473 from marcusmoore/chore/replace-form-close
Replaced call to Form::close()
2025-03-11 20:47:08 +00:00
Marcus Moore e2f643e7ed Backfill tests 2025-03-11 13:46:21 -07:00
Marcus Moore 9cbcfba4e9 Add test 2025-03-11 13:35:50 -07:00
Marcus Moore fd854072b0 Properly handle route model bound LicenseSeat not being found 2025-03-11 13:03:00 -07:00
Marcus Moore 18b208bba2 Account for missing location 2025-03-11 11:46:38 -07:00
Marcus Moore 71d93ca3c3 Use dedicated location select component
Copy/paste/modify from partials.forms.edit.location-select
2025-03-11 11:41:26 -07:00
Marcus Moore bac2760c6d Replace Form::close 2025-03-10 12:55:35 -07:00
snipe 33c9ea4bb1 Merge pull request #16065 from marcusmoore/chore/migrate-select-helper
Convert  Form::select to blade component
2025-03-07 01:05:58 +00:00
Marcus Moore d88fe1f48a Merge branch 'develop' into chore/migrate-select-helper 2025-03-06 13:39:05 -08:00
Marcus Moore f202817852 Use translation strings 2025-03-06 12:43:59 -08:00
Joël Pittet 618d81777a Fixes CVE-2025-27515 2025-03-06 12:33:29 -08:00
James M 0b6d810ca6 FEAT: Add Label 5520 with 1D barcode - remove 2D barcode
FEAT: Add Label 5520 with 1D barcode - remove 2D barcode
2025-03-06 11:12:16 -07:00
snipe 8c164d1b09 Merge pull request #16441 from snipe/added_modal_tests
Added modal tests
2025-03-06 15:06:08 +00:00
snipe 6d74053ca3 Added modal tests
Signed-off-by: snipe <snipe@snipe.net>
2025-03-06 15:02:55 +00:00
snipe f42fcd25b1 Make the assets tab active by default on locations page
Signed-off-by: snipe <snipe@snipe.net>
2025-03-06 12:05:36 +00:00
Marcus Moore 7df636515f Move to data providers 2025-03-05 18:20:40 -08:00
Marcus Moore 3db124e709 First pass at updating wording for asset checkout mail 2025-03-05 18:12:23 -08:00
snipe c5dd942f3d Merge pull request #16436 from marcusmoore/fixes/report-template-link
Fixed linking in saved report template dropdown
2025-03-06 01:06:18 +00:00
Marcus Moore 70de08a211 Replace hard-coded link to report template 2025-03-05 16:26:26 -08:00
Marcus Moore d1683d1c65 Use existing translation string 2025-03-05 16:10:36 -08:00
Marcus Moore f038254038 Have UI reflect not being able to delete accessory 2025-03-05 16:02:23 -08:00
Marcus Moore a19582a5f3 Prevent deleting accessory that has checkouts via api 2025-03-05 15:58:34 -08:00
Marcus Moore 00cbebd1e3 Add failing test for api 2025-03-05 15:57:18 -08:00
Marcus Moore 8c21d625fc Prevent deleting accessory that has checkouts via UI 2025-03-05 15:56:01 -08:00
snipe 64f49afce1 Merge pull request #16432 from marcusmoore/bug/sc-24475
Added validation around user store endpoint
2025-03-05 20:16:30 +00:00
Marcus Moore 25395e9af1 Add test for storing user 2025-03-05 11:37:03 -08:00
Marcus Moore 69009e027f Add authorization test 2025-03-05 11:34:45 -08:00
Marcus Moore 695c9d070f Require int for department and company ids when creating user via api 2025-03-05 11:32:04 -08:00
snipe c9f55bfd94 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 17:04:57 +00:00
snipe 27d98fbb93 Merge pull request #16429 from snipe/bug/sc-28609
Updated HTML label colors in blue skin
2025-03-05 13:43:53 +00:00
snipe 0e1f40626f Updated label colors in blue skin
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 13:40:36 +00:00
snipe 7a312d075c Check for null on webhook url
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 11:59:35 +00:00
snipe e1156be919 Merge pull request #16427 from snipe/fixed_user_modal_email
Fixes user create modal - check if $item is set
2025-03-05 10:52:00 +00:00
snipe fcf7a543fd Check if $item is set
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 10:47:33 +00:00
Spencer Long 6201e475cb Merge branch 'develop' into feature/sc-24347 2025-03-04 21:20:46 -06:00
snipe bef54983fa Merge pull request #16421 from marcusmoore/chore/migrate-label-helpers-pt8
Replace calls to Form::label pt8
2025-03-05 01:01:21 +00:00
Marcus Moore f2b44f7002 Replace Form::label in company select partial 2025-03-04 16:46:43 -08:00
Marcus Moore de7d32f632 Replace Form::label on ldap settings page 2025-03-04 16:44:26 -08:00
snipe fecee69de6 Use table name to avoid ambiguous query
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 00:43:04 +00:00
snipe 75366927f0 Fixed table name
Signed-off-by: snipe <snipe@snipe.net>
2025-03-05 00:41:11 +00:00
Marcus Moore c798df2920 Replace Form::label on label settings page 2025-03-04 16:34:22 -08:00
snipe 779330af14 Merge pull request #16420 from marcusmoore/fixes/report-url
Fixed custom report template route
2025-03-05 00:11:30 +00:00
Marcus Moore f01ff1f1d7 Add dedicated named route 2025-03-04 16:07:35 -08:00
Marcus Moore 1e4daf0348 Fix route 2025-03-04 16:04:28 -08:00
snipe fae79a91f6 Merge pull request #16418 from marcusmoore/chore/custom-report-template-activity-log-removal
Stop reporting report template events to activity log
2025-03-04 23:28:43 +00:00
Marcus Moore e8ee218f39 Purge activity log of report template data 2025-03-04 15:20:23 -08:00
Marcus Moore cb5b0bd89c Stop reporting report template creates, updates, and deletes to action log 2025-03-04 15:11:37 -08:00
snipe 0ed49fa7a0 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 22:55:58 +00:00
snipe f25b8379e6 Merge pull request #16413 from Godmartinz/visited_link-color-change
Changed `visited-link` and `link` colors in default theme to be more accessible
2025-03-04 22:55:17 +00:00
snipe bc618fcef4 Merge pull request #16414 from Godmartinz/Audit_error_fix
Adds audit notification for MS Teams
2025-03-04 22:54:32 +00:00
Godfrey M 7c194422f3 Merge branch 'develop' into Audit_error_fix 2025-03-04 14:51:21 -08:00
Godfrey M 49ff47fbcf Merge branch 'develop' into visited_link-color-change 2025-03-04 14:47:48 -08:00
snipe 77c978d29a Merge pull request #16416 from Godmartinz/expiring-asset-email-test
fix Expiring alert tests
2025-03-04 21:11:52 +00:00
Godfrey M 437b3cd865 fix conflicts 2025-03-04 13:08:53 -08:00
Godfrey M 3641016271 remove commented code 2025-03-04 13:08:03 -08:00
Godfrey Martinez cc127c8e1e Merge branch 'develop' into expiring-asset-email-test 2025-03-04 13:06:36 -08:00
Godfrey M 4bac509341 fix Expiring alert tests 2025-03-04 12:58:04 -08:00
snipe f4f6dcb885 Updated test
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:48:59 +00:00
snipe d89f38bbfb Set defaults on save
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:33 +00:00
snipe 9351cc2252 Set default to 0
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:22 +00:00
snipe a31a732d38 Nicer UI for invert flag
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:38:15 +00:00
snipe 1be420b0e9 Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 20:37:45 +00:00
snipe 2b0127ab0c Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:56:58 +00:00
snipe 8791640908 Add @Fiala06 as a contributor 2025-03-04 19:53:25 +00:00
snipe 1dacd25e6d Check for purchase_cost before adding the “each”
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:50:11 +00:00
snipe 45317c0959 Merge pull request #16415 from snipe/nicer_error_message_on_model_not_found
Nicer model name formatting on RMB model not found
2025-03-04 19:42:45 +00:00
snipe 63e4c42445 Added strtolower
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:33:17 +00:00
snipe d4e227f003 Whitespace
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:29:09 +00:00
snipe bbabbe1b87 Nicer model name formatting on RMB model not found
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 19:21:46 +00:00
Marcus Moore 2a156776a4 Merge branch 'develop' into chore/migrate-select-helper
# Conflicts:
#	resources/views/settings/branding.blade.php
#	resources/views/settings/general.blade.php
2025-03-04 11:19:38 -08:00
Godfrey M 15a09e5187 adds audit notification for MS Teams 2025-03-04 11:15:03 -08:00
Godfrey M 5eebdcddb2 changes visited and link colors 2025-03-04 10:12:45 -08:00
snipe 16b97c18e0 Shim route for asset maintenances redirect on RMB not found
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:16:16 +00:00
snipe fa72696a35 Removed redundent text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:06:56 +00:00
snipe 9467ec2571 Nicer env text
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:05:45 +00:00
snipe ac3f61c96a Fixed extra escape character
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 17:00:44 +00:00
snipe d2e0a23994 Merge pull request #16412 from snipe/#16150_fixed_regression_in_branding_page
Fixed regression from #16150
2025-03-04 15:55:24 +00:00
snipe ccea55308b Fixed regression from #16150
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:53:30 +00:00
snipe acaa3a28e7 Merge pull request #16410 from snipe/#16407_component_checkout_and_notes_fix
Fixed #16407 - weird layout on components for non super user
2025-03-04 15:38:20 +00:00
snipe c4722898b7 Fixed #16407 - weird layout on components for non super user
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:37:25 +00:00
snipe e19003aea5 Merge pull request #16409 from snipe/#16386_user_dropdown_fields_not_populating_on_edit
Fixed #16386 - some fields not populating with user data on edit
2025-03-04 15:28:11 +00:00
snipe a09a9d3cd6 Added item to payload
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 15:26:25 +00:00
snipe 759e3794df Small upgrader UI fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 14:57:28 +00:00
snipe c50b14763f Merge pull request #16403 from snipe/#16402_each_localization
Fixed #16402 - localize "each" string in components tab on asset view
2025-03-04 13:35:08 +00:00
snipe 369a68fe57 Fixed #16402 - Localize “each” in string
Signed-off-by: snipe <snipe@snipe.net>
2025-03-04 13:33:04 +00:00
snipe 83855d44d0 Merge pull request #16251 from Godmartinz/Audit_Checkin_warning_fix
refactors audit notification to mail, adds test, adds  alerts check to scheduler
2025-03-04 12:51:42 +00:00
snipe 6f847294ed Merge pull request #15911 from Fiala06/patch-1
Fixed duplicate entries preventing LDAP sync from continuing
2025-03-04 12:49:54 +00:00
snipe d556d1c6e7 Merge pull request #16150 from Godmartinz/add-translations-to-settings
Adds Translation strings to General and Branding Settings
2025-03-04 12:48:21 +00:00
snipe 3bb94e98f0 Merge pull request #16398 from marcusmoore/bug/sc-28535
Avoid using authenticated user's email address in email partial
2025-03-04 12:47:10 +00:00
Marcus Moore 8f5f6f3502 Avoid using authenticated user's email address in email partial 2025-03-03 16:28:08 -08:00
snipe b3792bfa00 Merge pull request #16396 from marcusmoore/chore/migrate-checkbox-helpers-pt10
Replace calls to Form::checkbox pt10
2025-03-03 20:52:54 +00:00
Marcus Moore 40f7257723 Replace call to Form::checkbox 2025-03-03 12:44:50 -08:00
snipe 8486256142 Merge pull request #16381 from marcusmoore/chore/migrate-checkbox-helpers-pt9
Replace calls to Form::checkbox pt9
2025-03-03 20:28:21 +00:00
snipe 7f36750e33 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2025-03-03 19:54:14 +00:00
snipe de046db106 Add @azmcnutt as a contributor 2025-03-03 19:53:30 +00:00
snipe eb1d27a5bc Merge pull request #16379 from azmcnutt/feature/settings_ldap_invert_active_flag
Feature/settings ldap invert active flag
2025-03-03 19:52:57 +00:00
Godfrey M cc0b9f404a merged develop, fix conflicts 2025-02-27 15:38:31 -08:00
Marcus Moore 70332696c6 Fix test by passing in required properties 2025-02-27 15:23:17 -08:00
Marcus Moore 7a9b5d61b0 Replace another Form::checkbox 2025-02-27 13:25:32 -08:00
Marcus Moore 5876259893 Replace another Form::checkbox 2025-02-27 13:19:26 -08:00
Marcus Moore 8755c54edc Replace Form::checkbox 2025-02-27 13:13:39 -08:00
Marcus Moore 014f3b7652 Cast to boolean 2025-02-27 13:12:01 -08:00
Marcus Moore 3a2579b205 WIP: replace Form::checkbox 2025-02-27 13:08:02 -08:00
James M 149474bfe3 Update general.php
FIX: Spelling error
2025-02-27 12:42:47 -07:00
James M b2b768dede Merge branch 'snipe:develop' into develop 2025-02-27 12:25:07 -07:00
snipe a9ed9e2a7f Merge pull request #16378 from snipe/wrap_pdf_table_results
Wrap long text in PDF export in tables
2025-02-27 19:06:34 +00:00
snipe ce8523b00a Fixed wrapping
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 18:58:18 +00:00
snipe 7076a68d35 Wrap table results in PDF
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 18:38:10 +00:00
James M 112112d258 Feat: #14926 LDAP Active Flag - Add config option to make False = Enable 2025-02-27 10:52:12 -07:00
snipe 3928c8afe9 Merge pull request #16376 from uberbrady/improve_safety_csv_charset_detection
Add some safeties around the charset-detection and transliteration
2025-02-27 16:26:44 +00:00
snipe 23ce54e80c Make sure we’re saving the last_login in 2FA auths
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 16:17:59 +00:00
Brady Wetherington 646e3e8df5 Complete failed-transliteration test, clean up error, new translation string 2025-02-27 16:10:56 +00:00
snipe 30c4e9dbf7 Use formatter for created_at on unaccepted assets
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 15:48:24 +00:00
snipe 27fc30a881 Nicer button layout on unaccepted assets
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 15:43:53 +00:00
snipe 8ac7cda4ee Merge pull request #16366 from marcusmoore/chore/migrate-checkbox-helpers-pt7
Replace calls to Form::checkbox pt7
2025-02-27 15:01:31 +00:00
snipe 6f04d314a8 Merge pull request #16367 from marcusmoore/chore/migrate-checkbox-helpers-pt8
Replace calls to Form::checkbox pt8
2025-02-27 15:01:19 +00:00
snipe 1051b1d16d Merge pull request #16375 from snipe/fixes_16371_name_not_included_in_reminder_emails
Fixed #16371 - incorrect count and missing name in acceptance reminder email
2025-02-27 15:00:04 +00:00
snipe 115bb94704 Merge pull request #16156 from marcusmoore/acceptance-reminder-subject
Added "Reminder" to subject line of follow up asset checkout emails
2025-02-27 14:55:59 +00:00
snipe 25807cc62f Fixed constructor
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 14:22:48 +00:00
snipe cd1d1b2d3e Fixed count
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 14:22:40 +00:00
Brady Wetherington 6dcd3bfd30 Add some safeties around the charset-detection and transliteration 2025-02-27 13:44:31 +00:00
snipe b8799f8038 Bumped bash
Signed-off-by: snipe <snipe@snipe.net>
2025-02-27 12:21:28 +00:00
Marcus Moore a0dc056da8 Replace Form::checkbox on label settings page 2025-02-26 16:33:07 -08:00
Marcus Moore 27aeb518ff Replace Form::checkbox on general settings page 2025-02-26 16:18:00 -08:00
snipe dc619bb0dc Merge pull request #16365 from marcusmoore/chore/migrate-checkbox-helpers-pt6
Replace calls to Form::checkbox pt6
2025-02-26 23:54:50 +00:00
Marcus Moore 245a16c377 Replace Form::checkbox on branding settings page 2025-02-26 15:37:07 -08:00
Marcus Moore de3c1d159f Replace Form::checkbox on branding settings page 2025-02-26 15:35:17 -08:00
Marcus Moore af6d9e4a00 Replace Form::checkbox on custom report pages 2025-02-26 15:15:48 -08:00
snipe 8c8af3062e Merge pull request #16354 from snipe/dont_checkin_for_pending_on_asset_update
Allow pending as an asset status type that does not automatically check the asset in
2025-02-26 21:05:11 +00:00
snipe 2ff47edb94 Merge pull request #16361 from Godmartinz/acceptancer_reminder_unlisted_email_info
Fixed acceptance reminder command lag on users with no associated email
2025-02-26 20:33:02 +00:00
snipe d923d29bad Merge pull request #16360 from spencerrlongg/bug/sc-28537
Add Safety Around Bulk Status Update
2025-02-26 20:32:19 +00:00
Godfrey M 899119ae2d changes output to a table 2025-02-26 12:30:19 -08:00
snipe e031de8e49 Merge pull request #16363 from snipe/added_a_few_more_no_interaction_calls
Added `--no-interaction` to additional passport commands
2025-02-26 20:19:37 +00:00
snipe a81c520d93 Follow up for #16341
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 20:15:09 +00:00
Godfrey M 8352e81228 fix unaccepted reminder test 2025-02-26 11:50:08 -08:00
Godfrey M fd0174ff32 remove unwanted changes to livewire 2025-02-26 11:31:41 -08:00
Godfrey M cc26aa02b2 fix acceptance reminder command no email list 2025-02-26 11:25:21 -08:00
snipe 616f3558dd Update example env
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 19:14:25 +00:00
spencerrlongg d6e266cec1 make super safe 2025-02-26 13:11:49 -06:00
snipe 31516d7f24 Merge pull request #16356 from snipe/added_fields_for_model_search
Added name, model_number and notes for strict search
2025-02-26 12:46:13 +00:00
snipe e79af255aa Added name, model_number and notes for strict search
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 12:43:54 +00:00
snipe 5b0d7f4064 One more chonk
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 12:01:50 +00:00
snipe 2f6af10c5d Bumped chunk for custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 11:59:34 +00:00
snipe afabda9235 Remove greater than 0 for alert threshold - fixes FD-47040
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 11:38:33 +00:00
snipe 1618c9ae8e Changed confirmation message
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 10:53:41 +00:00
snipe 5344ef4a1a Allow pending as an asset status that does not automatically check the asset in
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 10:46:38 +00:00
snipe 16420b1e00 Audit Log Number under Days to next Audit [sc-28530]
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 10:25:07 +00:00
snipe 62f66e724e Drop errors to warnings to stop pooping on rollbar
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 09:54:13 +00:00
snipe 9b0ea51d35 Moved composer clear commands to after composer install per #16334
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 09:37:31 +00:00
snipe 992214fc66 Check for adminuser withTrashed
Signed-off-by: snipe <snipe@snipe.net>
2025-02-26 08:25:22 +00:00
snipe 93dab12461 Merge pull request #16342 from snipe/nicer_upgrade_script
Nicer upgrade.php UI
2025-02-26 07:16:28 +00:00
snipe ea0f105180 Merge pull request #16347 from marcusmoore/chore/migrate-checkbox-helpers-pt4
Replace calls to Form::checkbox pt4
2025-02-26 07:05:38 +00:00
snipe 5b6da0c1e8 Merge pull request #16348 from marcusmoore/chore/migrate-checkbox-helpers-pt5
Replace calls to Form::checkbox pt5
2025-02-26 07:05:22 +00:00
snipe 4d7655bbe1 Merge pull request #16346 from marcusmoore/chore/migrate-checkbox-helpers-pt3
Replace calls to Form::checkbox pt3
2025-02-26 07:04:27 +00:00
snipe 5e3855ee5b Merge pull request #16345 from marcusmoore/fixes/update-custom-fields
Fixed renaming custom fields
2025-02-26 07:03:40 +00:00
Marcus Moore e01226a174 Replace Form::checkbox on saml settings page 2025-02-25 17:31:05 -08:00
Marcus Moore f9ccf32af4 Replace Form::checkbox on ldap settings page 2025-02-25 17:22:44 -08:00
Marcus Moore 2c5170a218 Replace Form::checkbox on security settings page 2025-02-25 17:09:25 -08:00
Marcus Moore 15f842e2dc Replace Form::checkbox on bulk user edit page 2025-02-25 16:00:46 -08:00
Marcus Moore 46b31dfe14 Replace Form::checkbox on user create and edit page 2025-02-25 14:32:39 -08:00
Marcus Moore d88c79366c Replace Form::checkbox on google settings page 2025-02-25 14:27:07 -08:00
Marcus Moore de330a47cd Replace Form::checkbox on asset tag settings page 2025-02-25 14:25:02 -08:00
Marcus Moore ecd7dc2094 Replace Form::checkbox on alert settings page 2025-02-25 14:23:26 -08:00
Marcus Moore 510946e0eb Replace Form::checkbox in logo upload partial 2025-02-25 14:20:43 -08:00
Marcus Moore 37e4a13979 Replace Form::checkbox in image upload partial 2025-02-25 14:15:12 -08:00
Marcus Moore c73d64cdbc Remove manual doctrine mapping for enums 2025-02-25 13:37:23 -08:00
snipe 4a0410d969 Uncomment git stash
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 16:55:39 +00:00
snipe 668b9f8fb9 Nicer upgrade.php UI
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 16:51:32 +00:00
snipe 037d2d9e84 Merge pull request #16341 from uberbrady/fix_passport_install_no_interaction
Fixes #16331 - Don't make passport:install command require user input
2025-02-25 16:43:49 +00:00
Brady Wetherington bce2007b97 Fixes #16331 - Don't make passport:install command require user input 2025-02-25 16:38:40 +00:00
Brady Wetherington 09a5e5b1bd Whoops! Need minimum 8.2, not 8.1 (probably mis-merge?) 2025-02-25 14:40:45 +00:00
snipe 7b4f4b6b7f Merge pull request #16337 from joakimbergros/develop
Fixed #16173: `useraccountcontrol` was not included in the ldap query attributes
2025-02-25 13:49:38 +00:00
Joakim Bergros 5c66334017 Added a check to see if the user has specified that is an ActiveDirectory server in the configuration before adding the useraccountcontrol attribute to the ldap query. 2025-02-25 14:22:22 +01:00
Joakim Bergros ae82051b73 Fixed #16173: useraccountcontrol was not included in the ldap query attributes.
`$results` did not include the `useraccountcontrol` and thus rendered the fallback logic void when `active_flag` was blank.

 Added a condition to check if `active_flag` is blank and only then add `useraccountcontrol` to the ldap query since it is then a requirement in accordance with "we respect the userAccountControl attribute" text in the `admin/ldap` route.

[`elseif' will become true when `active_flag` is blank](https://github.com/snipe/snipe-it/blob/b141945add94eb0839436278a5b2dc2e0e116306/app/Console/Commands/LdapSync.php#L364)
2025-02-25 13:55:53 +01:00
snipe c3a2e81afd Updated version
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 12:18:22 +00:00
snipe 18c7cbbbbb Merge pull request #16336 from snipe/change_order_in_upgrade_script
Fixed #16334 - Changed composer order in upgrade script
2025-02-25 12:09:15 +00:00
snipe 3718f08c72 Changed composer order in upgrade script
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 12:05:00 +00:00
snipe b7821a69b6 Added link to the google apps script repo
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 11:07:04 +00:00
snipe 8049f21068 Updated laravel version in readme
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 11:02:00 +00:00
snipe 8140110bf9 Chnage dev docker env to en-US from en
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 10:57:38 +00:00
snipe a4587f6322 Merge pull request #16335 from snipe/added_label_test
Added label test
2025-02-25 10:40:46 +00:00
snipe 163e19f1e9 Added label test
Signed-off-by: snipe <snipe@snipe.net>
2025-02-25 10:37:06 +00:00
snipe 8a40c3ecb4 Merge pull request #16325 from spencerrlongg/bug/sc-28520
Remove remaining hardware references in favor of new RMB
2025-02-25 10:09:35 +00:00
spencerrlongg d949a9689f fix all 2025-02-24 22:35:47 -06:00
snipe 27a7c6fd10 Merge pull request #16324 from marcusmoore/chore/migrate-checkbox-helpers-p2
Replace calls to Form::checkbox pt2
2025-02-25 02:33:02 +00:00
Marcus Moore 4d55a67628 Merge branch 'develop' into chore/migrate-checkbox-helpers-p2 2025-02-24 16:37:59 -08:00
snipe 9d453226bd Merge pull request #16321 from spencerrlongg/bug/sc-28515
Changed Parameter Name for RMB
2025-02-25 00:17:37 +00:00
snipe cd26694767 Merge pull request #16322 from marcusmoore/fixes/fix-test-edit-route
Fixed edit routes in tests
2025-02-25 00:17:10 +00:00
Marcus Moore a26cc2ced1 Use .edit routes instead of .update 2025-02-24 15:55:05 -08:00
spencerrlongg 1fd81d17a3 route model binding change 2025-02-24 17:53:41 -06:00
snipe 134045f1ec Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2025-02-24 23:46:55 +00:00
snipe b6b6a3eec7 Remove req for 0 min
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 23:46:50 +00:00
snipe b62714d702 Merge pull request #16062 from snipe/remove_mcrypt
Removed references to mcrypt
2025-02-24 23:22:32 +00:00
Brady Wetherington 271bcc66bf Remove lib-mcrypt as a dependency 2025-02-24 23:19:08 +00:00
snipe ced560daa9 Add @jostrander as a contributor 2025-02-24 23:16:27 +00:00
snipe b395c9130a Merge remote-tracking branch 'origin/master' into develop 2025-02-24 23:06:46 +00:00
snipe ed46a757fa Merge pull request #16320 from jostrander/fix/location-edit
Fixed: fix 500 on edit locations page by referencing current location
2025-02-24 23:03:01 +00:00
Jesse Ostrander 6a8a41b389 fix: reference to item location on location edit method 2025-02-24 17:34:18 -05:00
snipe 4800f4c853 Merge branch 'develop' into remove_mcrypt 2025-02-24 22:12:56 +00:00
snipe c79ff49c85 Add @addex12 as a contributor 2025-02-24 20:30:04 +00:00
Marcus Moore e88bba51bb Merge branch 'develop' into acceptance-reminder-subject 2025-02-24 11:55:50 -08:00
Marcus Moore f97211f6cd Remove unused language string 2025-02-24 11:45:58 -08:00
Marcus Moore 027c2b3627 Change subject to "You have Unaccepted Assets." 2025-02-24 11:45:23 -08:00
snipe ee85a392e7 Merge pull request #16316 from snipe/v8_final_merge
V8 final merge
2025-02-24 19:18:12 +00:00
Brady Wetherington 6c2d367124 Tweak version number and hashes 2025-02-24 18:38:53 +00:00
Brady Wetherington 982cfeca32 Merge branch 'develop' 2025-02-24 18:37:41 +00:00
snipe 5fa4f85c20 Merge pull request #16106 from marcusmoore/bug/sc-27960
Fixed asset show page erroring when asset not associated with model
2025-02-24 17:16:12 +00:00
snipe 43b8c0bf7b Merge pull request #16313 from snipe/localizations/2024-02-24
Updated strings, added Oromo
2025-02-24 14:51:45 +00:00
snipe 54b664d679 Updated strings, added Oromo
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 14:50:23 +00:00
snipe bf2355a297 Fixed showfile path
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 14:34:10 +00:00
snipe 2bf4ec0ae8 A few more small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 14:24:15 +00:00
Brady Wetherington 9555825a67 Update minimum PHP version 2025-02-24 14:03:57 +00:00
snipe 0bea07e2f9 Merge pull request #16312 from snipe/small_cleanups
Small cleanups before release
2025-02-24 13:53:28 +00:00
snipe 22f7a9ddd4 Fixed stray tag
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:46:33 +00:00
snipe 77b417bcea Passed user to showfile
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:43:39 +00:00
snipe 76e3c00d2d Removed footer on tables that didn’t need it
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:41:49 +00:00
snipe 77add8abbc Added strings
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:39:07 +00:00
snipe b53957268a Added warning if deleted
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:38:55 +00:00
snipe ba49fc554d Moved warning to be consistent with other FCOs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:38:47 +00:00
snipe e60462b751 Added/updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:38:28 +00:00
snipe a5009aa7df Added withTrashed() to handle soft deletes with RMB
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:38:06 +00:00
snipe e589adbe80 Updated model route
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 13:31:09 +00:00
snipe 0501c5f53c Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 11:15:03 +00:00
snipe 6a9247ba8a Cast token policies to int
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 11:14:49 +00:00
snipe fcf84bf63f Fixed test namespace
Signed-off-by: snipe <snipe@snipe.net>
2025-02-24 11:09:54 +00:00
snipe 5ece721b00 Check for FMCS
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 15:02:45 +00:00
snipe 0e2251c810 Scope selectlist by company
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 14:59:05 +00:00
snipe cebb9d034c Merge pull request #16305 from snipe/bug/sc-28425
Fixed #16262 - Check for quantity before allowing component deletion
2025-02-23 14:17:36 +00:00
snipe dd2b570db5 Added tighter constraints on deleting components
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 14:11:39 +00:00
snipe 2bee4532ec Added qty error string
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 13:21:58 +00:00
snipe 96248e0023 Removed soft delete from test
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 13:21:49 +00:00
snipe 157801242d Added API test, renamed test to match filter
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 13:21:36 +00:00
snipe 7b151cf692 Added test
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 13:17:20 +00:00
snipe 50c88df4cc Merge pull request #16304 from snipe/security/snyk-updates-less-papaparse
Updated less and papaparse
2025-02-23 12:51:38 +00:00
snipe d87a6868cc Updated less and papaparse
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 12:50:09 +00:00
snipe 201f487853 Merge pull request #16303 from snipe/chore/sc-28493
Added tooltip for currency in table
2025-02-23 12:21:04 +00:00
snipe 069860d65f Added tooltip for currency in table
Signed-off-by: snipe <snipe@snipe.net>
2025-02-23 12:19:18 +00:00
snipe afa7391080 Merge pull request #16299 from snipe/added_checkin_checkout_indicator_for_custom_fields
Added checkin/checkout indicators on custom field table
2025-02-22 19:34:04 +00:00
snipe 07cf203018 Add checkin/checkout indicators on custom field table
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 19:32:34 +00:00
snipe 5f561452d2 Merge pull request #16298 from uberbrady/tooltips_custom_fields
Add tooltips to custom fields display, especially for icons
2025-02-22 19:17:28 +00:00
Brady Wetherington cbe04e8514 Add tooltips to custom fields display, especially for icons 2025-02-22 19:13:09 +00:00
snipe 9b44dfd9b6 Merge pull request #16297 from snipe/add_field_to_checkin_checkout
Fixed #6188 - Added custom fields to checkin/checkout screens
2025-02-22 19:09:51 +00:00
snipe 9abf3029ef Compact the method just a little
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 19:02:41 +00:00
snipe 19fb45f488 Refactor into method
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:57:18 +00:00
snipe e983ee4d0f Tweaked icon position
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:47:12 +00:00
snipe 40acd48eff Tweaked some style
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:19:09 +00:00
snipe f5eedb8d23 Added RMB and include $item so the asset fields are populated
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:13:12 +00:00
snipe 172df0d220 Save new custom field values
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:12:46 +00:00
snipe c611cb5612 Updated loggable to check for custom fields that were passed for meta
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:12:30 +00:00
snipe da77ddd447 Added fields to custom field edit form
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:11:56 +00:00
snipe c727633e6b Added language strings
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:11:42 +00:00
snipe 10834cf638 Added migration
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:11:35 +00:00
snipe 42eda089e2 Added include for custom fields partial
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:11:27 +00:00
snipe 2434c82a75 Added if/else for custom fields model partial
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:11:04 +00:00
snipe 1b9d046f5f Fixed test for RMB
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:08:25 +00:00
snipe a0a0727b5c Corrected route breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 18:08:13 +00:00
snipe 917b9f0293 Merge pull request #16296 from snipe/added_select_unselect_tooltip_to_presenters
Added select/unselect tooltip to presenters, added translation
2025-02-22 14:32:04 +00:00
snipe bb70250007 Added select/unselect tooltip to presenters, added translation
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 14:30:49 +00:00
snipe 346aeeda71 Merge pull request #16287 from uberbrady/better_hover_titles
Fixes: [sc-28423] Better tooltips on lists, Bootstrap style
2025-02-22 14:24:02 +00:00
snipe 84a29378cd Merge pull request #16295 from snipe/#16282_adds_accessories_tab_to_assets
Fixed #16282 - adds accessories tab to assets
2025-02-22 14:21:32 +00:00
snipe 0cd0abe8bb Fixed #16282 - adds accessories tab to assets
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 14:20:21 +00:00
snipe 7db11dc12b Merge pull request #16277 from Godmartinz/bulk_delete_asset_bug
Fixes deletion of assigned assets through bulk delete
2025-02-22 12:59:37 +00:00
snipe e0221301ff Increased text limit on notes
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 12:56:25 +00:00
snipe b0fa059a28 Merge pull request #16285 from marcusmoore/bug/sc-28148
Re-added ability to add notes to assets
2025-02-22 12:55:18 +00:00
snipe 3fb00a9fa9 Merge pull request #16293 from uberbrady/fix_default_docker_image
Updated default Dockerfile to handle newer PHP versions
2025-02-22 12:52:37 +00:00
snipe 3ef8b047ba Merge pull request #16294 from snipe/bug/sc-28474
Don’t delete avatar file on soft-delete
2025-02-22 12:52:18 +00:00
snipe 7a77de6ffe Don’t delete avatar file on soft-delete
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 12:49:04 +00:00
Brady Wetherington 5e85891b10 Updated default Dockerfile to handle newer PHP versions 2025-02-22 12:43:30 +00:00
snipe 934da0f630 Merge pull request #16291 from uberbrady/fix_tests_and_migrations_v8
Fix tests and fix migrations to always explicitly include nullable()
2025-02-22 12:21:56 +00:00
snipe cca46ea9e0 Merge pull request #16292 from snipe/add_email_list_assigned_to_bulk
Added ability to send user inventory via bulk UI
2025-02-22 12:20:01 +00:00
snipe bde034593b Updateed string
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 12:17:04 +00:00
Brady Wetherington 7e1295bac7 Fix tests and fix migrations to always explicitly include nullable() 2025-02-22 12:15:12 +00:00
snipe d1cc0fcfac Added ability to send user inventory via bulk UI
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 12:07:54 +00:00
snipe 056fbefb16 Merge pull request #16290 from snipe/update_php_versions_for_tests
Removed php 8.1, added 8.4
2025-02-22 11:11:53 +00:00
snipe 83a848980f Removed php 8.1, added 8.4
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 11:11:01 +00:00
snipe 7b930357e4 Cast years to int
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 10:51:27 +00:00
snipe bdab052f40 Fixed test name
Signed-off-by: snipe <snipe@snipe.net>
2025-02-22 10:51:16 +00:00
Brady Wetherington 2d1e9b237f Better tooltips on list views, in Bootstrap style 2025-02-21 13:23:19 +00:00
Brady Wetherington 1cff49116e Bump version numbers and upgrade requirements 2025-02-21 11:49:25 +00:00
Brady Wetherington 38c5f23a52 Merge branch 'v8' into develop 2025-02-21 11:15:44 +00:00
Marcus Moore c6bee0c47a Fix test 2025-02-20 13:24:01 -08:00
Marcus Moore ae7d7f7d22 Merge branch 'develop' into bug/sc-28148
# Conflicts:
#	routes/web.php
2025-02-20 13:23:55 -08:00
Marcus Moore 96ab828cec Fix indent 2025-02-20 13:05:42 -08:00
Marcus Moore 43f679a554 Revert some changes from #15525 2025-02-20 12:59:16 -08:00
Marcus Moore f1bf9fcf5c Implement test 2025-02-20 12:51:08 -08:00
Marcus Moore 992b4c7d86 Remove old comment 2025-02-20 12:50:03 -08:00
Marcus Moore 39bb2c2adb Implement tests 2025-02-20 12:49:58 -08:00
Marcus Moore 41129829e6 Add frontend required validation 2025-02-20 12:43:51 -08:00
Marcus Moore 44503fc423 Use translation 2025-02-20 12:41:56 -08:00
Marcus Moore 0190ccea27 Finish implementing test 2025-02-20 12:40:05 -08:00
snipe 5b63eb5a15 Merge pull request #16272 from snipe/experiments/breadcrumbs
Experimental WIP - added breadcrumbs, route model binding for resource routes
2025-02-20 19:21:58 +00:00
snipe 54cc427ef5 Updated tests for new RMB behavior
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 18:28:46 +00:00
snipe e0beed0fa3 Reapplied accessory gate
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 18:28:01 +00:00
snipe d4b24e5e57 Exception handler exceptions - exception inception!
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 18:27:45 +00:00
snipe 671b64bc6b Fixed RMB for kits and fields
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 15:01:17 +00:00
snipe 75db0d9e66 Fixed parameter for audit
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 15:00:57 +00:00
snipe b891992351 Nice language for audit/checkin screens accounting for null
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 15:00:35 +00:00
snipe ddb72bf4d0 Added breadcrumbs to licenses routes
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 15:00:08 +00:00
snipe 6f071722a2 Fixed kit crimbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:59:50 +00:00
snipe be9bd93588 More crombs, removed scan route that we don’t use
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:59:10 +00:00
snipe 44a7bdbfb5 Moved SAML gui settings routes to web.php
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:58:17 +00:00
snipe 0341335d14 Additional crombs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:57:48 +00:00
snipe 76f038d142 RMB for custom fields
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:57:18 +00:00
snipe 3150ad50c9 RMB for audits
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 14:57:07 +00:00
snipe 80394ef788 Revert delete because route model binding + resources routes + soft deletes = sux0r
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 12:29:37 +00:00
snipe 8a70f09dd3 Temp “fix” RMB for soft-deleted users
Signed-off-by: snipe <snipe@snipe.net>
2025-02-20 12:19:31 +00:00
Godfrey M a275391557 adds test for deleting assigned asset 2025-02-19 15:59:57 -08:00
Godfrey M eaacf29d57 fix tests 2025-02-19 15:11:16 -08:00
snipe 441fdaa54a Merge pull request #16278 from marcusmoore/bug/sc-27234
Added better error handling around rendering barcodes
2025-02-19 20:54:24 +00:00
Marcus Moore 759c8c8f5c Catch TypeError in addition to Exceptions when rendering barcodes 2025-02-19 12:36:50 -08:00
snipe 6242296930 Remove the “View” part of the breadcrumb
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 19:30:13 +00:00
snipe d330ef9919 Added crumbs and RMB for custom fields
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 18:23:16 +00:00
snipe 0708af7d07 Made the help ring slightly less goofy looking
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 18:22:50 +00:00
Godfrey M a534b488b2 prevents deletion of assigned assets in bulk deletion 2025-02-19 10:09:02 -08:00
snipe 3171c1b1c9 Added breadcrumbs for bulkaudit, requested, and import history
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 17:40:47 +00:00
snipe 2f2b879d98 Language refinement
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 17:40:12 +00:00
snipe 039f483ec8 Check for notes and cost before displaying them
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 16:57:24 +00:00
snipe 7f665e0005 De-uglifying the maintenances detail page
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 16:34:48 +00:00
snipe 292819afa5 Added maintenances crumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:29:06 +00:00
snipe 7a94b09017 Use MLB for kit group
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:07:14 +00:00
snipe 6b46d12d67 Added breadcrumbs on kits (sort of)
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:05:29 +00:00
snipe e264907157 Added breadcrumbs on more web routes
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:05:12 +00:00
snipe 32b89e937c Fixed routes
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:04:56 +00:00
snipe 0e1dc8745c Wider custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:04:45 +00:00
snipe 129d44cc70 Made icon possible for dashboard/home
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:04:34 +00:00
snipe 11b746d801 UI tweak
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:04:19 +00:00
snipe 545445d584 Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:04:07 +00:00
snipe 4d72fd8667 Added additional resource crumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:03:53 +00:00
snipe fca62a14f9 Fixed asset presenter to link to the company directly
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:03:29 +00:00
snipe c8f2d9806a Use route model binding on kits
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:03:15 +00:00
snipe 1ee5f28fca Added angle-right and house icon
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 14:02:59 +00:00
snipe 24a17b09a5 Fixed a few more tests and strings
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 09:03:41 +00:00
snipe a617c0545e WIP license checkin
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:39:25 +00:00
snipe eb7e24eeb0 Asset checkout with route model binding
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:39:16 +00:00
snipe 22c58678c4 License checkout controller with route model binding
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:38:55 +00:00
snipe 4beaf6b3ec Added item
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:38:40 +00:00
snipe 4c1856b91f Fixed wonky quote in HTML
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:37:58 +00:00
snipe 9d299340da Checkout license modifications (this doesn’t work yet
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:37:39 +00:00
snipe 457228d033 Route model binding on more asset methods
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:37:06 +00:00
snipe 63f4e3cc89 More breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 08:36:52 +00:00
snipe cd7135ea77 More test fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 06:19:50 +00:00
snipe 347eb2bdee Fixed route parameters and tests to match
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 05:03:56 +00:00
snipe ecc0e76e7b Fixed route parameters for helper
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 05:03:39 +00:00
snipe 35a89de6dd Fixed handler for reports
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 05:03:26 +00:00
snipe 82d8e1b0a9 Added item back into edit
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 04:18:57 +00:00
snipe 5a7ffa5664 Sure, whatever I guess.
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 04:18:40 +00:00
snipe 55abd242f2 Don’t know why I need to compact this?
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 04:07:09 +00:00
snipe 217d65f64c More changes to the error message formatting
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:47:51 +00:00
snipe fa20eb4965 Add exception for hardware vs assets :(
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:41:01 +00:00
snipe 560311b883 Added ->with(‘item’) back in
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:37:34 +00:00
snipe 3954ff20b4 More tweaks to the controllers, more breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:29:31 +00:00
snipe 989082d719 Handle the not found errors with route model binding
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 03:26:44 +00:00
snipe 644527c5a6 More resources to breadcrumb provider
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 02:49:21 +00:00
snipe f7d213052a Route model binding for resource groups
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 02:49:05 +00:00
snipe 972bd1ef83 Tinkering with routes for breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-02-19 00:37:09 +00:00
Marcus Moore cf0ce1c5ea Start to implement tests 2025-02-18 16:24:52 -08:00
Marcus Moore 3d69721af0 Scaffold tests 2025-02-18 16:16:00 -08:00
Marcus Moore 1995e1399e Start recording ip, user agent, and source 2025-02-18 16:04:53 -08:00
Marcus Moore 79d1147f20 Add validation 2025-02-18 15:46:52 -08:00
Marcus Moore 53c084c6c0 WIP: begin to store notes 2025-02-18 15:43:58 -08:00
Marcus Moore c165e6f400 Formatting 2025-02-18 15:20:22 -08:00
Marcus Moore 25215fd3c9 WIP: begin migrating notes to ui controller 2025-02-18 15:20:06 -08:00
Godfrey M 4c43a06eee add overdue asset to test 2025-02-13 11:19:49 -08:00
Godfrey M 25c8449e86 remove unused 2025-02-13 11:14:18 -08:00
Godfrey M 13e1f4a127 adds mailable 2025-02-13 11:09:39 -08:00
Godfrey M ed96fd766c refactors audit notification to mail, adds test, ads check to scheduler 2025-02-13 11:08:53 -08:00
Marcus Moore 00e7795414 Merge branch 'develop' into chore/migrate-select-helper
# Conflicts:
#	resources/views/partials/forms/edit/company.blade.php
2025-02-10 15:44:02 -08:00
Marcus Moore 77635c3737 Migrate Form::checkboxes on license edit view 2025-02-06 17:05:35 -08:00
Marcus Moore b937b7e767 Migrate Form::checkboxes on asset history import page 2025-02-06 17:01:09 -08:00
Marcus Moore 7cbb3f7e07 Add assertion 2025-01-30 11:48:55 -08:00
Marcus Moore 7e9c564d0b Simplify test 2025-01-30 11:47:43 -08:00
Marcus Moore fc88b2487f Extract method 2025-01-30 11:44:37 -08:00
Marcus Moore e94ee48f74 Extract helper 2025-01-30 10:37:11 -08:00
Marcus Moore 6a4a5d1380 Add translation 2025-01-30 10:35:31 -08:00
Marcus Moore ab9e9b66d2 Reduce complexity 2025-01-29 16:27:18 -08:00
Marcus Moore c15c338ffd Merge if/else 2025-01-29 16:25:37 -08:00
Marcus Moore d1197d015c Add another case scenario 2025-01-29 16:24:43 -08:00
Marcus Moore ce31ce477e Inline additional variables 2025-01-29 16:16:47 -08:00
Marcus Moore 78f9292555 Inline variable 2025-01-29 16:15:27 -08:00
Marcus Moore 4e7c6bd2cf Fix relationship 2025-01-29 16:14:09 -08:00
Marcus Moore 70aed45bfe Improve naming 2025-01-29 15:56:20 -08:00
Marcus Moore e2805f4033 Add "Reminder" to subject line 2025-01-29 15:36:45 -08:00
Marcus Moore d254a40e0a Scaffold tests 2025-01-29 15:21:10 -08:00
Marcus Moore fdcb891cbb Improve test case 2025-01-29 15:20:56 -08:00
Godfrey M 16d322d70e fix translation 2025-01-29 10:38:30 -08:00
Godfrey M 2163312997 adds translations for branding and general settings 2025-01-29 10:35:26 -08:00
Godfrey M 0dfb71cfe5 added some translations to branding and general setrting 2025-01-28 11:56:10 -08:00
Tobias Regnery 4e0bcac1a1 Furhter validation for scoped locations
There is a new validator introduced that checks on object update (assets, users, etc.) if the company matches the locations company.
In case of the creation of a new location it must be checked that the parent matches the own company.
On updating a location a check for every related object must be made to see if the company matches the location.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
2025-01-24 11:12:11 +01:00
Tobias Regnery 6921df9334 Check for inconsistencies before activating scoped locations
Before activating scoped location all locations and their related objects will be checked.
If there are locations with different companies than the related objects error out.

Because this operation is quite slow, bail out on the first inconsistent entry.
There is a new artisan command introduced that checks every location.

Depending on the size of the database, this will take very long.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
2025-01-23 15:26:04 +01:00
Marcus Moore 31097bdc37 Formatting 2025-01-21 10:25:53 -08:00
Marcus Moore e733d2a5d0 Backfill test 2025-01-21 10:24:15 -08:00
Marcus Moore 6a35fa7ba3 Account for missing asset model 2025-01-21 10:14:27 -08:00
Marcus Moore 370666b5bd Fix indenting 2025-01-21 10:12:56 -08:00
snipe b6f05bff1f Merge branch 'develop' into feature/locations_with_companies 2025-01-17 17:18:17 +00:00
Marcus Moore abb50fcd09 Delete unused partials 2025-01-13 16:21:19 -08:00
Marcus Moore 3fadeebd82 Convert additional Form::select to blade component 2025-01-13 16:20:02 -08:00
Marcus Moore 9a043da005 Convert additional Form::select to blade component 2025-01-13 16:16:49 -08:00
Marcus Moore 3eb307a019 Convert additional Form::select to blade component 2025-01-13 15:58:15 -08:00
Marcus Moore 888c96718c Convert additional Form::select to blade component 2025-01-13 15:38:51 -08:00
Marcus Moore bc3f236b86 Weaken comparsion so string and int keys match 2025-01-13 15:38:45 -08:00
Marcus Moore 1f4cc0a4b4 Convert additional Form::select to blade component 2025-01-13 15:23:43 -08:00
Marcus Moore 589ec3a564 Convert additional Form::select to blade component 2025-01-13 13:08:59 -08:00
Marcus Moore 2206b0a699 Convert additional Form::select to blade component 2025-01-13 12:50:18 -08:00
Marcus Moore d74454620a Convert Form::select to blade component 2025-01-13 12:45:49 -08:00
Marcus Moore ed0cec5ba6 Introduce select component 2025-01-13 12:17:01 -08:00
snipe 99526cfc2c Remove mcrypt and legacy recrypter
Signed-off-by: snipe <snipe@snipe.net>
2025-01-13 19:54:00 +00:00
spencerrlongg 513c78a09f Refactor CheckoutRequest actions for consistency
Renamed CheckoutRequest action classes to include "Action" in their names for consistency and clarity. Enhanced error handling in controllers to standardize error responses with translations. Updated usage of the renamed action classes throughout the code to ensure proper integration.
2024-12-03 17:51:12 -06:00
spencerrlongg 0103f20193 Merge branch 'develop' into feature/sc-24347 2024-12-03 16:05:39 -06:00
Fiala06 bdb0e6c2a3 Update LdapSync.php
Fix for duplicate entries preventing the sync from continuing. 

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '13178-6' for key 'PRIMARY' (Connection: mysql, SQL: insert into users_groups (group_id, user_id) values (6, 13178))
2024-12-02 11:07:37 -08:00
Brady Wetherington eccdcc373e parent 2220828b00
author Brady Wetherington <bwetherington@grokability.com> 1728320853 +0100
committer Brady Wetherington <bwetherington@grokability.com> 1733158021 +0000

Prevent setting assigned_to without setting assigned_type

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Added tighter validation to assigned_to and assigned_type, new tests

Fixed wrong comment

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Fixed wrong comment
2024-12-02 16:53:08 +00:00
Tobias Regnery 651d1c735b Another slightly less ugly way for backward compatibility
Instead of using a constructor, add a special check in the boot-method for locations.
This seems to fit better in the system and does hopefully not break the existing tests.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
2024-11-04 10:03:38 +01:00
Tobias Regnery 1318dc6111 Add a backward compatibility setting for locations with companies
Now that locations have a company_id they get restricted to the users company with FullMultipleCompanySupport.
This breaks backward compatibility, because before everyone can handle locations without restrictions.
Add a setting right below FullMultipleCompanySupport so that everyone can switch to the desired behaviour.
The default is off and the existing behaviour is preserved.
2024-11-04 10:03:38 +01:00
Tobias Regnery 1ccbf8942c Add ability to tie locations to companies
Locations are the last big part of the application that can't be tied to companies.
This can be a problem with FullMultipleCompanySupport, because you can't restrict the visibility of locations to the company of the users.

In order to change this, add a company_id to the locations table and wire everything up in the views and controllers.
Aditionally add a new formatter to filter the locations to a specific company, like it is done for assets.

Locations are properly scoped to the users company if FullMultipleCompanySupport is enabled.
If a parent location of a location has a different company than the user, the location does not show up.
2024-11-04 10:03:37 +01:00
spencerrlongg c76cccbb68 rm extraneous methods in exception 2024-10-23 12:56:36 -05:00
spencerrlongg fdb6970f36 this is pretty much done 2024-10-23 01:41:27 -05:00
spencerrlongg b0d7eb2168 cancel action finished 2024-10-22 22:44:28 -05:00
spencerrlongg 79e6eafafa cancelled scaffolded out 2024-10-22 22:33:29 -05:00
spencerrlongg 3ee008e871 revert 2024-10-22 20:54:20 -05:00
spencerrlongg 48c812d345 bunch of cleanup, split cancel out 2024-10-22 20:48:27 -05:00
spencerrlongg 8a99cc1391 test working 2024-10-22 17:25:58 -05:00
spencerrlongg b59bf495e1 stuff 2024-10-22 15:09:35 -05:00
spencerrlongg e40849c910 this stuff works 2024-10-21 17:31:26 -05:00
spencerrlongg 95a32864cf hm, lots to think about 🤔 2024-10-17 18:11:18 -05:00
spencerrlongg 1fd945c2d8 this works 2024-10-17 12:45:49 -05:00
spencerrlongg b2ff34260a hm, lots of thinking to do 2024-10-17 00:02:15 -05:00
spencerrlongg a524c0b418 more work 2024-10-16 18:48:15 -05:00
spencerrlongg b1d62cc478 initial untested 2024-10-16 17:23:22 -05:00
snipe 5cdb52a249 Corrected flag
Signed-off-by: snipe <snipe@snipe.net>
2024-08-29 21:33:08 +01:00
snipe ea38d6c2f3 Decode as integers
Signed-off-by: snipe <snipe@snipe.net>
2024-08-29 21:26:38 +01:00
2238 changed files with 316759 additions and 11690 deletions
+902 -11
View File
@@ -2590,10 +2590,10 @@
]
},
{
"login": "QveenSi",
"login": "qveensi",
"name": "Yevhenii Huzii",
"avatar_url": "https://avatars.githubusercontent.com/u/19945501?v=4",
"profile": "https://github.com/QveenSi",
"profile": "https://github.com/qveensi",
"contributions": [
"code"
]
@@ -2607,15 +2607,6 @@
"code"
]
},
{
"login": "QveenSi",
"name": "Yevhenii Huzii",
"avatar_url": "https://avatars.githubusercontent.com/u/19945501?v=4",
"profile": "https://github.com/QveenSi",
"contributions": [
"code"
]
},
{
"login": "chrisweirich",
"name": "Christian Weirich",
@@ -3271,6 +3262,906 @@
"contributions": [
"code"
]
},
{
"login": "addex12",
"name": "Adugna Gizaw",
"avatar_url": "https://avatars.githubusercontent.com/u/18550946?v=4",
"profile": "https://orbalia.pythonanywhere.com/",
"contributions": [
"translation"
]
},
{
"login": "jostrander",
"name": "Jesse Ostrander",
"avatar_url": "https://avatars.githubusercontent.com/u/760989?v=4",
"profile": "https://github.com/jostrander",
"contributions": [
"code"
]
},
{
"login": "azmcnutt",
"name": "James M",
"avatar_url": "https://avatars.githubusercontent.com/u/31522486?v=4",
"profile": "https://github.com/azmcnutt",
"contributions": [
"code"
]
},
{
"login": "Fiala06",
"name": "Fiala06",
"avatar_url": "https://avatars.githubusercontent.com/u/5183146?v=4",
"profile": "https://github.com/Fiala06",
"contributions": [
"code"
]
},
{
"login": "ntaylor-86",
"name": "Nathan Taylor",
"avatar_url": "https://avatars.githubusercontent.com/u/28693782?v=4",
"profile": "https://github.com/ntaylor-86",
"contributions": [
"code"
]
},
{
"login": "fvollmer",
"name": "fvollmer",
"avatar_url": "https://avatars.githubusercontent.com/u/16699443?v=4",
"profile": "https://github.com/fvollmer",
"contributions": [
"code"
]
},
{
"login": "36864",
"name": "36864",
"avatar_url": "https://avatars.githubusercontent.com/u/109086466?v=4",
"profile": "https://github.com/36864",
"contributions": [
"code"
]
},
{
"login": "CloCkWeRX",
"name": "Daniel O'Connor",
"avatar_url": "https://avatars.githubusercontent.com/u/365751?v=4",
"profile": "http://clockwerx.blogspot.com/",
"contributions": [
"code"
]
},
{
"login": "BeatSpark",
"name": "BeatSpark",
"avatar_url": "https://avatars.githubusercontent.com/u/102852568?v=4",
"profile": "https://github.com/BeatSpark",
"contributions": [
"code"
]
},
{
"login": "mrdahbi",
"name": "mrdahbi",
"avatar_url": "https://avatars.githubusercontent.com/u/59203607?v=4",
"profile": "https://github.com/mrdahbi",
"contributions": [
"code"
]
},
{
"login": "chfsx",
"name": "Fabian Schmid",
"avatar_url": "https://avatars.githubusercontent.com/u/6661332?v=4",
"profile": "http://sr.solutions",
"contributions": [
"code"
]
},
{
"login": "realchrisolin",
"name": "Chris Olin",
"avatar_url": "https://avatars.githubusercontent.com/u/1288116?v=4",
"profile": "https://www.chrisolin.com",
"contributions": [
"code"
]
},
{
"login": "mnemonicly",
"name": "Dan",
"avatar_url": "https://avatars.githubusercontent.com/u/3803132?v=4",
"profile": "https://github.com/mnemonicly",
"contributions": [
"code"
]
},
{
"login": "NebelKreis",
"name": "Nebel",
"avatar_url": "https://avatars.githubusercontent.com/u/43917728?v=4",
"profile": "https://github.com/NebelKreis",
"contributions": [
"code"
]
},
{
"login": "test1337ahp",
"name": "test1337ahp",
"avatar_url": "https://avatars.githubusercontent.com/u/132433803?v=4",
"profile": "https://github.com/test1337ahp",
"contributions": [
"code"
]
},
{
"login": "JonathonReinhart",
"name": "Jonathon Reinhart",
"avatar_url": "https://avatars.githubusercontent.com/u/1916566?v=4",
"profile": "https://github.com/JonathonReinhart",
"contributions": [
"code"
]
},
{
"login": "aranar-pro",
"name": "aranar-pro",
"avatar_url": "https://avatars.githubusercontent.com/u/484742?v=4",
"profile": "https://github.com/aranar-pro",
"contributions": [
"code"
]
},
{
"login": "phil-flip",
"name": "Phil",
"avatar_url": "https://avatars.githubusercontent.com/u/27019397?v=4",
"profile": "https://github.com/phil-flip",
"contributions": [
"code"
]
},
{
"login": "fe80",
"name": "Steffy Fort",
"avatar_url": "https://avatars.githubusercontent.com/u/6473460?v=4",
"profile": "https://fe80.fr/",
"contributions": [
"code"
]
},
{
"login": "sorvani",
"name": "Jared Busch",
"avatar_url": "https://avatars.githubusercontent.com/u/3302372?v=4",
"profile": "https://github.com/sorvani",
"contributions": [
"code"
]
},
{
"login": "seanborg-codethink",
"name": "seanborg-codethink",
"avatar_url": "https://avatars.githubusercontent.com/u/111956991?v=4",
"profile": "https://github.com/seanborg-codethink",
"contributions": [
"code"
]
},
{
"login": "dkaatz",
"name": "dkaatz",
"avatar_url": "https://avatars.githubusercontent.com/u/160669961?v=4",
"profile": "https://github.com/dkaatz",
"contributions": [
"code"
]
},
{
"login": "DanielRuf",
"name": "Daniel Ruf",
"avatar_url": "https://avatars.githubusercontent.com/u/827205?v=4",
"profile": "https://threema.id/74SF7MW6?text=",
"contributions": [
"code"
]
},
{
"login": "ahpaleus",
"name": "ahpaleus",
"avatar_url": "https://avatars.githubusercontent.com/u/38883201?v=4",
"profile": "https://github.com/ahpaleus",
"contributions": [
"code"
]
},
{
"login": "mink-adao-duy",
"name": "Anh DAO-DUY",
"avatar_url": "https://avatars.githubusercontent.com/u/22906055?v=4",
"profile": "https://github.com/mink-adao-duy",
"contributions": [
"code"
]
},
{
"login": "Serdnad",
"name": "Andres Gutierrez",
"avatar_url": "https://avatars.githubusercontent.com/u/4723453?v=4",
"profile": "https://github.com/Serdnad",
"contributions": [
"code"
]
},
{
"login": "wewhite",
"name": "Warren White",
"avatar_url": "https://avatars.githubusercontent.com/u/111083379?v=4",
"profile": "https://github.com/wewhite",
"contributions": [
"code"
]
},
{
"login": "robintemme",
"name": "Robin Temme",
"avatar_url": "https://avatars.githubusercontent.com/u/2809241?v=4",
"profile": "https://robintemme.de/",
"contributions": [
"code"
]
},
{
"login": "herroworrd",
"name": "herroworrd",
"avatar_url": "https://avatars.githubusercontent.com/u/47008367?v=4",
"profile": "https://github.com/herroworrd",
"contributions": [
"code"
]
},
{
"login": "vicleos",
"name": "vicleos",
"avatar_url": "https://avatars.githubusercontent.com/u/28558609?v=4",
"profile": "https://mubiu.com/",
"contributions": [
"code"
]
},
{
"login": "thinkl33t",
"name": "Bob Clough",
"avatar_url": "https://avatars.githubusercontent.com/u/1016780?v=4",
"profile": "http://thinkl33t.co.uk/",
"contributions": [
"code"
]
},
{
"login": "brandon-bailey",
"name": "Brandon Daniel Bailey",
"avatar_url": "https://avatars.githubusercontent.com/u/10648463?v=4",
"profile": "https://github.com/brandon-bailey",
"contributions": [
"code"
]
},
{
"login": "marcquark",
"name": "Marc Bartelt",
"avatar_url": "https://avatars.githubusercontent.com/u/23556080?v=4",
"profile": "https://github.com/marcquark",
"contributions": [
"code"
]
},
{
"login": "manu-crealytics",
"name": "manu-crealytics",
"avatar_url": "https://avatars.githubusercontent.com/u/18286893?v=4",
"profile": "https://github.com/manu-crealytics",
"contributions": [
"code"
]
},
{
"login": "Galaxy102",
"name": "Konstantin Köhring",
"avatar_url": "https://avatars.githubusercontent.com/u/18245993?v=4",
"profile": "https://www.galaxy102.de/",
"contributions": [
"code"
]
},
{
"login": "deloz",
"name": "Deloz",
"avatar_url": "https://avatars.githubusercontent.com/u/685167?v=4",
"profile": "https://deloz.net/",
"contributions": [
"code"
]
},
{
"login": "mbrrg",
"name": "Martin Berg",
"avatar_url": "https://avatars.githubusercontent.com/u/2682426?v=4",
"profile": "https://github.com/mbrrg",
"contributions": [
"code"
]
},
{
"login": "Nothing4You",
"name": "Richard Schwab",
"avatar_url": "https://avatars.githubusercontent.com/u/3694534?v=4",
"profile": "https://github.com/Nothing4You",
"contributions": [
"code"
]
},
{
"login": "rickheil",
"name": "Rick Heil",
"avatar_url": "https://avatars.githubusercontent.com/u/8959676?v=4",
"profile": "https://rickheil.com/",
"contributions": [
"code"
]
},
{
"login": "rosscdh",
"name": "Ross Crawford-d'Heureuse",
"avatar_url": "https://avatars.githubusercontent.com/u/397106?v=4",
"profile": "https://github.com/rosscdh",
"contributions": [
"code"
]
},
{
"login": "McG800",
"name": "Ryan McGuire",
"avatar_url": "https://avatars.githubusercontent.com/u/1621107?v=4",
"profile": "https://github.com/McG800",
"contributions": [
"code"
]
},
{
"login": "SBrown2021",
"name": "SBrown2021",
"avatar_url": "https://avatars.githubusercontent.com/u/77835667?v=4",
"profile": "https://github.com/SBrown2021",
"contributions": [
"code"
]
},
{
"login": "serkanerip",
"name": "Serkan",
"avatar_url": "https://avatars.githubusercontent.com/u/8780913?v=4",
"profile": "https://github.com/serkanerip",
"contributions": [
"code"
]
},
{
"login": "Shankschn",
"name": "Shanks",
"avatar_url": "https://avatars.githubusercontent.com/u/63188620?v=4",
"profile": "https://www.yudelei.com/",
"contributions": [
"code"
]
},
{
"login": "cendai-mis",
"name": "cendai-mis",
"avatar_url": "https://avatars.githubusercontent.com/u/198525698?v=4",
"profile": "https://github.com/cendai-mis",
"contributions": [
"code"
]
},
{
"login": "smcpeck",
"name": "Shaun McPeck",
"avatar_url": "https://avatars.githubusercontent.com/u/8724583?v=4",
"profile": "https://smcpeck.github.io/",
"contributions": [
"code"
]
},
{
"login": "snazy2000",
"name": "Stephen",
"avatar_url": "https://avatars.githubusercontent.com/u/1378836?v=4",
"profile": "https://github.com/snazy2000",
"contributions": [
"code"
]
},
{
"login": "Nevets82",
"name": "Steven",
"avatar_url": "https://avatars.githubusercontent.com/u/4462739?v=4",
"profile": "http://nevets82.github.io/",
"contributions": [
"code"
]
},
{
"login": "Mateus-Romera",
"name": "Mateus Villar",
"avatar_url": "https://avatars.githubusercontent.com/u/29017267?v=4",
"profile": "https://mateusvillar.com/",
"contributions": [
"code"
]
},
{
"login": "mzack5020",
"name": "Matthew Zackschewski",
"avatar_url": "https://avatars.githubusercontent.com/u/12749393?v=4",
"profile": "https://github.com/mzack5020",
"contributions": [
"code"
]
},
{
"login": "firefrei",
"name": "Matthias Frei",
"avatar_url": "https://avatars.githubusercontent.com/u/12660103?v=4",
"profile": "https://www.frei.media/",
"contributions": [
"code"
]
},
{
"login": "nticaric",
"name": "Nenad Ticaric",
"avatar_url": "https://avatars.githubusercontent.com/u/824840?v=4",
"profile": "https://github.com/nticaric",
"contributions": [
"code"
]
},
{
"login": "Scorcher",
"name": "Nikolay Didenko",
"avatar_url": "https://avatars.githubusercontent.com/u/706439?v=4",
"profile": "https://github.com/Scorcher",
"contributions": [
"code"
]
},
{
"login": "nunomaduro",
"name": "Nuno Maduro",
"avatar_url": "https://avatars.githubusercontent.com/u/5457236?v=4",
"profile": "https://nunomaduro.com/sponsorships",
"contributions": [
"code"
]
},
{
"login": "owalerys",
"name": "Oliver Walerys",
"avatar_url": "https://avatars.githubusercontent.com/u/8883074?v=4",
"profile": "https://tektikhq.com/",
"contributions": [
"code"
]
},
{
"login": "rcmcdonald91",
"name": "R. Christian McDonald",
"avatar_url": "https://avatars.githubusercontent.com/u/3102039?v=4",
"profile": "https://keybase.io/rcmcdonald91",
"contributions": [
"code"
]
},
{
"login": "nixn",
"name": "nix",
"avatar_url": "https://avatars.githubusercontent.com/u/1525581?v=4",
"profile": "https://nnix.net/",
"contributions": [
"code"
]
},
{
"login": "octobunny",
"name": "octobunny",
"avatar_url": "https://avatars.githubusercontent.com/u/55462380?v=4",
"profile": "https://github.com/octobunny",
"contributions": [
"code"
]
},
{
"login": "sreyemnayr",
"name": "Ryan",
"avatar_url": "https://avatars.githubusercontent.com/u/8558670?v=4",
"profile": "https://github.com/sreyemnayr",
"contributions": [
"code"
]
},
{
"login": "p3nj",
"name": "p3nj",
"avatar_url": "https://avatars.githubusercontent.com/u/1501022?v=4",
"profile": "https://benji.ltd/",
"contributions": [
"code"
]
},
{
"login": "timwsuqld",
"name": "Tim White",
"avatar_url": "https://avatars.githubusercontent.com/u/6201617?v=4",
"profile": "https://github.com/timwsuqld",
"contributions": [
"code"
]
},
{
"login": "yannikp",
"name": "yannikp",
"avatar_url": "https://avatars.githubusercontent.com/u/22473767?v=4",
"profile": "https://github.com/yannikp",
"contributions": [
"code"
]
},
{
"login": "viclou",
"name": "victoria",
"avatar_url": "https://avatars.githubusercontent.com/u/20525448?v=4",
"profile": "https://github.com/viclou",
"contributions": [
"code"
]
},
{
"login": "valentyntu",
"name": "Valentyn Tulub",
"avatar_url": "https://avatars.githubusercontent.com/u/40685314?v=4",
"profile": "https://github.com/valentyntu",
"contributions": [
"code"
]
},
{
"login": "Wouter0100",
"name": "Wouter van Os",
"avatar_url": "https://avatars.githubusercontent.com/u/864520?v=4",
"profile": "http://wouter0100.nl/",
"contributions": [
"code"
]
},
{
"login": "xWyatt",
"name": "Wyatt Teeter",
"avatar_url": "https://avatars.githubusercontent.com/u/3946540?v=4",
"profile": "https://www.linkedin.com/in/wyatt-teeter",
"contributions": [
"code"
]
},
{
"login": "terwey",
"name": "Yorick Terweijden",
"avatar_url": "https://avatars.githubusercontent.com/u/1596124?v=4",
"profile": "https://github.com/terwey",
"contributions": [
"code"
]
},
{
"login": "bmkalle",
"name": "bmkalle",
"avatar_url": "https://avatars.githubusercontent.com/u/69298836?v=4",
"profile": "https://github.com/bmkalle",
"contributions": [
"code"
]
},
{
"login": "bricelabelle",
"name": "bricelabelle",
"avatar_url": "https://avatars.githubusercontent.com/u/28403467?v=4",
"profile": "https://github.com/bricelabelle",
"contributions": [
"code"
]
},
{
"login": "corydlamb",
"name": "corydlamb",
"avatar_url": "https://avatars.githubusercontent.com/u/97770090?v=4",
"profile": "https://github.com/corydlamb",
"contributions": [
"code"
]
},
{
"login": "splashx",
"name": "Diogenes S. Jesus",
"avatar_url": "https://avatars.githubusercontent.com/u/1154133?v=4",
"profile": "http://twitter.com/splash",
"contributions": [
"code"
]
},
{
"login": "dkmansion",
"name": "D M",
"avatar_url": "https://avatars.githubusercontent.com/u/5826629?v=4",
"profile": "https://github.com/dkmansion",
"contributions": [
"code"
]
},
{
"login": "Jarli01",
"name": "Dustin B",
"avatar_url": "https://avatars.githubusercontent.com/u/14837699?v=4",
"profile": "https://github.com/Jarli01",
"contributions": [
"code"
]
},
{
"login": "fabiang",
"name": "Fabian Grutschus",
"avatar_url": "https://avatars.githubusercontent.com/u/348344?v=4",
"profile": "https://github.com/fabiang",
"contributions": [
"code"
]
},
{
"login": "MelonSmasher",
"name": "MelonSmasher",
"avatar_url": "https://avatars.githubusercontent.com/u/1491053?v=4",
"profile": "https://github.com/MelonSmasher",
"contributions": [
"code"
]
},
{
"login": "AlexanderWPapyrus",
"name": "AlexanderWPapyrus",
"avatar_url": "https://avatars.githubusercontent.com/u/80526133?v=4",
"profile": "https://github.com/AlexanderWPapyrus",
"contributions": [
"code"
]
},
{
"login": "disc",
"name": "Alexandr Hacicheant",
"avatar_url": "https://avatars.githubusercontent.com/u/306231?v=4",
"profile": "https://github.com/disc",
"contributions": [
"code"
]
},
{
"login": "hex128",
"name": "Hex",
"avatar_url": "https://avatars.githubusercontent.com/u/3032891?v=4",
"profile": "https://hex128.io/",
"contributions": [
"code"
]
},
{
"login": "arukompas",
"name": "Arunas Skirius",
"avatar_url": "https://avatars.githubusercontent.com/u/8697942?v=4",
"profile": "https://github.com/arukompas",
"contributions": [
"code"
]
},
{
"login": "benperiton",
"name": "Ben Periton",
"avatar_url": "https://avatars.githubusercontent.com/u/104396?v=4",
"profile": "https://github.com/benperiton",
"contributions": [
"code"
]
},
{
"login": "byronwolfman",
"name": "Byron Wolfman",
"avatar_url": "https://avatars.githubusercontent.com/u/11906832?v=4",
"profile": "https://wolfman.dev/",
"contributions": [
"code"
]
},
{
"login": "CalvinSchwartz",
"name": "Calvin",
"avatar_url": "https://avatars.githubusercontent.com/u/56485508?v=4",
"profile": "https://github.com/CalvinSchwartz",
"contributions": [
"code"
]
},
{
"login": "juanfont",
"name": "Juan Font",
"avatar_url": "https://avatars.githubusercontent.com/u/181059?v=4",
"profile": "https://github.com/juanfont",
"contributions": [
"code"
]
},
{
"login": "juhotaipale",
"name": "Juho Taipale",
"avatar_url": "https://avatars.githubusercontent.com/u/13137708?v=4",
"profile": "https://github.com/juhotaipale",
"contributions": [
"code"
]
},
{
"login": "KorvinSzanto",
"name": "Korvin Szanto",
"avatar_url": "https://avatars.githubusercontent.com/u/1007419?v=4",
"profile": "https://github.com/KorvinSzanto",
"contributions": [
"code"
]
},
{
"login": "sniff122",
"name": "Lewis Foster",
"avatar_url": "https://avatars.githubusercontent.com/u/8513053?v=4",
"profile": "https://lewisfoster.foo/",
"contributions": [
"code"
]
},
{
"login": "loganswartz",
"name": "Logan Swartzendruber",
"avatar_url": "https://avatars.githubusercontent.com/u/33877541?v=4",
"profile": "https://github.com/loganswartz",
"contributions": [
"code"
]
},
{
"login": "lopezio",
"name": "Lorenzo P.",
"avatar_url": "https://avatars.githubusercontent.com/u/1156208?v=4",
"profile": "https://github.com/lopezio",
"contributions": [
"code"
]
},
{
"login": "m4us1ne",
"name": "Lukas Jung",
"avatar_url": "https://avatars.githubusercontent.com/u/33946590?v=4",
"profile": "https://github.com/m4us1ne",
"contributions": [
"code"
]
},
{
"login": "LeafedFox",
"name": "Ellie",
"avatar_url": "https://avatars.githubusercontent.com/u/10965027?v=4",
"profile": "https://leafedfox.xyz/",
"contributions": [
"code"
]
},
{
"login": "gastamper",
"name": "GA Stamper",
"avatar_url": "https://avatars.githubusercontent.com/u/20960555?v=4",
"profile": "https://github.com/gastamper",
"contributions": [
"code"
]
},
{
"login": "gl-pup",
"name": "Guillaume Lefranc",
"avatar_url": "https://avatars.githubusercontent.com/u/206553556?v=4",
"profile": "https://github.com/gl-pup",
"contributions": [
"code"
]
},
{
"login": "dasjoe",
"name": "Hajo Möller",
"avatar_url": "https://avatars.githubusercontent.com/u/733892?v=4",
"profile": "https://github.com/dasjoe",
"contributions": [
"code"
]
},
{
"login": "pottom",
"name": "Istvan Basa",
"avatar_url": "https://avatars.githubusercontent.com/u/3420063?v=4",
"profile": "https://github.com/pottom",
"contributions": [
"code"
]
},
{
"login": "jjasghar",
"name": "JJ Asghar",
"avatar_url": "https://avatars.githubusercontent.com/u/810824?v=4",
"profile": "https://jjasghar.github.io/",
"contributions": [
"code"
]
},
{
"login": "JemCdo",
"name": "James E. Msenga",
"avatar_url": "https://avatars.githubusercontent.com/u/40404495?v=4",
"profile": "https://github.com/JemCdo",
"contributions": [
"code"
]
},
{
"login": "jfwiebe",
"name": "Jan Felix Wiebe",
"avatar_url": "https://avatars.githubusercontent.com/u/6865786?v=4",
"profile": "https://github.com/jfwiebe",
"contributions": [
"code"
]
},
{
"login": "drexljo",
"name": "Jo Drexl",
"avatar_url": "https://avatars.githubusercontent.com/u/43412008?v=4",
"profile": "https://www.nfon.com/",
"contributions": [
"code"
]
},
{
"login": "austinsasko",
"name": "Austin Sasko",
"avatar_url": "https://avatars.githubusercontent.com/u/4807843?v=4",
"profile": "https://github.com/austinsasko",
"contributions": [
"code"
]
},
{
"login": "JassonCordones",
"name": "Jasson",
"avatar_url": "https://avatars.githubusercontent.com/u/4875039?v=4",
"profile": "http://jassoncordones.github.io",
"contributions": [
"code"
]
}
]
}
+9 -1
View File
@@ -16,7 +16,7 @@ APP_DEBUG=true
APP_KEY=base64:3ilviXqB9u6DX1NRcyWGJ+sjySF+H18CPDGb3+IVwMQ=
APP_URL=http://localhost:8000
APP_TIMEZONE='UTC'
APP_LOCALE=en
APP_LOCALE=en-US
MAX_RESULTS=500
# --------------------------------------------
@@ -35,6 +35,7 @@ DB_USERNAME=snipeit
DB_PASSWORD=changeme1234
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_DUMP_SKIP_SSL=true
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
@@ -78,6 +79,13 @@ MAIL_BACKUP_NOTIFICATION_DRIVER=null
MAIL_BACKUP_NOTIFICATION_ADDRESS=null
BACKUP_ENV=true
# --------------------------------------------
# OPTIONAL: CHANGE PHP UPLOAD LIMITS (UNCOMMENT WHEN NEEDING TO BE CHANGED)
# --------------------------------------------
#PHP_UPLOAD_LIMIT=10
#PHP_POST_MAX_SIZE=10
#PHP_UPLOAD_MAX_FILESIZE=10
#PHP_MEMORY_LIMIT=10
# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
+10
View File
@@ -35,6 +35,7 @@ DB_PASSWORD=changeme1234
MYSQL_ROOT_PASSWORD=changeme1234
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_DUMP_SKIP_SSL=true
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
@@ -83,6 +84,15 @@ MAIL_BACKUP_NOTIFICATION_DRIVER=null
MAIL_BACKUP_NOTIFICATION_ADDRESS=null
BACKUP_ENV=true
# --------------------------------------------
# OPTIONAL: CHANGE PHP UPLOAD LIMITS (UNCOMMENT WHEN NEEDING TO BE CHANGED)
# --------------------------------------------
#PHP_UPLOAD_LIMIT=10
#PHP_POST_MAX_SIZE=10
#PHP_UPLOAD_MAX_FILESIZE=10
#PHP_MEMORY_LIMIT=10
# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
# --------------------------------------------
+3 -1
View File
@@ -30,6 +30,7 @@ DB_USERNAME=null
DB_PASSWORD=null
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_DUMP_SKIP_SSL=false
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
DB_SANITIZE_BY_DEFAULT=false
@@ -99,7 +100,7 @@ PASSPORT_COOKIE_NAME='snipeit_passport_token'
COOKIE_DOMAIN=null
SECURE_COOKIES=false
API_TOKEN_EXPIRATION_YEARS=15
BS_TABLE_STORAGE=cookieStorage
BS_TABLE_STORAGE=localStorage
BS_TABLE_DEEPLINK=true
# --------------------------------------------
@@ -178,6 +179,7 @@ PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
# OPTIONAL: MISC
# --------------------------------------------
LOG_CHANNEL=single
LOG_DEPRECATIONS=false
LOG_MAX_DAYS=10
APP_LOCKED=false
APP_CIPHER=AES-256-CBC
+4 -4
View File
@@ -10,10 +10,10 @@ name: Codacy Security Scan
on:
push:
branches: [ master ]
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ develop ]
schedule:
- cron: '36 23 * * 3'
@@ -22,11 +22,11 @@ permissions:
jobs:
codacy-security-scan:
# Ensure schedule job never runs on forked repos. It's only executed for 'snipe/snipe-it'
# Ensure schedule job never runs on forked repos. It's only executed for 'grokability/snipe-it'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
if: (github.repository == 'snipe/snipe-it') || ((github.repository != 'snipe/snipe-it') && (github.event_name != 'schedule'))
if: (github.repository == 'grokability/snipe-it') || ((github.repository != 'grokability/snipe-it') && (github.event_name != 'schedule'))
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
+3 -3
View File
@@ -20,8 +20,8 @@ permissions:
jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for 'snipe/snipe-it'
if: github.repository == 'snipe/snipe-it'
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
if: github.repository == 'grokability/snipe-it'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
@@ -32,7 +32,7 @@ jobs:
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
type=ref,event=tag,suffix=-alpine
type=semver,pattern=v{{major}}-latest-alpine
type=semver,pattern=v{{major}}-latest-alpine
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We turn off 'latest' tag by default.
@@ -1,5 +1,5 @@
# Snipe-IT Docker image build for hub.docker.com
name: Docker images
name: Docker images (Ubuntu)
# Run this Build for all pushes to 'master' or develop branch, or tagged releases.
# Also run for PRs to ensure PR doesn't break Docker build process
@@ -20,8 +20,8 @@ permissions:
jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for 'snipe/snipe-it'
if: github.repository == 'snipe/snipe-it'
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
if: github.repository == 'grokability/snipe-it'
runs-on: ubuntu-latest
env:
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
@@ -32,7 +32,7 @@ jobs:
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
type=semver,pattern=v{{major}}-latest
type=semver,pattern=v{{major}}-latest
# Define default tag "flavor" for docker/metadata-action per
# https://github.com/docker/metadata-action#flavor-input
# We turn off 'latest' tag by default.
+2 -2
View File
@@ -25,9 +25,9 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
name: PHP ${{ matrix.php-version }}
@@ -67,7 +67,7 @@ jobs:
run: |
php artisan key:generate
php artisan migrate --force
php artisan passport:install
php artisan passport:install --no-interaction
chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
+3 -2
View File
@@ -21,9 +21,10 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
name: PHP ${{ matrix.php-version }}
@@ -64,7 +65,7 @@ jobs:
run: |
php artisan key:generate
php artisan migrate --force
php artisan passport:install
php artisan passport:install --no-interaction
chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1.1"
- "8.3"
name: PHP ${{ matrix.php-version }}
+240
View File
@@ -0,0 +1,240 @@
{
"standard": "WCAG2AA",
"level": "error",
"defaults": {
"useIncognitoBrowserContext": false,
"timeout": 500000,
"wait": 5000,
"ignore" : [
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G145.Fail",
"WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail"
],
"viewport": {
"width": 1280,
"height": 1024
}
},
"urls": [
{
"__NOTE" : "this should always be FIRST (if browser context is preserved)",
"url": "https://snipe-it.test/login",
"actions": [
"navigate to https://snipe-it.test/login",
"screen capture tests/pa11y/login.png",
"set field input[name='username'] to admin",
"set field input[name='password'] to password",
"click element button[type=submit]",
"wait for url to be https://snipe-it.test/",
"screen capture tests/pa11y/dashboard.png"
]
},
{
"url" : "https://snipe-it.test/admin",
"actions" : [
"navigate to https://snipe-it.test/admin",
"screen capture tests/pa11y/admin-settings.png"
]
},
{
"url" : "https://snipe-it.test/admin/branding",
"actions" : [
"navigate to https://snipe-it.test/admin/branding",
"screen capture tests/pa11y/admin-branding.png"
]
},
{
"url" : "https://snipe-it.test/admin/general",
"actions" : [
"navigate to https://snipe-it.test/admin/general",
"screen capture tests/pa11y/admin-general.png"
]
},
{
"url" : "https://snipe-it.test/hardware/create",
"actions" : [
"navigate to https://snipe-it.test/hardware/create",
"screen capture tests/pa11y/asset-create.png"
]
},
{
"url" : "https://snipe-it.test/hardware",
"actions" : [
"navigate to https://snipe-it.test/hardware",
"screen capture tests/pa11y/asset-list.png"
]
},
{
"url" : "https://snipe-it.test/hardware/1",
"actions" : [
"navigate to https://snipe-it.test/hardware/1",
"screen capture tests/pa11y/asset-detail.png"
]
},
{
"url" : "https://snipe-it.test/account/view-assets",
"actions" : [
"navigate to https://snipe-it.test/account/view-assets",
"screen capture tests/pa11y/profile.png"
]
},
{
"url" : "https://snipe-it.test/licences",
"actions" : [
"navigate to https://snipe-it.test/licenses",
"screen capture tests/pa11y/license-list.png"
]
},
{
"url" : "https://snipe-it.test/licences/create",
"actions" : [
"navigate to https://snipe-it.test/licenses/create",
"screen capture tests/pa11y/license-create.png"
]
},
{
"url" : "https://snipe-it.test/licences/1",
"actions" : [
"navigate to https://snipe-it.test/licenses/1",
"screen capture tests/pa11y/license-view.png"
]
},
{
"url" : "https://snipe-it.test/consumables",
"actions" : [
"navigate to https://snipe-it.test/consumables",
"screen capture tests/pa11y/consumable-list.png"
]
},
{
"url" : "https://snipe-it.test/consumables/create",
"actions" : [
"navigate to https://snipe-it.test/consumables/create",
"screen capture tests/pa11y/consumable-create.png"
]
},
{
"url" : "https://snipe-it.test/consumables/1",
"actions" : [
"navigate to https://snipe-it.test/consumables/1",
"screen capture tests/pa11y/consumable-view.png"
]
},
{
"url" : "https://snipe-it.test/accessories",
"actions" : [
"navigate to https://snipe-it.test/accessories",
"screen capture tests/pa11y/accessory-list.png"
]
},
{
"url" : "https://snipe-it.test/accessories/create",
"actions" : [
"navigate to https://snipe-it.test/accessories/create",
"screen capture tests/pa11y/accessory-create.png"
]
},
{
"url" : "https://snipe-it.test/accessories/1",
"actions" : [
"navigate to https://snipe-it.test/accessories/1",
"screen capture tests/pa11y/accessory-view.png"
]
},
{
"url" : "https://snipe-it.test/locations",
"actions" : [
"navigate to https://snipe-it.test/locations",
"screen capture tests/pa11y/location-list.png"
]
},
{
"url" : "https://snipe-it.test/locations/create",
"actions" : [
"navigate to https://snipe-it.test/locations/create",
"screen capture tests/pa11y/location-create.png"
]
},
{
"url" : "https://snipe-it.test/locations/1",
"actions" : [
"navigate to https://snipe-it.test/locations/1",
"screen capture tests/pa11y/location-view.png"
]
},
{
"url" : "https://snipe-it.test/models",
"actions" : [
"navigate to https://snipe-it.test/models",
"screen capture tests/pa11y/model-list.png"
]
},
{
"url" : "https://snipe-it.test/models/create",
"actions" : [
"navigate to https://snipe-it.test/models/create",
"screen capture tests/pa11y/model-create.png"
]
},
{
"url" : "https://snipe-it.test/models/1",
"actions" : [
"navigate to https://snipe-it.test/models/1",
"screen capture tests/pa11y/model-view.png"
]
},
{
"url" : "https://snipe-it.test/companies",
"actions" : [
"navigate to https://snipe-it.test/companies",
"screen capture tests/pa11y/company-list.png"
]
},
{
"url" : "https://snipe-it.test/companies/create",
"actions" : [
"navigate to https://snipe-it.test/companies/create",
"screen capture tests/pa11y/company-create.png"
]
},
{
"url" : "https://snipe-it.test/companies/1",
"actions" : [
"navigate to https://snipe-it.test/companies/1",
"screen capture tests/pa11y/company-view.png"
]
},
{
"url" : "https://snipe-it.test/departments",
"actions" : [
"navigate to https://snipe-it.test/departments",
"screen capture tests/pa11y/department-list.png"
]
},
{
"url" : "https://snipe-it.test/departments/create",
"actions" : [
"navigate to https://snipe-it.test/departments/create",
"screen capture tests/pa11y/department-create.png"
]
},
{
"url" : "https://snipe-it.test/departments/1",
"actions" : [
"navigate to https://snipe-it.test/departments/1",
"screen capture tests/pa11y/department-view.png"
]
},
{
"url" : "https://snipe-it.test/invalid-url",
"actions" : [
"navigate to https://snipe-it.test/invalid-url",
"screen capture tests/pa11y/404.png"
]
}
]
}
+4 -4
View File
@@ -3,8 +3,8 @@
"DOC2": "In other words, what you see locally are the requirements for your _current_ install",
"DOC3": "Please don't rely on these versions for planning upgrades unless you've fetched the most recent version",
"DOC4": "You should really just ignore it and run upgrade.php. Really",
"php_min_version": "8.1.0",
"php_max_major_minor": "8.3",
"php_max_wontwork": "8.4.0",
"current_snipeit_version": "7.0"
"php_min_version": "8.2.0",
"php_max_major_minor": "8.4",
"php_max_wontwork": "8.5.0",
"current_snipeit_version": "8.0"
}
+26 -12
View File
@@ -42,18 +42,32 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/1975640?v=4" width="110px;"/><br /><sub>Evan Taylor</sub>](https://github.com/Delta5)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Delta5 "Code") | [<img src="https://avatars.githubusercontent.com/u/8735148?v=4" width="110px;"/><br /><sub>Petri Asikainen</sub>](https://github.com/PetriAsi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PetriAsi "Code") | [<img src="https://avatars.githubusercontent.com/u/11424540?v=4" width="110px;"/><br /><sub>derdeagle</sub>](https://github.com/derdeagle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=derdeagle "Code") | [<img src="https://avatars.githubusercontent.com/u/176950?v=4" width="110px;"/><br /><sub>Mike Frysinger</sub>](https://wh0rd.org/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vapier "Code") | [<img src="https://avatars.githubusercontent.com/u/22044358?v=4" width="110px;"/><br /><sub>ALPHA</sub>](https://github.com/AL4AL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AL4AL "Code") | [<img src="https://avatars.githubusercontent.com/u/1042587?v=4" width="110px;"/><br /><sub>FliegenKLATSCH</sub>](https://www.ifern.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FliegenKLATSCH "Code") | [<img src="https://avatars.githubusercontent.com/u/442138?v=4" width="110px;"/><br /><sub>Jeremy Price</sub>](https://github.com/jerm)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jerm "Code") |
| [<img src="https://avatars.githubusercontent.com/u/84392209?v=4" width="110px;"/><br /><sub>Toreg87</sub>](https://github.com/Toreg87)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Toreg87 "Code") | [<img src="https://avatars.githubusercontent.com/u/67638596?v=4" width="110px;"/><br /><sub>Matthew Nickson</sub>](https://github.com/Computroniks)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Computroniks "Code") | [<img src="https://avatars.githubusercontent.com/u/1646397?v=4" width="110px;"/><br /><sub>Jethro Nederhof</sub>](https://jethron.id.au)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jethron "Code") | [<img src="https://avatars.githubusercontent.com/u/23289826?v=4" width="110px;"/><br /><sub>Oskar Stenberg</sub>](https://github.com/01ste02)<br />[💻](https://github.com/snipe/snipe-it/commits?author=01ste02 "Code") | [<img src="https://avatars.githubusercontent.com/u/82208283?v=4" width="110px;"/><br /><sub>Robert-Azelis</sub>](https://github.com/Robert-Azelis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Robert-Azelis "Code") | [<img src="https://avatars.githubusercontent.com/u/60648387?v=4" width="110px;"/><br /><sub>Alexander William Smith</sub>](https://github.com/alwism)<br />[💻](https://github.com/snipe/snipe-it/commits?author=alwism "Code") | [<img src="https://avatars.githubusercontent.com/u/24418301?v=4" width="110px;"/><br /><sub>LEITWERK AG</sub>](https://www.leitwerk.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leitwerk-ag "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1911435?v=4" width="110px;"/><br /><sub>Adam</sub>](http://www.aboutcher.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adamboutcher "Code") | [<img src="https://avatars.githubusercontent.com/u/16104273?v=4" width="110px;"/><br /><sub>Ian</sub>](https://snksrv.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sneak-it "Code") | [<img src="https://avatars.githubusercontent.com/u/4023909?v=4" width="110px;"/><br /><sub>Shao Yu-Lung (Allen)</sub>](http://blog.bestlong.idv.tw/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bestlong "Code") | [<img src="https://avatars.githubusercontent.com/u/76475453?v=4" width="110px;"/><br /><sub>Haxatron</sub>](https://github.com/Haxatron)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Haxatron "Code") | [<img src="https://avatars.githubusercontent.com/u/88776392?v=4" width="110px;"/><br /><sub>PlaneNuts</sub>](https://github.com/PlaneNuts)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PlaneNuts "Code") | [<img src="https://avatars.githubusercontent.com/u/3842948?v=4" width="110px;"/><br /><sub>Bradley Coudriet</sub>](http://bjcpgd.cias.rit.edu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=exula "Code") | [<img src="https://avatars.githubusercontent.com/u/21966173?v=4" width="110px;"/><br /><sub>Dalton Durst</sub>](https://daltondur.st)<br />[💻](https://github.com/snipe/snipe-it/commits?author=UniversalSuperBox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") |
| [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [<img src="https://avatars.githubusercontent.com/u/7991086?v=4" width="110px;"/><br /><sub>Daniel Reeder</sub>](https://github.com/reederda)<br />[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [<img src="https://avatars.githubusercontent.com/u/109422491?v=4" width="110px;"/><br /><sub>vickyjaura183</sub>](https://github.com/vickyjaura183)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/32363424?v=4" width="110px;"/><br /><sub>Peace</sub>](https://github.com/julian-piehl)<br />[💻](https://github.com/snipe/snipe-it/commits?author=julian-piehl "Code") | [<img src="https://avatars.githubusercontent.com/u/231528?v=4" width="110px;"/><br /><sub>Kyle Gordon</sub>](https://github.com/kylegordon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kylegordon "Code") | [<img src="https://avatars.githubusercontent.com/u/53009155?v=4" width="110px;"/><br /><sub>Katharina Drexel</sub>](http://www.bfh.ch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sunflowerbofh "Code") | [<img src="https://avatars.githubusercontent.com/u/1931963?v=4" width="110px;"/><br /><sub>David Sferruzza</sub>](https://david.sferruzza.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dsferruzza "Code") | [<img src="https://avatars.githubusercontent.com/u/19511639?v=4" width="110px;"/><br /><sub>Rick Nelson</sub>](https://github.com/rnelsonee)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rnelsonee "Code") | [<img src="https://avatars.githubusercontent.com/u/94169344?v=4" width="110px;"/><br /><sub>BasO12</sub>](https://github.com/BasO12)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BasO12 "Code") | [<img src="https://avatars.githubusercontent.com/u/111710123?v=4" width="110px;"/><br /><sub>Vautia</sub>](https://github.com/Vautia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Vautia "Code") |
| [<img src="https://avatars.githubusercontent.com/u/28321?v=4" width="110px;"/><br /><sub>Chris Hartjes</sub>](http://www.littlehart.net/atthekeyboard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chartjes "Code") | [<img src="https://avatars.githubusercontent.com/u/2404584?v=4" width="110px;"/><br /><sub>geo-chen</sub>](https://github.com/geo-chen)<br />[💻](https://github.com/snipe/snipe-it/commits?author=geo-chen "Code") | [<img src="https://avatars.githubusercontent.com/u/6006620?v=4" width="110px;"/><br /><sub>Phan Nguyen</sub>](https://github.com/nh314)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nh314 "Code") | [<img src="https://avatars.githubusercontent.com/u/115993812?v=4" width="110px;"/><br /><sub>Iisakki Jaakkola</sub>](https://github.com/StarlessNights)<br />[💻](https://github.com/snipe/snipe-it/commits?author=StarlessNights "Code") | [<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="110px;"/><br /><sub>Ikko Ashimine</sub>](https://bandism.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=eltociear "Code") | [<img src="https://avatars.githubusercontent.com/u/56871540?v=4" width="110px;"/><br /><sub>Lukas Fehling</sub>](https://github.com/lukasfehling)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukasfehling "Code") | [<img src="https://avatars.githubusercontent.com/u/1975990?v=4" width="110px;"/><br /><sub>Fernando Almeida</sub>](https://github.com/fernando-almeida)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fernando-almeida "Code") |
| [<img src="https://avatars.githubusercontent.com/u/116301219?v=4" width="110px;"/><br /><sub>akemidx</sub>](https://github.com/akemidx)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") | [<img src="https://avatars.githubusercontent.com/u/144778?v=4" width="110px;"/><br /><sub>Oguz Bilgic</sub>](http://oguz.site)<br />[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [<img src="https://avatars.githubusercontent.com/u/9262438?v=4" width="110px;"/><br /><sub>Scooter Crawford</sub>](https://github.com/scoo73r)<br />[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [<img src="https://avatars.githubusercontent.com/u/5957345?v=4" width="110px;"/><br /><sub>subdriven</sub>](https://github.com/subdriven)<br />[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") | [<img src="https://avatars.githubusercontent.com/u/658865?v=4" width="110px;"/><br /><sub>Andrew Savinykh</sub>](https://github.com/AndrewSav)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AndrewSav "Code") | [<img src="https://avatars.githubusercontent.com/u/1155067?v=4" width="110px;"/><br /><sub>Tadayuki Onishi</sub>](https://kenchan0130.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kenchan0130 "Code") | [<img src="https://avatars.githubusercontent.com/u/112496896?v=4" width="110px;"/><br /><sub>Florian</sub>](https://github.com/floschoepfer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=floschoepfer "Code") |
| [<img src="https://avatars.githubusercontent.com/u/7305753?v=4" width="110px;"/><br /><sub>Spencer Long</sub>](http://spencerlong.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") | [<img src="https://avatars.githubusercontent.com/u/1141514?v=4" width="110px;"/><br /><sub>Marcus Moore</sub>](https://github.com/marcusmoore)<br />[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | [<img src="https://avatars.githubusercontent.com/u/570639?v=4" width="110px;"/><br /><sub>Martin Meredith</sub>](https://github.com/Mezzle)<br /> | [<img src="https://avatars.githubusercontent.com/u/5731963?v=4" width="110px;"/><br /><sub>dboth</sub>](http://dboth.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dboth "Code") | [<img src="https://avatars.githubusercontent.com/u/87536651?v=4" width="110px;"/><br /><sub>Zachary Fleck</sub>](https://github.com/zacharyfleck)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zacharyfleck "Code") | [<img src="https://avatars.githubusercontent.com/u/74609912?v=4" width="110px;"/><br /><sub>VIKAAS-A</sub>](https://github.com/vikaas-cyper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vikaas-cyper "Code") | [<img src="https://avatars.githubusercontent.com/u/88882041?v=4" width="110px;"/><br /><sub>Abdul Kareem</sub>](https://github.com/ak-piracha)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ak-piracha "Code") |
| [<img src="https://avatars.githubusercontent.com/u/111287779?v=4" width="110px;"/><br /><sub>NojoudAlshehri</sub>](https://github.com/NojoudAlshehri)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NojoudAlshehri "Code") | [<img src="https://avatars.githubusercontent.com/u/54367449?v=4" width="110px;"/><br /><sub>Stefan Stidl</sub>](https://github.com/stefanstidlffg)<br />[💻](https://github.com/snipe/snipe-it/commits?author=stefanstidlffg "Code") | [<img src="https://avatars.githubusercontent.com/u/87803479?v=4" width="110px;"/><br /><sub>Quentin Aymard</sub>](https://github.com/qay21)<br />[💻](https://github.com/snipe/snipe-it/commits?author=qay21 "Code") | [<img src="https://avatars.githubusercontent.com/u/5396871?v=4" width="110px;"/><br /><sub>Grant Le Roux</sub>](https://github.com/cram42)<br />[💻](https://github.com/snipe/snipe-it/commits?author=cram42 "Code") | [<img src="https://avatars.githubusercontent.com/u/58479551?v=4" width="110px;"/><br /><sub>Bogdan</sub>](http://@singrity)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Singrity "Code") | [<img src="https://avatars.githubusercontent.com/u/3483684?v=4" width="110px;"/><br /><sub>mmanjos</sub>](https://github.com/mmanjos)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mmanjos "Code") | [<img src="https://avatars.githubusercontent.com/u/7429229?v=4" width="110px;"/><br /><sub>Abdelaziz Faki</sub>](https://azooz2014.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Azooz2014 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/47315739?v=4" width="110px;"/><br /><sub>bilias</sub>](https://github.com/bilias)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bilias "Code") | [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") |
| [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") | [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") |
| [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") | [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") |
| [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") | [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") |
| [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") | [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/qveensi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=qveensi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") | [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [<img src="https://avatars.githubusercontent.com/u/7991086?v=4" width="110px;"/><br /><sub>Daniel Reeder</sub>](https://github.com/reederda)<br />[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [<img src="https://avatars.githubusercontent.com/u/109422491?v=4" width="110px;"/><br /><sub>vickyjaura183</sub>](https://github.com/vickyjaura183)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") | [<img src="https://avatars.githubusercontent.com/u/32363424?v=4" width="110px;"/><br /><sub>Peace</sub>](https://github.com/julian-piehl)<br />[💻](https://github.com/snipe/snipe-it/commits?author=julian-piehl "Code") |
| [<img src="https://avatars.githubusercontent.com/u/231528?v=4" width="110px;"/><br /><sub>Kyle Gordon</sub>](https://github.com/kylegordon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kylegordon "Code") | [<img src="https://avatars.githubusercontent.com/u/53009155?v=4" width="110px;"/><br /><sub>Katharina Drexel</sub>](http://www.bfh.ch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sunflowerbofh "Code") | [<img src="https://avatars.githubusercontent.com/u/1931963?v=4" width="110px;"/><br /><sub>David Sferruzza</sub>](https://david.sferruzza.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dsferruzza "Code") | [<img src="https://avatars.githubusercontent.com/u/19511639?v=4" width="110px;"/><br /><sub>Rick Nelson</sub>](https://github.com/rnelsonee)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rnelsonee "Code") | [<img src="https://avatars.githubusercontent.com/u/94169344?v=4" width="110px;"/><br /><sub>BasO12</sub>](https://github.com/BasO12)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BasO12 "Code") | [<img src="https://avatars.githubusercontent.com/u/111710123?v=4" width="110px;"/><br /><sub>Vautia</sub>](https://github.com/Vautia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Vautia "Code") | [<img src="https://avatars.githubusercontent.com/u/28321?v=4" width="110px;"/><br /><sub>Chris Hartjes</sub>](http://www.littlehart.net/atthekeyboard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chartjes "Code") |
| [<img src="https://avatars.githubusercontent.com/u/2404584?v=4" width="110px;"/><br /><sub>geo-chen</sub>](https://github.com/geo-chen)<br />[💻](https://github.com/snipe/snipe-it/commits?author=geo-chen "Code") | [<img src="https://avatars.githubusercontent.com/u/6006620?v=4" width="110px;"/><br /><sub>Phan Nguyen</sub>](https://github.com/nh314)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nh314 "Code") | [<img src="https://avatars.githubusercontent.com/u/115993812?v=4" width="110px;"/><br /><sub>Iisakki Jaakkola</sub>](https://github.com/StarlessNights)<br />[💻](https://github.com/snipe/snipe-it/commits?author=StarlessNights "Code") | [<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="110px;"/><br /><sub>Ikko Ashimine</sub>](https://bandism.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=eltociear "Code") | [<img src="https://avatars.githubusercontent.com/u/56871540?v=4" width="110px;"/><br /><sub>Lukas Fehling</sub>](https://github.com/lukasfehling)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukasfehling "Code") | [<img src="https://avatars.githubusercontent.com/u/1975990?v=4" width="110px;"/><br /><sub>Fernando Almeida</sub>](https://github.com/fernando-almeida)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fernando-almeida "Code") | [<img src="https://avatars.githubusercontent.com/u/116301219?v=4" width="110px;"/><br /><sub>akemidx</sub>](https://github.com/akemidx)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") |
| [<img src="https://avatars.githubusercontent.com/u/144778?v=4" width="110px;"/><br /><sub>Oguz Bilgic</sub>](http://oguz.site)<br />[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [<img src="https://avatars.githubusercontent.com/u/9262438?v=4" width="110px;"/><br /><sub>Scooter Crawford</sub>](https://github.com/scoo73r)<br />[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [<img src="https://avatars.githubusercontent.com/u/5957345?v=4" width="110px;"/><br /><sub>subdriven</sub>](https://github.com/subdriven)<br />[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") | [<img src="https://avatars.githubusercontent.com/u/658865?v=4" width="110px;"/><br /><sub>Andrew Savinykh</sub>](https://github.com/AndrewSav)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AndrewSav "Code") | [<img src="https://avatars.githubusercontent.com/u/1155067?v=4" width="110px;"/><br /><sub>Tadayuki Onishi</sub>](https://kenchan0130.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kenchan0130 "Code") | [<img src="https://avatars.githubusercontent.com/u/112496896?v=4" width="110px;"/><br /><sub>Florian</sub>](https://github.com/floschoepfer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=floschoepfer "Code") | [<img src="https://avatars.githubusercontent.com/u/7305753?v=4" width="110px;"/><br /><sub>Spencer Long</sub>](http://spencerlong.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1141514?v=4" width="110px;"/><br /><sub>Marcus Moore</sub>](https://github.com/marcusmoore)<br />[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | [<img src="https://avatars.githubusercontent.com/u/570639?v=4" width="110px;"/><br /><sub>Martin Meredith</sub>](https://github.com/Mezzle)<br /> | [<img src="https://avatars.githubusercontent.com/u/5731963?v=4" width="110px;"/><br /><sub>dboth</sub>](http://dboth.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dboth "Code") | [<img src="https://avatars.githubusercontent.com/u/87536651?v=4" width="110px;"/><br /><sub>Zachary Fleck</sub>](https://github.com/zacharyfleck)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zacharyfleck "Code") | [<img src="https://avatars.githubusercontent.com/u/74609912?v=4" width="110px;"/><br /><sub>VIKAAS-A</sub>](https://github.com/vikaas-cyper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vikaas-cyper "Code") | [<img src="https://avatars.githubusercontent.com/u/88882041?v=4" width="110px;"/><br /><sub>Abdul Kareem</sub>](https://github.com/ak-piracha)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ak-piracha "Code") | [<img src="https://avatars.githubusercontent.com/u/111287779?v=4" width="110px;"/><br /><sub>NojoudAlshehri</sub>](https://github.com/NojoudAlshehri)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NojoudAlshehri "Code") |
| [<img src="https://avatars.githubusercontent.com/u/54367449?v=4" width="110px;"/><br /><sub>Stefan Stidl</sub>](https://github.com/stefanstidlffg)<br />[💻](https://github.com/snipe/snipe-it/commits?author=stefanstidlffg "Code") | [<img src="https://avatars.githubusercontent.com/u/87803479?v=4" width="110px;"/><br /><sub>Quentin Aymard</sub>](https://github.com/qay21)<br />[💻](https://github.com/snipe/snipe-it/commits?author=qay21 "Code") | [<img src="https://avatars.githubusercontent.com/u/5396871?v=4" width="110px;"/><br /><sub>Grant Le Roux</sub>](https://github.com/cram42)<br />[💻](https://github.com/snipe/snipe-it/commits?author=cram42 "Code") | [<img src="https://avatars.githubusercontent.com/u/58479551?v=4" width="110px;"/><br /><sub>Bogdan</sub>](http://@singrity)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Singrity "Code") | [<img src="https://avatars.githubusercontent.com/u/3483684?v=4" width="110px;"/><br /><sub>mmanjos</sub>](https://github.com/mmanjos)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mmanjos "Code") | [<img src="https://avatars.githubusercontent.com/u/7429229?v=4" width="110px;"/><br /><sub>Abdelaziz Faki</sub>](https://azooz2014.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Azooz2014 "Code") | [<img src="https://avatars.githubusercontent.com/u/47315739?v=4" width="110px;"/><br /><sub>bilias</sub>](https://github.com/bilias)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bilias "Code") |
| [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") | [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") | [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") |
| [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") | [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
| [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") | [<img src="https://avatars.githubusercontent.com/u/28693782?v=4" width="110px;"/><br /><sub>Nathan Taylor</sub>](https://github.com/ntaylor-86)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntaylor-86 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/16699443?v=4" width="110px;"/><br /><sub>fvollmer</sub>](https://github.com/fvollmer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fvollmer "Code") | [<img src="https://avatars.githubusercontent.com/u/109086466?v=4" width="110px;"/><br /><sub>36864</sub>](https://github.com/36864)<br />[💻](https://github.com/snipe/snipe-it/commits?author=36864 "Code") | [<img src="https://avatars.githubusercontent.com/u/365751?v=4" width="110px;"/><br /><sub>Daniel O'Connor</sub>](http://clockwerx.blogspot.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CloCkWeRX "Code") | [<img src="https://avatars.githubusercontent.com/u/102852568?v=4" width="110px;"/><br /><sub>BeatSpark</sub>](https://github.com/BeatSpark)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BeatSpark "Code") | [<img src="https://avatars.githubusercontent.com/u/59203607?v=4" width="110px;"/><br /><sub>mrdahbi</sub>](https://github.com/mrdahbi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mrdahbi "Code") | [<img src="https://avatars.githubusercontent.com/u/6661332?v=4" width="110px;"/><br /><sub>Fabian Schmid</sub>](http://sr.solutions)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chfsx "Code") | [<img src="https://avatars.githubusercontent.com/u/1288116?v=4" width="110px;"/><br /><sub>Chris Olin</sub>](https://www.chrisolin.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=realchrisolin "Code") |
| [<img src="https://avatars.githubusercontent.com/u/3803132?v=4" width="110px;"/><br /><sub>Dan</sub>](https://github.com/mnemonicly)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mnemonicly "Code") | [<img src="https://avatars.githubusercontent.com/u/43917728?v=4" width="110px;"/><br /><sub>Nebel</sub>](https://github.com/NebelKreis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NebelKreis "Code") | [<img src="https://avatars.githubusercontent.com/u/132433803?v=4" width="110px;"/><br /><sub>test1337ahp</sub>](https://github.com/test1337ahp)<br />[💻](https://github.com/snipe/snipe-it/commits?author=test1337ahp "Code") | [<img src="https://avatars.githubusercontent.com/u/1916566?v=4" width="110px;"/><br /><sub>Jonathon Reinhart</sub>](https://github.com/JonathonReinhart)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JonathonReinhart "Code") | [<img src="https://avatars.githubusercontent.com/u/484742?v=4" width="110px;"/><br /><sub>aranar-pro</sub>](https://github.com/aranar-pro)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aranar-pro "Code") | [<img src="https://avatars.githubusercontent.com/u/27019397?v=4" width="110px;"/><br /><sub>Phil</sub>](https://github.com/phil-flip)<br />[💻](https://github.com/snipe/snipe-it/commits?author=phil-flip "Code") | [<img src="https://avatars.githubusercontent.com/u/6473460?v=4" width="110px;"/><br /><sub>Steffy Fort</sub>](https://fe80.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fe80 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/3302372?v=4" width="110px;"/><br /><sub>Jared Busch</sub>](https://github.com/sorvani)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sorvani "Code") | [<img src="https://avatars.githubusercontent.com/u/111956991?v=4" width="110px;"/><br /><sub>seanborg-codethink</sub>](https://github.com/seanborg-codethink)<br />[💻](https://github.com/snipe/snipe-it/commits?author=seanborg-codethink "Code") | [<img src="https://avatars.githubusercontent.com/u/160669961?v=4" width="110px;"/><br /><sub>dkaatz</sub>](https://github.com/dkaatz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dkaatz "Code") | [<img src="https://avatars.githubusercontent.com/u/827205?v=4" width="110px;"/><br /><sub>Daniel Ruf</sub>](https://threema.id/74SF7MW6?text=)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DanielRuf "Code") | [<img src="https://avatars.githubusercontent.com/u/38883201?v=4" width="110px;"/><br /><sub>ahpaleus</sub>](https://github.com/ahpaleus)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ahpaleus "Code") | [<img src="https://avatars.githubusercontent.com/u/22906055?v=4" width="110px;"/><br /><sub>Anh DAO-DUY</sub>](https://github.com/mink-adao-duy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mink-adao-duy "Code") | [<img src="https://avatars.githubusercontent.com/u/4723453?v=4" width="110px;"/><br /><sub>Andres Gutierrez</sub>](https://github.com/Serdnad)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Serdnad "Code") |
| [<img src="https://avatars.githubusercontent.com/u/111083379?v=4" width="110px;"/><br /><sub>Warren White</sub>](https://github.com/wewhite)<br />[💻](https://github.com/snipe/snipe-it/commits?author=wewhite "Code") | [<img src="https://avatars.githubusercontent.com/u/2809241?v=4" width="110px;"/><br /><sub>Robin Temme</sub>](https://robintemme.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=robintemme "Code") | [<img src="https://avatars.githubusercontent.com/u/47008367?v=4" width="110px;"/><br /><sub>herroworrd</sub>](https://github.com/herroworrd)<br />[💻](https://github.com/snipe/snipe-it/commits?author=herroworrd "Code") | [<img src="https://avatars.githubusercontent.com/u/28558609?v=4" width="110px;"/><br /><sub>vicleos</sub>](https://mubiu.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vicleos "Code") | [<img src="https://avatars.githubusercontent.com/u/1016780?v=4" width="110px;"/><br /><sub>Bob Clough</sub>](http://thinkl33t.co.uk/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=thinkl33t "Code") | [<img src="https://avatars.githubusercontent.com/u/10648463?v=4" width="110px;"/><br /><sub>Brandon Daniel Bailey</sub>](https://github.com/brandon-bailey)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brandon-bailey "Code") | [<img src="https://avatars.githubusercontent.com/u/23556080?v=4" width="110px;"/><br /><sub>Marc Bartelt</sub>](https://github.com/marcquark)<br />[💻](https://github.com/snipe/snipe-it/commits?author=marcquark "Code") |
| [<img src="https://avatars.githubusercontent.com/u/18286893?v=4" width="110px;"/><br /><sub>manu-crealytics</sub>](https://github.com/manu-crealytics)<br />[💻](https://github.com/snipe/snipe-it/commits?author=manu-crealytics "Code") | [<img src="https://avatars.githubusercontent.com/u/18245993?v=4" width="110px;"/><br /><sub>Konstantin Köhring</sub>](https://www.galaxy102.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Galaxy102 "Code") | [<img src="https://avatars.githubusercontent.com/u/685167?v=4" width="110px;"/><br /><sub>Deloz</sub>](https://deloz.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=deloz "Code") | [<img src="https://avatars.githubusercontent.com/u/2682426?v=4" width="110px;"/><br /><sub>Martin Berg</sub>](https://github.com/mbrrg)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mbrrg "Code") | [<img src="https://avatars.githubusercontent.com/u/3694534?v=4" width="110px;"/><br /><sub>Richard Schwab</sub>](https://github.com/Nothing4You)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Nothing4You "Code") | [<img src="https://avatars.githubusercontent.com/u/8959676?v=4" width="110px;"/><br /><sub>Rick Heil</sub>](https://rickheil.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rickheil "Code") | [<img src="https://avatars.githubusercontent.com/u/397106?v=4" width="110px;"/><br /><sub>Ross Crawford-d'Heureuse</sub>](https://github.com/rosscdh)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rosscdh "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1621107?v=4" width="110px;"/><br /><sub>Ryan McGuire</sub>](https://github.com/McG800)<br />[💻](https://github.com/snipe/snipe-it/commits?author=McG800 "Code") | [<img src="https://avatars.githubusercontent.com/u/77835667?v=4" width="110px;"/><br /><sub>SBrown2021</sub>](https://github.com/SBrown2021)<br />[💻](https://github.com/snipe/snipe-it/commits?author=SBrown2021 "Code") | [<img src="https://avatars.githubusercontent.com/u/8780913?v=4" width="110px;"/><br /><sub>Serkan</sub>](https://github.com/serkanerip)<br />[💻](https://github.com/snipe/snipe-it/commits?author=serkanerip "Code") | [<img src="https://avatars.githubusercontent.com/u/63188620?v=4" width="110px;"/><br /><sub>Shanks</sub>](https://www.yudelei.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Shankschn "Code") | [<img src="https://avatars.githubusercontent.com/u/198525698?v=4" width="110px;"/><br /><sub>cendai-mis</sub>](https://github.com/cendai-mis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=cendai-mis "Code") | [<img src="https://avatars.githubusercontent.com/u/8724583?v=4" width="110px;"/><br /><sub>Shaun McPeck</sub>](https://smcpeck.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=smcpeck "Code") | [<img src="https://avatars.githubusercontent.com/u/1378836?v=4" width="110px;"/><br /><sub>Stephen</sub>](https://github.com/snazy2000)<br />[💻](https://github.com/snipe/snipe-it/commits?author=snazy2000 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/4462739?v=4" width="110px;"/><br /><sub>Steven</sub>](http://nevets82.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Nevets82 "Code") | [<img src="https://avatars.githubusercontent.com/u/29017267?v=4" width="110px;"/><br /><sub>Mateus Villar</sub>](https://mateusvillar.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Mateus-Romera "Code") | [<img src="https://avatars.githubusercontent.com/u/12749393?v=4" width="110px;"/><br /><sub>Matthew Zackschewski</sub>](https://github.com/mzack5020)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mzack5020 "Code") | [<img src="https://avatars.githubusercontent.com/u/12660103?v=4" width="110px;"/><br /><sub>Matthias Frei</sub>](https://www.frei.media/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=firefrei "Code") | [<img src="https://avatars.githubusercontent.com/u/824840?v=4" width="110px;"/><br /><sub>Nenad Ticaric</sub>](https://github.com/nticaric)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nticaric "Code") | [<img src="https://avatars.githubusercontent.com/u/706439?v=4" width="110px;"/><br /><sub>Nikolay Didenko</sub>](https://github.com/Scorcher)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scorcher "Code") | [<img src="https://avatars.githubusercontent.com/u/5457236?v=4" width="110px;"/><br /><sub>Nuno Maduro</sub>](https://nunomaduro.com/sponsorships)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nunomaduro "Code") |
| [<img src="https://avatars.githubusercontent.com/u/8883074?v=4" width="110px;"/><br /><sub>Oliver Walerys</sub>](https://tektikhq.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=owalerys "Code") | [<img src="https://avatars.githubusercontent.com/u/3102039?v=4" width="110px;"/><br /><sub>R. Christian McDonald</sub>](https://keybase.io/rcmcdonald91)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rcmcdonald91 "Code") | [<img src="https://avatars.githubusercontent.com/u/1525581?v=4" width="110px;"/><br /><sub>nix</sub>](https://nnix.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nixn "Code") | [<img src="https://avatars.githubusercontent.com/u/55462380?v=4" width="110px;"/><br /><sub>octobunny</sub>](https://github.com/octobunny)<br />[💻](https://github.com/snipe/snipe-it/commits?author=octobunny "Code") | [<img src="https://avatars.githubusercontent.com/u/8558670?v=4" width="110px;"/><br /><sub>Ryan</sub>](https://github.com/sreyemnayr)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sreyemnayr "Code") | [<img src="https://avatars.githubusercontent.com/u/1501022?v=4" width="110px;"/><br /><sub>p3nj</sub>](https://benji.ltd/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=p3nj "Code") | [<img src="https://avatars.githubusercontent.com/u/6201617?v=4" width="110px;"/><br /><sub>Tim White</sub>](https://github.com/timwsuqld)<br />[💻](https://github.com/snipe/snipe-it/commits?author=timwsuqld "Code") |
| [<img src="https://avatars.githubusercontent.com/u/22473767?v=4" width="110px;"/><br /><sub>yannikp</sub>](https://github.com/yannikp)<br />[💻](https://github.com/snipe/snipe-it/commits?author=yannikp "Code") | [<img src="https://avatars.githubusercontent.com/u/20525448?v=4" width="110px;"/><br /><sub>victoria</sub>](https://github.com/viclou)<br />[💻](https://github.com/snipe/snipe-it/commits?author=viclou "Code") | [<img src="https://avatars.githubusercontent.com/u/40685314?v=4" width="110px;"/><br /><sub>Valentyn Tulub</sub>](https://github.com/valentyntu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=valentyntu "Code") | [<img src="https://avatars.githubusercontent.com/u/864520?v=4" width="110px;"/><br /><sub>Wouter van Os</sub>](http://wouter0100.nl/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Wouter0100 "Code") | [<img src="https://avatars.githubusercontent.com/u/3946540?v=4" width="110px;"/><br /><sub>Wyatt Teeter</sub>](https://www.linkedin.com/in/wyatt-teeter)<br />[💻](https://github.com/snipe/snipe-it/commits?author=xWyatt "Code") | [<img src="https://avatars.githubusercontent.com/u/1596124?v=4" width="110px;"/><br /><sub>Yorick Terweijden</sub>](https://github.com/terwey)<br />[💻](https://github.com/snipe/snipe-it/commits?author=terwey "Code") | [<img src="https://avatars.githubusercontent.com/u/69298836?v=4" width="110px;"/><br /><sub>bmkalle</sub>](https://github.com/bmkalle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bmkalle "Code") |
| [<img src="https://avatars.githubusercontent.com/u/28403467?v=4" width="110px;"/><br /><sub>bricelabelle</sub>](https://github.com/bricelabelle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bricelabelle "Code") | [<img src="https://avatars.githubusercontent.com/u/97770090?v=4" width="110px;"/><br /><sub>corydlamb</sub>](https://github.com/corydlamb)<br />[💻](https://github.com/snipe/snipe-it/commits?author=corydlamb "Code") | [<img src="https://avatars.githubusercontent.com/u/1154133?v=4" width="110px;"/><br /><sub>Diogenes S. Jesus</sub>](http://twitter.com/splash)<br />[💻](https://github.com/snipe/snipe-it/commits?author=splashx "Code") | [<img src="https://avatars.githubusercontent.com/u/5826629?v=4" width="110px;"/><br /><sub>D M</sub>](https://github.com/dkmansion)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dkmansion "Code") | [<img src="https://avatars.githubusercontent.com/u/14837699?v=4" width="110px;"/><br /><sub>Dustin B</sub>](https://github.com/Jarli01)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Jarli01 "Code") | [<img src="https://avatars.githubusercontent.com/u/348344?v=4" width="110px;"/><br /><sub>Fabian Grutschus</sub>](https://github.com/fabiang)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fabiang "Code") | [<img src="https://avatars.githubusercontent.com/u/1491053?v=4" width="110px;"/><br /><sub>MelonSmasher</sub>](https://github.com/MelonSmasher)<br />[💻](https://github.com/snipe/snipe-it/commits?author=MelonSmasher "Code") |
| [<img src="https://avatars.githubusercontent.com/u/80526133?v=4" width="110px;"/><br /><sub>AlexanderWPapyrus</sub>](https://github.com/AlexanderWPapyrus)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AlexanderWPapyrus "Code") | [<img src="https://avatars.githubusercontent.com/u/306231?v=4" width="110px;"/><br /><sub>Alexandr Hacicheant</sub>](https://github.com/disc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=disc "Code") | [<img src="https://avatars.githubusercontent.com/u/3032891?v=4" width="110px;"/><br /><sub>Hex</sub>](https://hex128.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=hex128 "Code") | [<img src="https://avatars.githubusercontent.com/u/8697942?v=4" width="110px;"/><br /><sub>Arunas Skirius</sub>](https://github.com/arukompas)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arukompas "Code") | [<img src="https://avatars.githubusercontent.com/u/104396?v=4" width="110px;"/><br /><sub>Ben Periton</sub>](https://github.com/benperiton)<br />[💻](https://github.com/snipe/snipe-it/commits?author=benperiton "Code") | [<img src="https://avatars.githubusercontent.com/u/11906832?v=4" width="110px;"/><br /><sub>Byron Wolfman</sub>](https://wolfman.dev/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=byronwolfman "Code") | [<img src="https://avatars.githubusercontent.com/u/56485508?v=4" width="110px;"/><br /><sub>Calvin</sub>](https://github.com/CalvinSchwartz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CalvinSchwartz "Code") |
| [<img src="https://avatars.githubusercontent.com/u/181059?v=4" width="110px;"/><br /><sub>Juan Font</sub>](https://github.com/juanfont)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juanfont "Code") | [<img src="https://avatars.githubusercontent.com/u/13137708?v=4" width="110px;"/><br /><sub>Juho Taipale</sub>](https://github.com/juhotaipale)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juhotaipale "Code") | [<img src="https://avatars.githubusercontent.com/u/1007419?v=4" width="110px;"/><br /><sub>Korvin Szanto</sub>](https://github.com/KorvinSzanto)<br />[💻](https://github.com/snipe/snipe-it/commits?author=KorvinSzanto "Code") | [<img src="https://avatars.githubusercontent.com/u/8513053?v=4" width="110px;"/><br /><sub>Lewis Foster</sub>](https://lewisfoster.foo/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sniff122 "Code") | [<img src="https://avatars.githubusercontent.com/u/33877541?v=4" width="110px;"/><br /><sub>Logan Swartzendruber</sub>](https://github.com/loganswartz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=loganswartz "Code") | [<img src="https://avatars.githubusercontent.com/u/1156208?v=4" width="110px;"/><br /><sub>Lorenzo P.</sub>](https://github.com/lopezio)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lopezio "Code") | [<img src="https://avatars.githubusercontent.com/u/33946590?v=4" width="110px;"/><br /><sub>Lukas Jung</sub>](https://github.com/m4us1ne)<br />[💻](https://github.com/snipe/snipe-it/commits?author=m4us1ne "Code") |
| [<img src="https://avatars.githubusercontent.com/u/10965027?v=4" width="110px;"/><br /><sub>Ellie</sub>](https://leafedfox.xyz/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeafedFox "Code") | [<img src="https://avatars.githubusercontent.com/u/20960555?v=4" width="110px;"/><br /><sub>GA Stamper</sub>](https://github.com/gastamper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gastamper "Code") | [<img src="https://avatars.githubusercontent.com/u/206553556?v=4" width="110px;"/><br /><sub>Guillaume Lefranc</sub>](https://github.com/gl-pup)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gl-pup "Code") | [<img src="https://avatars.githubusercontent.com/u/733892?v=4" width="110px;"/><br /><sub>Hajo Möller</sub>](https://github.com/dasjoe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dasjoe "Code") | [<img src="https://avatars.githubusercontent.com/u/3420063?v=4" width="110px;"/><br /><sub>Istvan Basa</sub>](https://github.com/pottom)<br />[💻](https://github.com/snipe/snipe-it/commits?author=pottom "Code") | [<img src="https://avatars.githubusercontent.com/u/810824?v=4" width="110px;"/><br /><sub>JJ Asghar</sub>](https://jjasghar.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jjasghar "Code") | [<img src="https://avatars.githubusercontent.com/u/40404495?v=4" width="110px;"/><br /><sub>James E. Msenga</sub>](https://github.com/JemCdo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JemCdo "Code") |
| [<img src="https://avatars.githubusercontent.com/u/6865786?v=4" width="110px;"/><br /><sub>Jan Felix Wiebe</sub>](https://github.com/jfwiebe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jfwiebe "Code") | [<img src="https://avatars.githubusercontent.com/u/43412008?v=4" width="110px;"/><br /><sub>Jo Drexl</sub>](https://www.nfon.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=drexljo "Code") | [<img src="https://avatars.githubusercontent.com/u/4807843?v=4" width="110px;"/><br /><sub>Austin Sasko</sub>](https://github.com/austinsasko)<br />[💻](https://github.com/snipe/snipe-it/commits?author=austinsasko "Code") | [<img src="https://avatars.githubusercontent.com/u/4875039?v=4" width="110px;"/><br /><sub>Jasson</sub>](http://jassoncordones.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JassonCordones "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
+17 -23
View File
@@ -1,8 +1,8 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL maintainer="Brady Wetherington <bwetherington@grokability.com>"
# No need to add `apt-get clean` here, reference:
# - https://github.com/snipe/snipe-it/pull/9201
# - https://github.com/grokability/snipe-it/pull/9201
# - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
RUN export DEBIAN_FRONTEND=noninteractive; \
@@ -14,16 +14,16 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-utils \
apache2 \
apache2-bin \
libapache2-mod-php8.1 \
php8.1-curl \
php8.1-ldap \
php8.1-mysql \
php8.1-gd \
php8.1-xml \
php8.1-mbstring \
php8.1-zip \
php8.1-bcmath \
php8.1-redis \
libapache2-mod-php8.3 \
php8.3-curl \
php8.3-ldap \
php8.3-mysql \
php8.3-gd \
php8.3-xml \
php8.3-mbstring \
php8.3-zip \
php8.3-bcmath \
php8.3-redis \
php-memcached \
patch \
curl \
@@ -40,8 +40,7 @@ autoconf \
libc-dev \
libldap-common \
pkg-config \
libmcrypt-dev \
php8.1-dev \
php8.3-dev \
ca-certificates \
unzip \
dnsutils \
@@ -51,18 +50,13 @@ dnsutils \
RUN curl -L -O https://github.com/pear/pearweb_phars/raw/master/go-pear.phar
RUN php go-pear.phar
RUN pecl install mcrypt
RUN bash -c "echo extension=/usr/lib/php/20210902/mcrypt.so > /etc/php/8.1/mods-available/mcrypt.ini"
RUN phpenmod mcrypt
RUN phpenmod gd
RUN phpenmod bcmath
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/cli/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.3/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.3/cli/php.ini
RUN useradd -m --uid 1000 --gid 50 docker
RUN useradd -m --uid 10000 --gid 50 docker
RUN echo export APACHE_RUN_USER=docker >> /etc/apache2/envvars
RUN echo export APACHE_RUN_GROUP=staff >> /etc/apache2/envvars
@@ -116,7 +110,7 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Get dependencies
USER docker
RUN composer install --no-dev --working-dir=/var/www/html
RUN COMPOSER_CACHE_DIR=/dev/null composer install --no-dev --working-dir=/var/www/html && rm -rf /var/www/html/vendor/*/*/.git
USER root
############### APPLICATION INSTALL/INIT #################
+1 -1
View File
@@ -70,7 +70,7 @@ COPY --from=composer /usr/bin/composer /usr/local/bin
ARG COMPOSER_ALLOW_SUPERUSER=1
RUN set -eux; \
# Download and extract snipeit tarball
curl -o snipeit.tar.gz -fL "https://github.com/snipe/snipe-it/archive/v$SNIPEIT_RELEASE.tar.gz"; \
curl -o snipeit.tar.gz -fL "https://github.com/grokability/snipe-it/archive/v$SNIPEIT_RELEASE.tar.gz"; \
tar -xzf snipeit.tar.gz --strip-components=1 -C /var/www/html/; \
rm snipeit.tar.gz; \
# Install composer php dependencies
+30 -11
View File
@@ -1,15 +1,15 @@
![snipe-it-by-grok](https://github.com/snipe/snipe-it/assets/197404/b515673b-c7c8-4d9a-80f5-9fa58829a602)
![snipe-it-by-grok](https://github.com/grokability/snipe-it/assets/197404/b515673b-c7c8-4d9a-80f5-9fa58829a602)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://app.codacy.com/gh/snipe/snipe-it/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Tests](https://github.com/snipe/snipe-it/actions/workflows/tests.yml/badge.svg)](https://github.com/snipe/snipe-it/actions/workflows/tests.yml)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/snipe-it/localized.svg)](https://crowdin.com/project/snipe-it) [![Docker Pulls](https://img.shields.io/docker/pulls/snipe/snipe-it.svg)](https://hub.docker.com/r/snipe/snipe-it/) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/804dd1beb14a41f38810ab77d64fc4fc)](https://app.codacy.com/gh/grokability/snipe-it/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [![Tests](https://github.com/grokability/snipe-it/actions/workflows/tests.yml/badge.svg)](https://github.com/grokability/snipe-it/actions/workflows/tests.yml)
[![All Contributors](https://img.shields.io/badge/all_contributors-331-orange.svg?style=flat-square)](#contributing) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk)
## Snipe-IT - Open Source Asset Management System
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 10](http://laravel.com).
It is built on [Laravel 11](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/).)
Snipe-IT is actively developed and we [release quite frequently](https://github.com/grokability/snipe-it/releases). ([Check out the live demo here](https://snipeitapp.com/demo/).)
> [!TIP]
> __This is web-based software__. This means there is no executable file (aka no .exe files), and it must be run on a web server and accessed through a web browser. It runs on any Mac OSX, any flavor of Linux, as well as Windows, and we have a [Docker image](https://snipe-it.readme.io/docs/docker) available if that's what you're into.
@@ -44,7 +44,7 @@ For help using Snipe-IT, check out the [user's manual](https://snipe-it.readme.i
-----
### Bug Reports & Feature Requests
Feel free to check out the [GitHub Issues for this project](https://github.com/snipe/snipe-it/issues) to open a bug report or see what open issues you can help with. Please search through existing issues (open *and* closed) to see if your question has already been answered before opening a new issue.
Feel free to check out the [GitHub Issues for this project](https://github.com/grokability/snipe-it/issues) to open a bug report or see what open issues you can help with. Please search through existing issues (open *and* closed) to see if your question has already been answered before opening a new issue.
> [!IMPORTANT]
> **PLEASE see the [Getting Help Guidelines](https://snipe-it.readme.io/docs/getting-help) and [Common Issues](https://snipe-it.readme.io/docs/common-issues) before opening a ticket, and be sure to complete all of the questions in the Github Issue template to help us to help you as quickly as possible.**
@@ -76,23 +76,36 @@ Since the release of the JSON REST API, several third-party developers have been
> [!NOTE]
> 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. :)
- [Python Module](https://github.com/jbloomer/SnipeIT-PythonAPI) by [@jbloomer](https://github.com/jbloomer)
#### Libraries & Modules
- [SnipeSharp - .NET module in C#](https://github.com/barrycarey/SnipeSharp) by [@barrycarey](https://github.com/barrycarey)
- [InQRy -unmaintained-](https://github.com/Microsoft/InQRy) by [@Microsoft](https://github.com/Microsoft)
- [SnipeitPS](https://github.com/snazy2000/SnipeitPS) by [@snazy2000](https://github.com/snazy2000) - Powershell API Wrapper for Snipe-it
- [jamf2snipe](https://github.com/grokability/jamf2snipe) - Python script to sync assets between a JAMFPro instance and a Snipe-IT instance
- [jamf-snipe-rename](https://macblog.org/jamf-snipe-rename/) - Python script to rename computers in Jamf from Snipe-IT
- [Marksman](https://github.com/Scope-IT/marksman) - A Windows agent for Snipe-IT
- [Snipe-IT plugin for Jira Service Desk](https://marketplace.atlassian.com/apps/1220964/snipe-it-for-jira)
- [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.
- [MosyleSnipeSync](https://github.com/RodneyLeeBrands/MosyleSnipeSync) by [@Karpadiem](https://github.com/Karpadiem) - Python script to synchronize information between Mosyle and Snipe-IT.
- [WWW::SnipeIT](https://github.com/SEDC/perl-www-snipeit) by [@SEDC](https://github.com/SEDC) - perl module for accessing the API
- [UniFi to Snipe-IT](https://github.com/RodneyLeeBrands/UnifiSnipeSync) by [@karpadiem](https://github.com/karpadiem) - Python script that synchronizes UniFi devices with Snipe-IT.
- [UniFi to Snipe-IT](https://www.edtechirl.com/p/snipe-it-and-azure-asset-management) originally by [@karpadiem](https://github.com/karpadiem) - Python script that synchronizes UniFi devices with Snipe-IT.
- [Kandji2Snipe](https://github.com/grokability/kandji2snipe) by [@briangoldstein](https://github.com/briangoldstein) - Python script that synchronizes Kandji with Snipe-IT.
- [SnipeAgent](https://github.com/ReticentRobot/SnipeAgent) by [@ReticentRobot](https://github.com/ReticentRobot) - Windows agent for Snipe-IT.
- [Gate Pass Generator](https://github.com/cha7uraAE/snipe-it-gate-pass-system) by [@cha7uraAE](https://github.com/cha7uraAE) - A Streamlit application for generating gate passes based on hardware data from a Snipe-IT API.
- [InQRy (archived)](https://github.com/Microsoft/InQRy) by [@Microsoft](https://github.com/Microsoft)
- [Marksman (archived)](https://github.com/Scope-IT/marksman) - A Windows agent for Snipe-IT
- [Python Module (archived)](https://github.com/jbloomer/SnipeIT-PythonAPI) by [@jbloomer](https://github.com/jbloomer)
We also have a handful of [Google Apps scripts](https://github.com/grokability/google-apps-scripts-for-snipe-it) to help with various tasks.
#### Mobile Apps
We're currently working on our own mobile app, but in the meantime, check out these third-party apps that work with Snipe-IT:
- [SnipeMate](https://snipemate.app/) (iOS, Google Play, Huawei AppGallery) by Mars Technology
- [Snipe-Scan](https://apps.apple.com/do/app/snipe-scan/id6744179400?uo=2) (iOS) by Nicolas Maton
- [Snipe-IT Assets Management](https://play.google.com/store/apps/details?id=com.diegogarciadev.assetsmanager.snipeit&hl=en&pli=1) (Google Play) by DiegoGarciaDEV
- [AssetX](https://apps.apple.com/my/app/assetx-for-snipe-it/id6741996196?uo=2) (iOS) for Snipe-IT by Rishi Gupta
-----
@@ -120,9 +133,15 @@ The ERD is available [online here](https://drawsql.app/templates/snipe-it).
Be sure to check out all of the [amazing people](CONTRIBUTORS.md) that have contributed to Snipe-IT over the years!
-----
### Star History
[![Star History Chart](https://api.star-history.com/svg?repos=grokability/snipe-it&type=Date)](https://www.star-history.com/#grokability/snipe-it&Date)
------
### Announcement List
To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.
To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.
We also usually make smaller announcements on our social accounts, our Discord, and our blog, so be sure to subscribe to those if you're looking for more granular announcements.
+1
View File
@@ -11,6 +11,7 @@ make it impossible to backport security fixes on older versions.
| Version | Supported |
|---------| ------------------ |
| 8.x | :white_check_mark: |
| 7.x | :white_check_mark: |
| 6.x | :x: |
| 5.1.x | :x: |
Vendored
+1 -1
View File
@@ -1,7 +1,7 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
SNIPEIT_SH_URL= "https://raw.githubusercontent.com/snipe/snipe-it/master/snipeit.sh"
SNIPEIT_SH_URL= "https://raw.githubusercontent.com/grokability/snipe-it/master/snipeit.sh"
NETWORK_BRIDGE= "en0: Wi-Fi (AirPort)"
Vagrant.configure("2") do |config|
+1 -1
View File
@@ -6,7 +6,7 @@
"it asset"
],
"website": "https://snipeitapp.com/",
"repository": "https://github.com/snipe/snipe-it",
"repository": "https://github.com/grokability/snipe-it",
"logo": "https://pbs.twimg.com/profile_images/976748875733020672/K-HnZCCK_400x400.jpg",
"success_url": "/setup",
"env": {
@@ -0,0 +1,48 @@
<?php
namespace App\Actions\CheckoutRequests;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\Company;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\RequestAssetCancelation;
use Illuminate\Auth\Access\AuthorizationException;
class CancelCheckoutRequestAction
{
public static function run(Asset $asset, User $user)
{
if (!Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException();
}
$asset->cancelRequest();
$asset->decrement('requests_counter', 1);
$data['item'] = $asset;
$data['target'] = $user;
$data['item_quantity'] = 1;
$settings = Setting::getSettings();
$logaction = new Actionlog();
$logaction->item_id = $data['asset_id'] = $asset->id;
$logaction->item_type = $data['item_type'] = Asset::class;
$logaction->created_at = $data['requested_date'] = date('Y-m-d H:i:s');
$logaction->target_id = $data['user_id'] = auth()->id();
$logaction->target_type = User::class;
$logaction->location_id = $user->location_id ?? null;
$logaction->logaction('request canceled');
try {
$settings->notify(new RequestAssetCancelation($data));
} catch (\Exception $e) {
\Log::warning($e);
}
return true;
}
}
@@ -0,0 +1,54 @@
<?php
namespace App\Actions\CheckoutRequests;
use App\Exceptions\AssetNotRequestable;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\Company;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\RequestAssetNotification;
use Illuminate\Auth\Access\AuthorizationException;
use Log;
class CreateCheckoutRequestAction
{
/**
* @throws AssetNotRequestable
* @throws AuthorizationException
*/
public static function run(Asset $asset, User $user): string
{
if (is_null(Asset::RequestableAssets()->find($asset->id))) {
throw new AssetNotRequestable($asset);
}
if (!Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException();
}
$data['item'] = $asset;
$data['target'] = $user;
$data['item_quantity'] = 1;
$settings = Setting::getSettings();
$logaction = new Actionlog();
$logaction->item_id = $data['asset_id'] = $asset->id;
$logaction->item_type = $data['item_type'] = Asset::class;
$logaction->created_at = $data['requested_date'] = date('Y-m-d H:i:s');
$logaction->target_id = $data['user_id'] = auth()->id();
$logaction->target_type = User::class;
$logaction->location_id = $user->location_id ?? null;
$logaction->logaction('requested');
$asset->request();
$asset->increment('requests_counter', 1);
try {
$settings->notify(new RequestAssetNotification($data));
} catch (\Exception $e) {
Log::warning($e);
}
return true;
}
}
+53
View File
@@ -0,0 +1,53 @@
<?php
namespace App\Console\Commands;
use App\Models\Setting;
use Illuminate\Console\Command;
class DisableSAML extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:saml-disable';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This is a rescue command that can be used to turn off SAML settings in the event that you managed to lock yourself out using bad SAML settings.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
if ($this->confirm("\n****************************************************\nThis will disable SAML support. You will not be able \nto login with an account that does not exist \nlocally in the Snipe-IT local database. \n****************************************************\n\nDo you wish to continue? [y|N]")) {
$setting = Setting::getSettings();
$setting->saml_enabled = 0;
if ($setting->save()) {
$this->info('SAML has been set to disabled.');
} else {
$this->info('Unable to disable SAML.');
}
} else {
$this->info('Canceled. No actions taken.');
}
}
}
@@ -0,0 +1,151 @@
<?php
namespace App\Console\Commands;
use App\Models\Accessory;
use App\Models\Actionlog;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
class FixBulkAccessoryCheckinActionLogEntries extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:fix-bulk-accessory-action-log-entries {--dry-run : Run the sync process but don\'t update the database} {--skip-backup : Skip pre-execution backup}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This script attempts to fix timestamps and missing created_by values for bulk checkin entries in the log table';
private bool $dryrun = false;
private bool $skipBackup = false;
/**
* Execute the console command.
*/
public function handle()
{
$this->skipBackup = $this->option('skip-backup');
$this->dryrun = $this->option('dry-run');
if ($this->dryrun) {
$this->info('This is a DRY RUN - no changes will be saved.');
$this->newLine();
}
$logs = Actionlog::query()
// only look for accessory checkin logs
->where('item_type', Accessory::class)
// that were part of a bulk checkin
->where('note', 'Bulk checkin items')
// logs that were improperly timestamped should have created_at in the 1970s
->whereYear('created_at', '1970')
->get();
if ($logs->isEmpty()) {
$this->info('No logs found with incorrect timestamps.');
return 0;
}
$this->info('Found ' . $logs->count() . ' logs with incorrect timestamps:');
$this->table(
['ID', 'Created By', 'Created At', 'Updated At'],
$logs->map(function ($log) {
return [
$log->id,
$log->created_by,
$log->created_at,
$log->updated_at,
];
})
);
if (!$this->dryrun && !$this->confirm('Update these logs?')) {
return 0;
}
if (!$this->dryrun && !$this->skipBackup) {
$this->info('Backing up the database before making changes...');
$this->call('snipeit:backup');
}
if ($this->dryrun) {
$this->newLine();
$this->info('DRY RUN. NOT ACTUALLY UPDATING LOGS.');
}
foreach ($logs as $log) {
$this->newLine();
$this->info('Processing log id:' . $log->id);
// created_by was not being set for accessory bulk checkins
// so let's see if there was another bulk checkin log
// with the same timestamp and a created_by value we can use.
if (is_null($log->created_by)) {
$createdByFromSimilarLog = $this->getCreatedByAttributeFromSimilarLog($log);
if ($createdByFromSimilarLog) {
$this->line(vsprintf('Updating log id:%s created_by to %s', [$log->id, $createdByFromSimilarLog]));
$log->created_by = $createdByFromSimilarLog;
} else {
$this->warn(vsprintf('No created_by found for log id:%s', [$log->id]));
$this->warn('Skipping updating this log since no similar log was found to update created_by from.');
// If we can't find a similar log then let's skip updating it
continue;
}
}
$this->line(vsprintf('Updating log id:%s from %s to %s', [$log->id, $log->created_at, $log->updated_at]));
$log->created_at = $log->updated_at;
if (!$this->dryrun) {
Model::withoutTimestamps(function () use ($log) {
$log->saveQuietly();
});
}
}
$this->newLine();
if ($this->dryrun) {
$this->info('DRY RUN. NO CHANGES WERE ACTUALLY MADE.');
}
return 0;
}
/**
* Hopefully the bulk checkin included other items like assets or licenses
* so we can use one of those logs to get the correct created_by value.
*
* This method attempts to find a bulk check in log that was
* created at the same time as the log passed in.
*/
private function getCreatedByAttributeFromSimilarLog(Actionlog $log): null|int
{
$similarLog = Actionlog::query()
->whereNotNull('created_by')
->where([
'action_type' => 'checkin from',
'note' => 'Bulk checkin items',
'target_id' => $log->target_id,
'target_type' => $log->target_type,
'created_at' => $log->updated_at,
])
->first();
if ($similarLog) {
return $similarLog->created_by;
}
return null;
}
}
@@ -2,11 +2,9 @@
namespace App\Console\Commands;
use App\Helpers\Helper;
use Illuminate\Console\Command;
use App\Models\User;
use Laravel\Passport\TokenRepository;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
use Illuminate\Support\Facades\DB;
class GeneratePersonalAccessToken extends Command
@@ -43,9 +41,8 @@ class GeneratePersonalAccessToken extends Command
*
* @return void
*/
public function __construct(TokenRepository $tokenRepository, ValidationFactory $validation)
public function __construct(TokenRepository $tokenRepository)
{
$this->validation = $validation;
$this->tokenRepository = $tokenRepository;
parent::__construct();
}
@@ -76,7 +73,7 @@ class GeneratePersonalAccessToken extends Command
} else {
$this->warn('Your API Token has been created. Be sure to copy this token now, as it will not be accessible again.');
$this->warn('Your API Token has been created. Be sure to copy this token now, as it WILL NOT be accessible again.');
if ($token = DB::table('oauth_access_tokens')->where('user_id', '=', $user->id)->where('name','=',$accessTokenName)->orderBy('created_at', 'desc')->first()) {
$this->info('API Token ID: '.$token->id);
+17 -3
View File
@@ -125,6 +125,10 @@ class LdapSync extends Command
*/
$attributes = array_values(array_filter($ldap_map));
if (Setting::getSettings()->is_ad === 1 && is_null($ldap_map['active_flag'])) {
$attributes[] = 'useraccountcontrol';
}
$results = Ldap::findLdapUsers($search_base, -1, $filter, $attributes);
} catch (\Exception $e) {
@@ -357,9 +361,15 @@ class LdapSync extends Command
// (Specifically, we don't handle a value of '0.0' correctly)
$raw_value = @$results[$i][$ldap_map["active_flag"]][0];
$filter_var = filter_var($raw_value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$boolean_cast = (bool) $raw_value;
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
if (Setting::getSettings()->ldap_invert_active_flag === 1) {
// Because ldap_active_flag is set, if filter_var is true or boolean_cast is true, then user is suspended
$user->activated = !($filter_var ?? $boolean_cast);
}else{
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
}
} elseif (array_key_exists('useraccountcontrol', $results[$i])) {
// ....otherwise, (ie if no 'active' LDAP flag is defined), IF the UAC setting exists,
@@ -424,8 +434,12 @@ class LdapSync extends Command
$item['note'] = $item['createorupdate'];
$item['status'] = 'success';
if ($item['createorupdate'] === 'created' && $ldap_default_group) {
$user->groups()->attach($ldap_default_group);
// Check if the relationship already exists
if (!$user->groups()->where('group_id', $ldap_default_group)->exists()) {
$user->groups()->attach($ldap_default_group);
}
}
//updates assets location based on user's location
if ($user->wasChanged('location_id')) {
foreach ($user->assets as $asset) {
+3 -3
View File
@@ -51,8 +51,7 @@ class PaveIt extends Command
}
// List all the tables in the database so we don't have to worry about missing some as the app grows
$tables = DB::connection()->getDoctrineSchemaManager()->listTableNames();
$tables = Schema::getTables();
$except_tables = [
'oauth_access_tokens',
'oauth_clients',
@@ -74,7 +73,8 @@ class PaveIt extends Command
}
}
foreach ($tables as $table) {
foreach ($tables as $table_obj) {
$table = $table_obj['name'];
if (in_array($table, $except_tables)) {
$this->info($table. ' is SKIPPED.');
} else {
-157
View File
@@ -1,157 +0,0 @@
<?php
namespace App\Console\Commands;
use App\LegacyEncrypter\McryptEncrypter;
use App\Models\Asset;
use App\Models\CustomField;
use App\Models\Setting;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class RecryptFromMcrypt extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:legacy-recrypt
{--force : Force a re-crypt of encrypted data from MCRYPT.}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This command allows upgrading users to de-encrypt their deprecated mcrypt encrypted fields and re-encrypt them using the current OpenSSL encryption.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
// Check and see if they have a legacy app key listed in their .env
// If not, we can try to use the current APP_KEY if looks like it's old
$legacy_key = env('LEGACY_APP_KEY');
$key_parts = explode(':', $legacy_key);
$legacy_cipher = env('LEGACY_CIPHER', 'rijndael-256');
$errors = [];
if (! $legacy_key) {
$this->error('ERROR: You do not have a LEGACY_APP_KEY set in your .env file. Please locate your old APP_KEY and ADD a line to your .env file like: LEGACY_APP_KEY=YOUR_OLD_APP_KEY');
return false;
}
// Do some basic legacy app key length checks
if (strlen($legacy_key) == 32) {
$legacy_length_check = true;
} elseif (array_key_exists('1', $key_parts) && (strlen($key_parts[1]) == 44)) {
$legacy_key = base64_decode($key_parts[1], true);
$legacy_length_check = true;
} else {
$legacy_length_check = false;
}
// Check that the app key is 32 characters
if ($legacy_length_check === true) {
$this->comment('INFO: Your LEGACY_APP_KEY looks correct. Okay to continue.');
} else {
$this->error('ERROR: Your LEGACY_APP_KEY is not the correct length (32 characters or base64 followed by 44 characters for later versions). Please locate your old APP_KEY and use that as your LEGACY_APP_KEY in your .env file to continue.');
return false;
}
$this->error('================================!!!! WARNING !!!!================================');
$this->error('================================!!!! WARNING !!!!================================');
$this->comment("This tool will attempt to decrypt your old Snipe-IT (mcrypt, now deprecated) encrypted data and re-encrypt it using OpenSSL. \n\nYou should only continue if you have backed up any and all old APP_KEYs and have backed up your data.");
$force = ($this->option('force')) ? true : false;
if ($force || ($this->confirm('Are you SURE you wish to continue?'))) {
$backup_file = 'backups/env-backups/'.'app_key-'.date('Y-m-d-gis');
try {
Storage::disk('local')->put($backup_file, 'APP_KEY: '.config('app.key'));
Storage::disk('local')->append($backup_file, 'LEGACY_APP_KEY: '.$legacy_key);
} catch (\Exception $e) {
$this->info('WARNING: Could not backup app keys');
}
if ($legacy_cipher) {
$mcrypter = new McryptEncrypter($legacy_key, $legacy_cipher);
} else {
$mcrypter = new McryptEncrypter($legacy_key);
}
$settings = Setting::getSettings();
if ($settings->ldap_pword == '') {
$this->comment('INFO: No LDAP password found. Skipping... ');
} else {
$decrypted_ldap_pword = $mcrypter->decrypt($settings->ldap_pword);
$settings->ldap_pword = Crypt::encrypt($decrypted_ldap_pword);
$settings->save();
}
/** @var CustomField[] $custom_fields */
$custom_fields = CustomField::where('field_encrypted', '=', 1)->get();
$this->comment('INFO: Retrieving encrypted custom fields...');
$query = Asset::withTrashed();
foreach ($custom_fields as $custom_field) {
$this->comment('FIELD TO RECRYPT: '.$custom_field->name.' ('.$custom_field->db_column.')');
$query->orWhereNotNull($custom_field->db_column);
}
// Get all assets with a value in any of the fields that were encrypted
/** @var Asset[] $assets */
$assets = $query->get();
$bar = $this->output->createProgressBar(count($assets));
foreach ($assets as $asset) {
foreach ($custom_fields as $encrypted_field) {
$columnName = $encrypted_field->db_column;
// Make sure the value isn't null
if ($asset->{$columnName} != '') {
// Try to decrypt the payload using the legacy app key
try {
$decrypted_field = $mcrypter->decrypt($asset->{$columnName});
$asset->{$columnName} = Crypt::encrypt($decrypted_field);
$this->comment($decrypted_field);
} catch (\Exception $e) {
$errors[] = ' - ERROR: Could not decrypt field ['.$encrypted_field->name.']: '.$e->getMessage();
}
}
}
$asset->save();
$bar->advance();
}
$bar->finish();
if (count($errors) > 0) {
$this->comment("\n\n");
$this->error("The decrypter encountered some errors: \n");
foreach ($errors as $error) {
$this->error($error);
}
}
}
}
}
+13 -2
View File
@@ -249,6 +249,7 @@ class RestoreFromBackup extends Command
'storage/private_uploads/consumables',
'storage/private_uploads/eula-pdfs',
'storage/private_uploads/imports',
'storage/private_uploads/locations',
'storage/private_uploads/licenses',
'storage/private_uploads/signatures',
'storage/private_uploads/users',
@@ -289,6 +290,7 @@ class RestoreFromBackup extends Command
$interesting_files = [];
$boring_files = [];
$unsafe_files = [];
for ($i = 0; $i < $za->numFiles; $i++) {
$stat_results = $za->statIndex($i);
@@ -328,7 +330,8 @@ class RestoreFromBackup extends Command
}
}
$good_extensions = ['png', 'gif', 'jpg', 'svg', 'jpeg', 'doc', 'docx', 'pdf', 'txt',
'zip', 'rar', 'xls', 'xlsx', 'lic', 'xml', 'rtf', 'webp', 'key', 'ico',];
'zip', 'rar', 'xls', 'xlsx', 'lic', 'xml', 'rtf', 'webp', 'key', 'ico', 'avif'
];
foreach (array_merge($private_files, $public_files) as $file) {
$has_wildcard = (strpos($file, '*') !== false);
if ($has_wildcard) {
@@ -338,7 +341,9 @@ class RestoreFromBackup extends Command
if ($last_pos !== false) {
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
if (!in_array($extension, $good_extensions)) {
$this->warn('Potentially unsafe file ' . $raw_path . ' is being skipped');
// gathering potentially unsafe files here to return at exit
$unsafe_files[] = $raw_path;
Log::debug('Potentially unsafe file '.$raw_path.' is being skipped');
$boring_files[] = $raw_path;
continue 2;
}
@@ -372,6 +377,7 @@ class RestoreFromBackup extends Command
if ($this->option('sanitize-guess-prefix')) {
$prefix = SQLStreamer::guess_prefix($sql_contents);
$this->line($prefix);
return $this->info("Re-run this command with '--sanitize-with-prefix=".$prefix."' to see an attempt to sanitize your SQL.");
}
@@ -505,6 +511,11 @@ class RestoreFromBackup extends Command
} else {
$this->info(count($interesting_files).' files were succesfully transferred');
}
if (count($unsafe_files) > 0) {
foreach ($unsafe_files as $unsafe_file) {
$this->warn('Potentially unsafe file '.$unsafe_file.' was skipped');
}
}
foreach ($boring_files as $boring_file) {
$this->warn($boring_file.' was skipped.');
}
@@ -64,28 +64,43 @@ class SendAcceptanceReminder extends Command
->groupBy(function($item) {
return $item['acceptance']->assignedTo ? $item['acceptance']->assignedTo->id : '';
});
$no_email_list= [];
foreach($unacceptedAssetGroups as $unacceptedAssetGroup) {
// The [0] is weird, but it allows for the item_count to work and grabs the appropriate info for each user.
// Collapsing and flattening the collection doesn't work above.
$acceptance = $unacceptedAssetGroup[0]['acceptance'];
$locale = $acceptance->assignedTo?->locale;
$email = $acceptance->assignedTo?->email;
if(!$email){
$this->info($acceptance->assignedTo?->present()->fullName().' has no email address.');
$no_email_list[] = [
'id' => $acceptance->assignedTo?->id,
'name' => $acceptance->assignedTo?->present()->fullName(),
];
} else {
$count++;
}
$item_count = $unacceptedAssetGroup->count();
if ($locale && $email) {
Mail::to($email)->send((new UnacceptedAssetReminderMail($acceptance, $item_count))->locale($locale));
} elseif ($email) {
Mail::to($email)->send((new UnacceptedAssetReminderMail($acceptance, $item_count)));
}
$count++;
}
$this->info($count.' users notified.');
$headers = ['ID', 'Name'];
$rows = [];
foreach ($no_email_list as $user) {
$rows[] = [$user['id'], $user['name']];
}
$this->info("The following users do not have an email address:");
$this->table($headers, $rows);
return 0;
}
@@ -42,27 +42,28 @@ class SendExpirationAlerts extends Command
public function handle()
{
$settings = Setting::getSettings();
$threshold = $settings->alert_interval;
$alert_interval = $settings->alert_interval;
if (($settings->alert_email != '') && ($settings->alerts_enabled == 1)) {
// Send a rollup to the admin, if settings dictate
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item)) // Trim each email
->filter(fn($item) => !empty($item))
->all();
// Expiring Assets
$assets = Asset::getExpiringWarrantee($threshold);
$assets = Asset::getExpiringWarrantee($alert_interval);
if ($assets->count() > 0) {
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $threshold));
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
}
// Expiring licenses
$licenses = License::getExpiringLicenses($threshold);
$licenses = License::getExpiringLicenses($alert_interval);
if ($licenses->count() > 0) {
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $threshold));
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
}
} else {
if ($settings->alert_email == '') {
@@ -2,13 +2,12 @@
namespace App\Console\Commands;
use App\Mail\SendUpcomingAuditMail;
use App\Models\Asset;
use App\Models\Recipients\AlertRecipient;
use App\Models\Setting;
use App\Notifications\SendUpcomingAuditNotification;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Mail;
class SendUpcomingAuditReport extends Command
{
@@ -48,19 +47,20 @@ class SendUpcomingAuditReport extends Command
$today = Carbon::now();
$interval_date = $today->copy()->addDays($interval);
$assets = Asset::whereNull('deleted_at')->DueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'desc')->get();
$this->info($assets->count().' assets must be audited in on or before '.$interval_date.' is deadline');
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'desc')->get();
$this->info($assets->count() . ' assets must be audited in on or before ' . $interval_date . ' is deadline');
if (($assets) && ($assets->count() > 0) && ($settings->alert_email != '')) {
if ((count($assets) !== 0) && ($assets->count() > 0) && ($settings->alert_email != '')) {
// Send a rollup to the admin, if settings dictate
$recipients = collect(explode(',', $settings->alert_email))->map(function ($item) {
return new AlertRecipient($item);
});
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item))
->filter(fn($item) => !empty($item))
->all();
$this->info('Sending Admin SendUpcomingAuditNotification to: '.$settings->alert_email);
\Notification::send($recipients, new SendUpcomingAuditNotification($assets, $settings->audit_warning_days));
$this->info('Sending Admin SendUpcomingAuditNotification to: ' . $settings->alert_email);
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets, $settings->audit_warning_days));
}
}
@@ -0,0 +1,51 @@
<?php
namespace App\Console\Commands;
use App\Helpers\Helper;
use Illuminate\Console\Command;
class TestLocationsFMCS extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:test-locations-fmcs {--location_id=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Test for company ID inconsistencies if FullMultipleCompanySupport with scoped locations will be used.';
/**
* Execute the console command.
*/
public function handle()
{
$this->info('This script checks for company ID inconsistencies if Full Multiple Company Support with scoped locations will be used.');
$this->info('This could take a few moments if have a very large dataset.');
$this->newLine();
// if parameter location_id is set, only test this location
$location_id = null;
if ($this->option('location_id')) {
$location_id = $this->option('location_id');
}
$mismatched = Helper::test_locations_fmcs(true, $location_id);
$this->warn(trans_choice('admin/settings/message.location_scoping.mismatch', count($mismatched)));
$this->newLine();
$this->info('Edit your locations to associate them with the correct company.');
$header = ['Type', 'ID', 'Name', 'Checkout Type', 'Company ID', 'Item Company', 'Item Location', 'Location Company', 'Location Company ID'];
sort($mismatched);
$this->table($header, $mismatched);
}
}
+7 -4
View File
@@ -5,6 +5,7 @@ namespace App\Console;
use App\Console\Commands\ImportLocations;
use App\Console\Commands\ReEncodeCustomFieldNames;
use App\Console\Commands\RestoreDeletedUsers;
use App\Models\Setting;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@@ -18,12 +19,14 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('snipeit:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:expected-checkin')->daily();
if(Setting::getSettings()?->alerts_enabled === 1) {
$schedule->command('snipeit:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:expected-checkin')->daily();
$schedule->command('snipeit:upcoming-audits')->daily();
}
$schedule->command('snipeit:backup')->weekly();
$schedule->command('backup:clean')->daily();
$schedule->command('snipeit:upcoming-audits')->daily();
$schedule->command('auth:clear-resets')->everyFifteenMinutes();
$schedule->command('saml:clear_expired_nonces')->weekly();
}
-28
View File
@@ -1,28 +0,0 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class NoteAdded
{
use Dispatchable, SerializesModels;
public $itemNoteAddedOn;
public $note;
public $noteAddedBy;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($itemNoteAddedOn, User $noteAddedBy, $note)
{
$this->itemNoteAddedOn = $itemNoteAddedOn;
$this->note = $note;
$this->noteAddedBy = $noteAddedBy;
}
}
+9
View File
@@ -0,0 +1,9 @@
<?php
namespace App\Exceptions;
use Exception;
class AssetNotRequestable extends Exception
{
}
+28 -1
View File
@@ -122,6 +122,33 @@ class Handler extends ExceptionHandler
}
// This is traaaaash but it handles models that are not found while using route model binding :(
// The only alternative is to set that at *each* route, which is crazypants
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
// This gets the MVC model name from the exception and formats in a way that's less fugly
$model_name = strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))));
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
// Sigh.
if ($route == 'assets.index') {
$route = 'hardware.index';
} elseif ($route == 'reporttemplates.index') {
$route = 'reports/custom';
} elseif ($route == 'assetmodels.index') {
$route = 'models.index';
} elseif ($route == 'predefinedkits.index') {
$route = 'kits.index';
} elseif ($route == 'assetmaintenances.index') {
$route = 'maintenances.index';
} elseif ($route === 'licenseseats.index') {
$route = 'licenses.index';
}
return redirect()
->route($route)
->withError(trans('general.generic_model_not_found', ['model' => $model_name]));
}
if ($this->isHttpException($e) && (isset($statusCode)) && ($statusCode == '404' )) {
@@ -178,4 +205,4 @@ class Handler extends ExceptionHandler
//
});
}
}
}
@@ -0,0 +1,10 @@
<?php
namespace App\Exceptions;
use Exception;
class UserDoestExistException extends Exception
{
}
+134 -9
View File
@@ -12,6 +12,7 @@ use App\Models\Depreciation;
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\License;
use App\Models\Location;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Contracts\Encryption\DecryptException;
use Carbon\Carbon;
@@ -721,8 +722,8 @@ class Helper
// The check and message that the user is still using the deprecated version
$deprecations = [
'ms_teams_deprecated' => array(
'check' => !Str::contains(Setting::getSettings()->webhook_endpoint, 'workflows'),
'message' => 'The Microsoft Teams webhook URL being used will be deprecated Jan 31st, 2025. <a class="btn btn-primary" href="' . route('settings.slack.index') . '">Change webhook endpoint</a>'),
'check' => !Str::contains(Setting::getSettings()->webhook_endpoint, 'workflows') && (Setting::getSettings()->webhook_selected === 'microsoft'),
'message' => 'The Microsoft Teams webhook URL being used will be deprecated Dec 31st, 2025. <a class="btn btn-primary" href="' . route('settings.slack.index') . '">Change webhook endpoint</a>'),
];
// if item of concern is being used and its being used with the deprecated values return the notification array.
@@ -868,7 +869,7 @@ class Helper
$filetype = @finfo_file($finfo, $file);
finfo_close($finfo);
if (($filetype == 'image/jpeg') || ($filetype == 'image/jpg') || ($filetype == 'image/png') || ($filetype == 'image/bmp') || ($filetype == 'image/gif') || ($filetype == 'image/avif')) {
if (($filetype == 'image/jpeg') || ($filetype == 'image/jpg') || ($filetype == 'image/png') || ($filetype == 'image/bmp') || ($filetype == 'image/gif') || ($filetype == 'image/avif') || ($filetype == 'image/webp')) {
return $filetype;
}
@@ -895,6 +896,12 @@ class Helper
public static function selectedPermissionsArray($permissions, $selected_arr = [])
{
$permissions_arr = [];
if (is_array($permissions)) {
$permissions = json_encode($permissions);
}
// Set default to empty JSON if the value is null
$permissions = json_decode($permissions ?? '{}', JSON_OBJECT_AS_ARRAY);
foreach ($permissions as $permission) {
for ($x = 0; $x < count($permission); $x++) {
@@ -905,13 +912,13 @@ class Helper
if (is_array($selected_arr)) {
if (array_key_exists($permission_name, $selected_arr)) {
$permissions_arr[$permission_name] = $selected_arr[$permission_name];
$permissions_arr[$permission_name] = (int) $selected_arr[$permission_name];
} else {
$permissions_arr[$permission_name] = '0';
$permissions_arr[$permission_name] = 0;
}
} else {
$permissions_arr[$permission_name] = '0';
$permissions_arr[$permission_name] = 0;
}
}
}
@@ -1479,6 +1486,8 @@ class Helper
$redirect_option = Session::get('redirect_option');
$checkout_to_type = Session::get('checkout_to_type');
$checkedInFrom = Session::get('checkedInFrom');
$other_redirect = Session::get('other_redirect');
// return to index
if ($redirect_option == 'index') {
@@ -1520,13 +1529,129 @@ class Helper
if ($redirect_option == 'target') {
switch ($checkout_to_type) {
case 'user':
return route('users.show', ['user' => $request->assigned_user]);
return route('users.show', $request->assigned_user ?? $checkedInFrom);
case 'location':
return route('locations.show', ['location' => $request->assigned_location]);
return route('locations.show', $request->assigned_location ?? $checkedInFrom);
case 'asset':
return route('hardware.show', ['hardware' => $request->assigned_asset]);
return route('hardware.show', $request->assigned_asset ?? $checkedInFrom);
}
}
// return to somewhere else
if ($redirect_option == 'other_redirect') {
switch ($other_redirect) {
case 'audit':
return route('assets.audit.due');
}
}
return redirect()->back()->with('error', trans('admin/hardware/message.checkout.error'));
}
/**
* Check for inconsistencies before activating scoped locations with FullMultipleCompanySupport
* If there are locations with different companies than related objects unforseen problems could arise
*
* @author T. Regnery <tobias.regnery@gmail.com>
* @since 7.0
*
* @param $artisan when false, bail out on first inconsistent entry
* @param $location_id when set, only test this specific location
* @param $new_company_id in case of updating a location, this is the newly requested company_id
* @return string []
*/
static public function test_locations_fmcs($artisan, $location_id = null, $new_company_id = null) {
$mismatched = [];
if ($location_id) {
$location = Location::find($location_id);
if ($location) {
$locations = collect([])->push(Location::find($location_id));
}
} else {
$locations = Location::all();
}
// Bail out early if there are no locations
if ($locations->count() == 0) {
return [];
}
foreach($locations as $location) {
// in case of an update of a single location, use the newly requested company_id
if ($new_company_id) {
$location_company = $new_company_id;
} else {
$location_company = $location->company_id;
}
// Depending on the relationship, we must use different operations to retrieve the objects
$keywords_relation = [
'many' => [
'accessories',
'assets',
'assignedAccessories',
'assignedAssets',
'components',
'consumables',
'rtd_assets',
'users',
],
'one' => [
'manager',
'parent',
]];
// In case of a single location, the children must be checked as well, because we don't walk every location
if ($location_id) {
$keywords_relation['many'][] = 'children';
}
foreach ($keywords_relation as $relation => $keywords) {
foreach($keywords as $keyword) {
if ($relation == 'many') {
$items = $location->{$keyword}->all();
} else {
$items = collect([])->push($location->$keyword);
}
$count = 0;
foreach ($items as $item) {
if ($item && $item->company_id != $location_company) {
$mismatched[] = [
class_basename(get_class($item)),
$item->id,
$item->name ?? $item->asset_tag ?? $item->serial ?? $item->username,
$item->assigned_type ? str_replace('App\\Models\\', '', $item->assigned_type) : null,
$item->company_id ?? null,
$item->company->name ?? null,
// $item->defaultLoc->id ?? null,
// $item->defaultLoc->name ?? null,
// $item->defaultLoc->company->id ?? null,
// $item->defaultLoc->company->name ?? null,
$item->location->name ?? null,
$item->location->company->name ?? null,
$location_company ?? null,
];
$count++;
// Bail early if this is not being run via artisan
if ((!$artisan) && ($count > 0)) {
return $mismatched;
}
}
}
}
}
}
return $mismatched;
}
}
+4
View File
@@ -59,6 +59,8 @@ class IconHelper
return 'fas fa-cog';
case 'angle-left':
return 'fas fa-angle-left';
case 'angle-right':
return 'fas fa-angle-right';
case 'warning':
return 'fas fa-exclamation-triangle';
case 'kits':
@@ -184,6 +186,8 @@ class IconHelper
return 'fa-regular fa-id-card';
case 'department' :
return 'fa-solid fa-building-user';
case 'home' :
return 'fa-solid fa-house';
case 'note':
case 'notes':
return 'fas fa-sticky-note';
@@ -95,16 +95,10 @@ class AccessoriesController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $accessoryId
*/
public function edit($accessoryId = null) : View | RedirectResponse
public function edit(Accessory $accessory) : View | RedirectResponse
{
if ($item = Accessory::find($accessoryId)) {
$this->authorize($item);
return view('accessories.edit', compact('item'))->with('category_type', 'accessory');
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
$this->authorize('update', Accessory::class);
return view('accessories.edit')->with('item', $accessory)->with('category_type', 'accessory');
}
/**
@@ -114,24 +108,17 @@ class AccessoriesController extends Controller
* @param int $accessoryId
* @since [v6.0]
*/
public function getClone($accessoryId = null) : View | RedirectResponse
public function getClone(Accessory $accessory) : View | RedirectResponse
{
$this->authorize('create', Accessory::class);
// Check if the asset exists
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
// Redirect to the asset management page
return redirect()->route('accessories.index')
->with('error', trans('admin/accessories/message.does_not_exist', ['id' => $accessoryId]));
}
$accessory = clone $accessory_to_clone;
$accessory->id = null;
$accessory->location_id = null;
$cloned = clone $accessory;
$cloned->id = null;
$cloned->deleted_at = '';
$cloned->location_id = null;
return view('accessories/edit')
->with('item', $accessory);
->with('item', $cloned);
}
@@ -142,9 +129,9 @@ class AccessoriesController extends Controller
* @param ImageUploadRequest $request
* @param int $accessoryId
*/
public function update(ImageUploadRequest $request, $accessoryId = null) : RedirectResponse
public function update(ImageUploadRequest $request, Accessory $accessory) : RedirectResponse
{
if ($accessory = Accessory::withCount('checkouts as checkouts_count')->find($accessoryId)) {
if ($accessory = Accessory::withCount('checkouts as checkouts_count')->find($accessory->id)) {
$this->authorize($accessory);
@@ -197,15 +184,15 @@ class AccessoriesController extends Controller
*/
public function destroy($accessoryId) : RedirectResponse
{
if (is_null($accessory = Accessory::find($accessoryId))) {
if (is_null($accessory = Accessory::withCount('checkouts as checkouts_count')->find($accessoryId))) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.not_found'));
}
$this->authorize($accessory);
if ($accessory->hasUsers() > 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.assoc_users', ['count'=> $accessory->hasUsers()]));
if ($accessory->checkouts_count > 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/general.delete_disabled'));
}
if ($accessory->image) {
@@ -231,14 +218,13 @@ class AccessoriesController extends Controller
* @see AccessoriesController::getDataView() method that generates the JSON response
* @since [v1.0]
*/
public function show($accessoryID = null) : View | RedirectResponse
public function show(Accessory $accessory) : View | RedirectResponse
{
$accessory = Accessory::withCount('checkouts as checkouts_count')->find($accessoryID);
$this->authorize('view', $accessory);
if (isset($accessory->id)) {
return view('accessories.view', compact('accessory'));
}
$accessory->loadCount('checkouts as checkouts_count');
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist', ['id' => $accessoryID]));
$accessory->load(['adminuser' => fn($query) => $query->withTrashed()]);
$this->authorize('view', $accessory);
return view('accessories.view', compact('accessory'));
}
}
@@ -7,7 +7,6 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use \Illuminate\Contracts\View\View;
@@ -30,9 +29,17 @@ class AccessoryCheckinController extends Controller
}
$accessory = Accessory::find($accessory_user->accessory_id);
//based on what the accessory is checked out to the target redirect option will be displayed accordingly.
$target_option = match ($accessory_user->assigned_type) {
'App\Models\Asset' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.asset')]),
'App\Models\Location' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.location')]),
default => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.user')]),
};
$this->authorize('checkin', $accessory);
return view('accessories/checkin', compact('accessory'))->with('backto', $backto);
return view('accessories/checkin', compact('accessory', 'target_option'))->with('backto', $backto);
}
/**
@@ -51,8 +58,14 @@ class AccessoryCheckinController extends Controller
$accessory = Accessory::find($accessory_checkout->accessory_id);
$this->authorize('checkin', $accessory);
session()->put('checkedInFrom', $accessory_checkout->assigned_to);
session()->put('checkout_to_type', match ($accessory_checkout->assigned_type) {
'App\Models\User' => 'user',
'App\Models\Location' => 'location',
'App\Models\Asset' => 'asset',
});
$this->authorize('checkin', $accessory);
$checkin_hours = date('H:i:s');
$checkin_at = date('Y-m-d H:i:s');
if ($request->filled('checkin_at')) {
@@ -208,9 +208,12 @@ class AcceptanceController extends Controller
*/
$branding_settings = SettingsController::getPDFBranding();
if (is_null($branding_settings->logo)){
$path_logo = "";
} else {
$path_logo = "";
// Check for the PDF logo path and use that, otherwise use the regular logo path
if (!is_null($branding_settings->acceptance_pdf_logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->acceptance_pdf_logo;
} elseif (!is_null($branding_settings->logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
}
@@ -66,7 +66,7 @@ class AccessoriesController extends Controller
}
if ($request->filled('company_id')) {
$accessories->where('company_id', '=', $request->input('company_id'));
$accessories->where('accessories.company_id', '=', $request->input('company_id'));
}
if ($request->filled('category_id')) {
@@ -249,11 +249,11 @@ class AccessoriesController extends Controller
public function destroy($id)
{
$this->authorize('delete', Accessory::class);
$accessory = Accessory::findOrFail($id);
$accessory = Accessory::withCount('checkouts as checkouts_count')->findOrFail($id);
$this->authorize($accessory);
if ($accessory->hasUsers() > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.assoc_users', ['count'=> $accessory->hasUsers()])));
if ($accessory->checkouts_count > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/general.delete_disabled')));
}
$accessory->delete();
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Api;
use App\Helpers\StorageHelper;
use App\Http\Transformers\UploadedFilesTransformer;
use Illuminate\Support\Facades\Storage;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
@@ -13,6 +14,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Illuminate\Http\Request;
/**
@@ -72,33 +74,37 @@ class AssetFilesController extends Controller
* @since [v6.0]
* @author [T. Scarsbrook] [<snipe@scarzybrook.co.uk>]
*/
public function list($assetId = null) : JsonResponse
public function list(Asset $asset, Request $request) : JsonResponse | array
{
// Start by checking if the asset being acted upon exists
if (! $asset = Asset::find($assetId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 404);
}
// the asset is valid
if (isset($asset->id)) {
$this->authorize('view', $asset);
// Check that there are some uploads on this asset that can be listed
if ($asset->uploads->count() > 0) {
$files = array();
foreach ($asset->uploads as $upload) {
array_push($files, $upload);
}
// Give the list of files back to the user
return response()->json(Helper::formatStandardApiResponse('success', $files, trans('admin/hardware/message.upload.success')));
}
$this->authorize('view', $asset);
// There are no files.
return response()->json(Helper::formatStandardApiResponse('success', array(), trans('admin/hardware/message.upload.success')));
$allowed_columns =
[
'id',
'filename',
'eol',
'notes',
'created_at',
'updated_at',
];
$files = Actionlog::select('action_logs.*')->where('action_type', '=', 'uploaded')->where('item_type', '=', Asset::class)->where('item_id', '=', $asset->id);
if ($request->filled('search')) {
$files = $files->TextSearch($request->input('search'));
}
// Send back an error message
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.download.error')), 500);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $files->count()) ? $files->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
$files = $files->orderBy($sort, $order);
$files = $files->skip($offset)->take($limit)->get();
return (new UploadedFilesTransformer())->transformFiles($files, $files->count());
}
/**
@@ -111,12 +117,8 @@ class AssetFilesController extends Controller
* @since [v6.0]
* @author [T. Scarsbrook] [<snipe@scarzybrook.co.uk>]
*/
public function show($assetId = null, $fileId = null) : JsonResponse | StreamedResponse | Storage | StorageHelper | BinaryFileResponse
public function show(Asset $asset, $fileId = null) : JsonResponse | StreamedResponse | Storage | StorageHelper | BinaryFileResponse
{
// Start by checking if the asset being acted upon exists
if (! $asset = Asset::find($assetId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 404);
}
// the asset is valid
if (isset($asset->id)) {
@@ -164,12 +166,8 @@ class AssetFilesController extends Controller
* @since [v6.0]
* @author [T. Scarsbrook] [<snipe@scarzybrook.co.uk>]
*/
public function destroy($assetId = null, $fileId = null) : JsonResponse
public function destroy(Asset $asset, $fileId = null) : JsonResponse
{
// Start by checking if the asset being acted upon exists
if (! $asset = Asset::find($assetId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 404);
}
$rel_path = 'private_uploads/assets';
@@ -179,12 +177,14 @@ class AssetFilesController extends Controller
// Check for the file
$log = Actionlog::find($fileId);
if ($log) {
// Check the file actually exists, and delete it
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
// Delete the record of the file
if ($log) {
// Check the file actually exists, and delete it
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
// Delete the record of the file
$log->delete();
// All deleting done - notify the user of success
@@ -75,6 +75,11 @@ class AssetModelFilesController extends Controller
*/
public function list($assetmodel_id) : JsonResponse | array
{
// Start by checking if the asset being acted upon exists
if (! $assetModel = AssetModel::find($assetmodel_id)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/models/message.does_not_exist')), 404);
}
$assetmodel = AssetModel::with('uploads')->find($assetmodel_id);
$this->authorize('view', $assetmodel);
return (new AssetModelsTransformer)->transformAssetModelFiles($assetmodel, $assetmodel->uploads()->count());
@@ -77,6 +77,18 @@ class AssetModelsController extends Controller
$assetmodels->onlyTrashed();
}
if ($request->filled('name')) {
$assetmodels = $assetmodels->where('models.name', '=', $request->input('name'));
}
if ($request->filled('model_number')) {
$assetmodels = $assetmodels->where('models.model_number', '=', $request->input('model_number'));
}
if ($request->filled('notes')) {
$assetmodels = $assetmodels->where('models.notes', '=', $request->input('notes'));
}
if ($request->filled('category_id')) {
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
}
+122 -58
View File
@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;
use App\View\Label;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
/**
@@ -297,9 +298,15 @@ class AssetsController extends Controller
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
$assets->InModelList([$request->input('model_id')]);
// If model_id is already an array, just use it as-is
if (is_array($request->input('model_id'))) {
$assets->InModelList($request->input('model_id'));
} else {
// Otherwise, turn it into an array
$assets->InModelList([$request->input('model_id')]);
}
}
if ($request->filled('category_id')) {
@@ -435,12 +442,6 @@ class AssetsController extends Controller
}]);
}
/**
* Here we're just determining which Transformer (via $transformer) to use based on the
* variables we set earlier on in this method - we default to AssetsTransformer.
*/
return (new $transformer)->transformAssets($assets, $total, $request);
}
@@ -491,15 +492,32 @@ class AssetsController extends Controller
public function showBySerial(Request $request, $serial): JsonResponse | array
{
$this->authorize('index', Asset::class);
$assets = Asset::where('serial', $serial)->with('assetstatus')->with('assignedTo');
$assets = Asset::where('serial', $serial)->with([
'assetstatus',
'assignedTo',
'company',
'defaultLoc',
'location',
'model.category',
'model.depreciation',
'model.fieldset',
'model.manufacturer',
'supplier',
]);
// Check if they've passed ?deleted=true
if ($request->input('deleted', 'false') == 'true') {
$assets = $assets->withTrashed();
}
if (($assets = $assets->get()) && ($assets->count()) > 0) {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : app('api_offset_value');
$limit = app('api_limit_value');
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
if (($assets) && ($assets->count()) > 0) {
return (new AssetsTransformer)->transformAssets($assets, $total);
}
// If there are 0 results, return the "no such asset" response
@@ -556,7 +574,12 @@ class AssetsController extends Controller
'assets.assigned_to',
'assets.assigned_type',
'assets.status_id',
])->with('model', 'assetstatus', 'assignedTo')->NotArchived();
])->with('model', 'assetstatus', 'assignedTo')
->NotArchived();
if ((Setting::getSettings()->full_multiple_companies_support=='1') && ($request->filled('companyId'))) {
$assets->where('assets.company_id', $request->input('companyId'));
}
if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
$assets = $assets->RTD();
@@ -566,7 +589,6 @@ class AssetsController extends Controller
$assets = $assets->AssignedSearch($request->input('search'));
}
$assets = $assets->paginate(50);
// Loop through and set some custom properties for the transformer to use.
@@ -679,7 +701,9 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.create.success')));
return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.create.success')));
// below is what we want the _eventual_ return to look like - in a more standardized format.
// return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.create.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200);
@@ -1047,7 +1071,7 @@ class AssetsController extends Controller
* @param int $id
* @since [v4.0]
*/
public function audit(Request $request): JsonResponse
public function audit(Request $request, Asset $asset): JsonResponse
{
$this->authorize('audit', Asset::class);
@@ -1055,36 +1079,15 @@ class AssetsController extends Controller
$settings = Setting::getSettings();
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
// No tag passed - return an error
if (!$request->filled('asset_tag')) {
return response()->json(Helper::formatStandardApiResponse('error', [
'asset_tag' => '',
'error' => trans('admin/hardware/message.no_tag'),
], trans('admin/hardware/message.no_tag')), 200);
// Allow the asset tag to be passed in the payload (legacy method)
if ($request->filled('asset_tag')) {
$asset = Asset::where('asset_tag', '=', $request->input('asset_tag'))->first();
}
$asset = Asset::where('asset_tag', '=', $request->input('asset_tag'))->first();
if ($asset) {
/**
* Even though we do a save() further down, we don't want to log this as a "normal" asset update,
* which would trigger the Asset Observer and would log an asset *update* log entry (because the
* de-normed fields like next_audit_date on the asset itself will change on save()) *in addition* to
* the audit log entry we're creating through this controller.
*
* To prevent this double-logging (one for update and one for audit), we skip the observer and bypass
* that de-normed update log entry by using unsetEventDispatcher(), BUT invoking unsetEventDispatcher()
* will bypass normal model-level validation that's usually handled at the observer )
*
* We handle validation on the save() by checking if the asset is valid via the ->isValid() method,
* which manually invokes Watson Validating to make sure the asset's model is valid.
*
* @see \App\Observers\AssetObserver::updating()
*/
$asset->unsetEventDispatcher();
$originalValues = $asset->getRawOriginal();
$asset->next_audit_date = $dt;
if ($request->filled('next_audit_date')) {
@@ -1099,33 +1102,89 @@ class AssetsController extends Controller
$asset->last_audit_date = date('Y-m-d H:i:s');
// Set up the payload for re-display in the API response
$payload = [
'id' => $asset->id,
'asset_tag' => $asset->asset_tag,
'note' => $request->input('note'),
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date),
];
/**
* Update custom fields in the database.
* Validation for these fields is handled through the AssetRequest form request
* $model = AssetModel::find($request->get('model_id'));
*/
if (($asset->model) && ($asset->model->fieldset)) {
$payload['custom_fields'] = [];
foreach ($asset->model->fieldset->fields as $field) {
if (($field->display_audit=='1') && ($request->has($field->db_column))) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
} else {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
$payload['custom_fields'][$field->db_column] = $request->input($field->db_column);
}
}
}
// Invoke the validation to see if the audit will complete successfully
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
// Validate the rest of the data before we turn off the event dispatcher
if ($asset->isInvalid()) {
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()));
}
/**
* Even though we do a save() further down, we don't want to log this as a "normal" asset update,
* which would trigger the Asset Observer and would log an asset *update* log entry (because the
* de-normed fields like next_audit_date on the asset itself will change on save()) *in addition* to
* the audit log entry we're creating through this controller.
*
* To prevent this double-logging (one for update and one for audit), we skip the observer and bypass
* that de-normed update log entry by using unsetEventDispatcher(), BUT invoking unsetEventDispatcher()
* will bypass normal model-level validation that's usually handled at the observer)
*
* We handle validation on the save() by checking if the asset is valid via the ->isValid() method,
* which manually invokes Watson Validating to make sure the asset's model is valid.
*
* @see \App\Observers\AssetObserver::updating()
* @see \App\Models\Asset::save()
*/
$asset->unsetEventDispatcher();
/**
* Invoke Watson Validating to check the asset itself and check to make sure it saved correctly.
* We have to invoke this manually because of the unsetEventDispatcher() above.)
*/
if ($asset->isValid() && $asset->save()) {
$asset->logAudit(request('note'), request('location_id'));
return response()->json(Helper::formatStandardApiResponse('success', [
'asset_tag' => e($asset->asset_tag),
'note' => e($request->input('note')),
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date),
], trans('admin/hardware/message.audit.success')));
$asset->logAudit(request('note'), request('location_id'), null, $originalValues);
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/hardware/message.audit.success')));
}
// Asset failed validation or was not able to be saved
return response()->json(Helper::formatStandardApiResponse('error', [
'asset_tag' => e($asset->asset_tag),
'error' => $asset->getErrors()->first(),
], trans('admin/hardware/message.audit.error', ['error' => $asset->getErrors()->first()])), 200);
}
// No matching asset for the asset tag that was passed.
return response()->json(Helper::formatStandardApiResponse('error', [
'asset_tag' => e($request->input('asset_tag')),
'error' => trans('admin/hardware/message.audit.error'),
], trans('admin/hardware/message.audit.error', ['error' => trans('admin/hardware/message.does_not_exist')])), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
@@ -1230,7 +1289,10 @@ class AssetsController extends Controller
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
$accessory_checkouts = AccessoryCheckout::AssetsAssigned()->with('adminuser')->with('accessories');
$accessory_checkouts = AccessoryCheckout::AssetsAssigned()
->where('assigned_to', $asset->id)
->with('adminuser')
->with('accessories');
$offset = ($request->input('offset') > $accessory_checkouts->count()) ? $accessory_checkouts->count() : app('api_offset_value');
$limit = app('api_limit_value');
@@ -1239,6 +1301,8 @@ class AssetsController extends Controller
$accessory_checkouts = $accessory_checkouts->skip($offset)->take($limit)->get();
return (new AssetsTransformer)->transformCheckedoutAccessories($accessory_checkouts, $total);
}
/**
* Generate asset labels by tag
*
@@ -56,7 +56,7 @@ class CategoriesController extends Controller
'notes',
])
->with('adminuser')
->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count');
->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count', 'models as models_count');
/*
@@ -212,7 +212,7 @@ class CategoriesController extends Controller
public function destroy($id) : JsonResponse
{
$this->authorize('delete', Category::class);
$category = Category::withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count')->findOrFail($id);
$category = Category::withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count', 'models as models_count')->findOrFail($id);
if (! $category->isDeletable()) {
return response()->json(
@@ -0,0 +1,44 @@
<?php
namespace App\Http\Controllers\Api;
use App\Actions\CheckoutRequests\CancelCheckoutRequestAction;
use App\Actions\CheckoutRequests\CreateCheckoutRequestAction;
use App\Exceptions\AssetNotRequestable;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Asset;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\JsonResponse;
use Exception;
class CheckoutRequest extends Controller
{
public function store(Asset $asset): JsonResponse
{
try {
CreateCheckoutRequestAction::run($asset, auth()->user());
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/hardware/message.requests.success')));
} catch (AssetNotRequestable $e) {
return response()->json(Helper::formatStandardApiResponse('error', 'Asset is not requestable'));
} catch (AuthorizationException $e) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.insufficient_permissions')));
} catch (Exception $e) {
report($e);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.something_went_wrong')));
}
}
public function destroy(Asset $asset): JsonResponse
{
try {
CancelCheckoutRequestAction::run($asset, auth()->user());
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/hardware/message.requests.canceled')));
} catch (AuthorizationException $e) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.insufficient_permissions')));
} catch (Exception $e) {
report($e);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.something_went_wrong')));
}
}
}
@@ -48,7 +48,8 @@ class ComponentsController extends Controller
];
$components = Component::select('components.*')
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser', 'manufacturer');
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser', 'manufacturer', 'uncontrainedAssets')
->withSum('uncontrainedAssets', 'components_assets.assigned_qty');
if ($request->filled('search')) {
$components = $components->TextSearch($request->input('search'));
@@ -59,7 +60,7 @@ class ComponentsController extends Controller
}
if ($request->filled('company_id')) {
$components->where('company_id', '=', $request->input('company_id'));
$components->where('components.company_id', '=', $request->input('company_id'));
}
if ($request->filled('category_id')) {
@@ -197,6 +198,11 @@ class ComponentsController extends Controller
$this->authorize('delete', Component::class);
$component = Component::findOrFail($id);
$this->authorize('delete', $component);
if ($component->numCheckedOut() > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.delete.error_qty')));
}
$component->delete();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/components/message.delete.success')));
@@ -40,7 +40,7 @@ class ConsumablesController extends Controller
}
if ($request->filled('company_id')) {
$consumables->where('company_id', '=', $request->input('company_id'));
$consumables->where('consumables.company_id', '=', $request->input('company_id'));
}
if ($request->filled('category_id')) {
@@ -76,7 +76,7 @@ class GroupsController extends Controller
$this->authorize('superadmin');
$group = new Group;
// Get all the available permissions
$permissions = config('permissions');
$permissions = json_encode(config('permissions'));
$groupPermissions = Helper::selectedPermissionsArray($permissions, $permissions);
$group->name = $request->input('name');
+29 -13
View File
@@ -66,25 +66,41 @@ class ImportController extends Controller
if (! ini_get('auto_detect_line_endings')) {
ini_set('auto_detect_line_endings', '1');
}
$file_contents = $file->getContent(); //TODO - this *does* load the whole file in RAM, but we need that to be able to 'iconv' it?
$encoding = $detector->getEncoding($file_contents);
$reader = null;
if (strcasecmp($encoding, 'UTF-8') != 0) {
$transliterated = iconv($encoding, 'UTF-8', $file_contents);
if ($transliterated !== false) {
$tmpname = tempnam(sys_get_temp_dir(), '');
$tmpresults = file_put_contents($tmpname, $transliterated);
if ($tmpresults !== false) {
if (function_exists('iconv')) {
$file_contents = $file->getContent(); //TODO - this *does* load the whole file in RAM, but we need that to be able to 'iconv' it?
$encoding = $detector->getEncoding($file_contents);
\Log::warning("Discovered encoding: $encoding in uploaded CSV");
$reader = null;
if (strcasecmp($encoding, 'UTF-8') != 0) {
$transliterated = false;
try {
$transliterated = iconv(strtoupper($encoding), 'UTF-8', $file_contents);
} catch (\Exception $e) {
$transliterated = false; //blank out the partially-decoded string
return response()->json(
Helper::formatStandardApiResponse(
'error',
null,
trans('admin/hardware/message.import.transliterate_failure', ["encoding" => $encoding])
),
422
);
}
if ($transliterated !== false) {
$tmpname = tempnam(sys_get_temp_dir(), '');
$tmpresults = file_put_contents($tmpname, $transliterated);
$transliterated = null; //save on memory?
$newfile = new UploadedFile($tmpname, $file->getClientOriginalName(), null, null, true); //WARNING: this is enabling 'test mode' - which is gross, but otherwise the file won't be treated as 'uploaded'
if ($newfile->isValid()) {
$file = $newfile;
if ($tmpresults !== false) {
$newfile = new UploadedFile($tmpname, $file->getClientOriginalName(), null, null, true); //WARNING: this is enabling 'test mode' - which is gross, but otherwise the file won't be treated as 'uploaded'
if ($newfile->isValid()) {
$file = $newfile;
}
}
}
}
$file_contents = null; //try to save on memory, I guess?
}
$reader = Reader::createFromFileObject($file->openFile('r')); //file pointer leak?
$file_contents = null; //try to save on memory, I guess?
try {
$import->header_row = $reader->fetchOne(0);
@@ -34,7 +34,7 @@ class LicenseSeatsController extends Controller
if ($request->input('sort') == 'department') {
$seats->OrderDepartments($order);
} else {
$seats->orderBy('id', $order);
$seats->orderBy('updated_at', $order);
}
$total = $seats->count();
@@ -136,13 +136,13 @@ class LicenseSeatsController extends Controller
if ($licenseSeat->save()) {
if ($is_checkin) {
$licenseSeat->logCheckin($target, $request->input('note'));
$licenseSeat->logCheckin($target, $request->input('notes'));
return response()->json(Helper::formatStandardApiResponse('success', $licenseSeat, trans('admin/licenses/message.update.success')));
}
// in this case, relevant fields are touched but it's not a checkin operation. so it must be a checkout operation.
$licenseSeat->logCheckout($request->input('note'), $target);
$licenseSeat->logCheckout($request->input('notes'), $target);
return response()->json(Helper::formatStandardApiResponse('success', $licenseSeat, trans('admin/licenses/message.update.success')));
}
@@ -12,7 +12,9 @@ use App\Http\Transformers\SelectlistTransformer;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\Asset;
use App\Models\Company;
use App\Models\Location;
use App\Models\Setting;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator;
@@ -46,6 +48,7 @@ class LocationsController extends Controller
'id',
'image',
'ldap_ou',
'company_id',
'manager_id',
'name',
'rtd_assets_count',
@@ -74,8 +77,10 @@ class LocationsController extends Controller
'locations.image',
'locations.ldap_ou',
'locations.currency',
'locations.company_id',
'locations.notes',
])
->withCount('assignedAssets as assigned_assets_count')
->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('assignedAccessories as assigned_accessories_count')
@@ -84,6 +89,11 @@ class LocationsController extends Controller
->withCount('children as children_count')
->withCount('users as users_count');
// Only scope locations if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$locations = Company::scopeCompanyables($locations);
}
if ($request->filled('search')) {
$locations = $locations->TextSearch($request->input('search'));
}
@@ -116,6 +126,10 @@ class LocationsController extends Controller
$locations->where('locations.manager_id', '=', $request->input('manager_id'));
}
if ($request->filled('company_id')) {
$locations->where('locations.company_id', '=', $request->input('company_id'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : app('api_offset_value');
$limit = app('api_limit_value');
@@ -132,6 +146,9 @@ class LocationsController extends Controller
case 'manager':
$locations->OrderManager($order);
break;
case 'company':
$locations->OrderCompany($order);
break;
default:
$locations->orderBy($sort, $order);
break;
@@ -159,6 +176,15 @@ class LocationsController extends Controller
$location->fill($request->all());
$location = $request->handleImages($location);
// Only scope location if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$location->company_id = Company::getIdForCurrentUser($request->get('company_id'));
// check if parent is set and has a different company
if ($location->parent_id && Location::find($location->parent_id)->company_id != $location->company_id) {
response()->json(Helper::formatStandardApiResponse('error', null, 'different company than parent'));
}
}
if ($location->save()) {
return response()->json(Helper::formatStandardApiResponse('success', (new LocationsTransformer)->transformLocation($location), trans('admin/locations/message.create.success')));
}
@@ -176,7 +202,7 @@ class LocationsController extends Controller
public function show($id) : JsonResponse | array
{
$this->authorize('view', Location::class);
$location = Location::with('parent', 'manager', 'children')
$location = Location::with('parent', 'manager', 'children', 'company')
->select([
'locations.id',
'locations.name',
@@ -220,6 +246,19 @@ class LocationsController extends Controller
$location->fill($request->all());
$location = $request->handleImages($location);
if ($request->filled('company_id')) {
// Only scope location if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$location->company_id = Company::getIdForCurrentUser($request->get('company_id'));
// check if there are related objects with different company
if (Helper::test_locations_fmcs(false, $id, $location->company_id)) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'error scoped locations'));
}
} else {
$location->company_id = $request->get('company_id');
}
}
if ($location->isValid()) {
$location->save();
@@ -340,6 +379,11 @@ class LocationsController extends Controller
'locations.image',
]);
// Only scope locations if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$locations = Company::scopeCompanyables($locations);
}
$page = 1;
if ($request->filled('page')) {
$page = $request->input('page');
@@ -1,43 +0,0 @@
<?php
namespace App\Http\Controllers\Api;
use App\Events\NoteAdded;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Asset;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class NotesController extends Controller
{
public function store(Request $request)
{
$validated = $request->validate([
'note' => 'required|string|max:500',
'type' => [
'required',
Rule::in(['asset']),
],
]);
// This can be made dynamic by using $request->input('type') to determine which model type to add the note to.
// For now, we are only placing this on Assets
$item = Asset::findOrFail($request->input("id"));
$this->authorize('update', $item);
event(new NoteAdded($item, Auth::user(), $validated['note']));
return response()->json(Helper::formatStandardApiResponse('success'));
}
public function update(Request $request)
{
}
public function destroy(Request $request)
{
}
}
@@ -5,6 +5,8 @@ namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Transformers\ActionlogsTransformer;
use App\Models\Actionlog;
use App\Models\Company;
use App\Models\Setting;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
@@ -18,10 +20,11 @@ class ReportsController extends Controller
*/
public function index(Request $request) : JsonResponse | array
{
$this->authorize('reports.view');
$this->authorize('activity.view');
$actionlogs = Actionlog::with('item', 'user', 'adminuser', 'target', 'location');
if ($request->filled('search')) {
$actionlogs = $actionlogs->TextSearch(e($request->input('search')));
}
@@ -290,10 +290,12 @@ class StatuslabelsController extends Controller
/**
* Returns a boolean response based on whether the status label
* is one that is deployable.
* is one that is deployable or pending.
*
* This is used by the hardware create/edit view to determine whether
* we should provide a dropdown of users for them to check the asset out to.
* we should provide a dropdown of users for them to check the asset out to,
* and whether we show a warning that the asset will be checked in if it's already
* assigned but the status is changed to one that isn't pending or deployable
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v4.0]
@@ -301,7 +303,7 @@ class StatuslabelsController extends Controller
public function checkIfDeployable($id) : string
{
$statuslabel = Statuslabel::findOrFail($id);
if ($statuslabel->getStatuslabelType() == 'deployable') {
if (($statuslabel->getStatuslabelType() == 'pending') || ($statuslabel->getStatuslabelType() == 'deployable')) {
return '1';
}
@@ -339,6 +339,7 @@ class UsersController extends Controller
$users = $users->where(function ($query) use ($request) {
$query->SimpleNameSearch($request->get('search'))
->orWhere('username', 'LIKE', '%'.$request->get('search').'%')
->orWhere('email', 'LIKE', '%'.$request->get('search').'%')
->orWhere('employee_num', 'LIKE', '%'.$request->get('search').'%');
});
}
@@ -117,7 +117,7 @@ class AssetMaintenancesController extends Controller
) {
$startDate = Carbon::parse($assetMaintenance->start_date);
$completionDate = Carbon::parse($assetMaintenance->completion_date);
$assetMaintenance->asset_maintenance_time = $completionDate->diffInDays($startDate);
$assetMaintenance->asset_maintenance_time = (int) $completionDate->diffInDays($startDate, true);
}
// Was the asset maintenance created?
@@ -139,19 +139,12 @@ class AssetMaintenancesController extends Controller
* @version v1.0
* @since [v1.8]
*/
public function edit($assetMaintenanceId = null) : View | RedirectResponse
public function edit(AssetMaintenance $maintenance) : View | RedirectResponse
{
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the asset maintenance management page
return redirect()->route('maintenances.index')->with('error', trans('admin/asset_maintenances/message.not_found'));
} elseif ((!$assetMaintenance->asset) || ($assetMaintenance->asset->deleted_at!='')) {
// Redirect to the asset maintenance management page
if ((!$maintenance->asset) || ($maintenance->asset->deleted_at!='')) {
return redirect()->route('maintenances.index')->with('error', 'asset does not exist');
} elseif (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
} elseif (! Company::isCurrentUserHasAccess($maintenance->asset)) {
return static::getInsufficientPermissionsRedirect();
}
@@ -161,7 +154,7 @@ class AssetMaintenancesController extends Controller
return view('asset_maintenances/edit')
->with('selectedAsset', null)
->with('assetMaintenanceType', $assetMaintenanceType)
->with('item', $assetMaintenance);
->with('item', $maintenance);
}
/**
@@ -174,24 +167,20 @@ class AssetMaintenancesController extends Controller
* @version v1.0
* @since [v1.8]
*/
public function update(Request $request, $assetMaintenanceId = null) : View | RedirectResponse
public function update(Request $request, AssetMaintenance $maintenance) : View | RedirectResponse
{
$this->authorize('update', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the asset maintenance management page
return redirect()->route('maintenances.index')->with('error', trans('admin/asset_maintenances/message.not_found'));
} elseif ((!$assetMaintenance->asset) || ($assetMaintenance->asset->deleted_at!='')) {
// Redirect to the asset maintenance management page
if ((!$maintenance->asset) || ($maintenance->asset->deleted_at!='')) {
return redirect()->route('maintenances.index')->with('error', 'asset does not exist');
} elseif (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
} elseif (! Company::isCurrentUserHasAccess($maintenance->asset)) {
return static::getInsufficientPermissionsRedirect();
}
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = $request->input('notes');
$maintenance->supplier_id = $request->input('supplier_id');
$maintenance->is_warranty = $request->input('is_warranty');
$maintenance->cost = $request->input('cost');
$maintenance->notes = $request->input('notes');
$asset = Asset::find(request('asset_id'));
@@ -200,39 +189,39 @@ class AssetMaintenancesController extends Controller
}
// Save the asset maintenance data
$assetMaintenance->asset_id = $request->input('asset_id');
$assetMaintenance->asset_maintenance_type = $request->input('asset_maintenance_type');
$assetMaintenance->title = $request->input('title');
$assetMaintenance->start_date = $request->input('start_date');
$assetMaintenance->completion_date = $request->input('completion_date');
$maintenance->asset_id = $request->input('asset_id');
$maintenance->asset_maintenance_type = $request->input('asset_maintenance_type');
$maintenance->title = $request->input('title');
$maintenance->start_date = $request->input('start_date');
$maintenance->completion_date = $request->input('completion_date');
if (($assetMaintenance->completion_date == null)
if (($maintenance->completion_date == null)
) {
if (($assetMaintenance->asset_maintenance_time !== 0)
|| (! is_null($assetMaintenance->asset_maintenance_time))
if (($maintenance->asset_maintenance_time !== 0)
|| (! is_null($maintenance->asset_maintenance_time))
) {
$assetMaintenance->asset_maintenance_time = null;
$maintenance->asset_maintenance_time = null;
}
}
if (($assetMaintenance->completion_date !== null)
&& ($assetMaintenance->start_date !== '')
&& ($assetMaintenance->start_date !== '0000-00-00')
if (($maintenance->completion_date !== null)
&& ($maintenance->start_date !== '')
&& ($maintenance->start_date !== '0000-00-00')
) {
$startDate = Carbon::parse($assetMaintenance->start_date);
$completionDate = Carbon::parse($assetMaintenance->completion_date);
$assetMaintenance->asset_maintenance_time = $completionDate->diffInDays($startDate);
$startDate = Carbon::parse($maintenance->start_date);
$completionDate = Carbon::parse($maintenance->completion_date);
$maintenance->asset_maintenance_time = (int) $completionDate->diffInDays($startDate, true);
}
// Was the asset maintenance created?
if ($assetMaintenance->save()) {
if ($maintenance->save()) {
// Redirect to the new asset maintenance page
return redirect()->route('maintenances.index')
->with('success', trans('admin/asset_maintenances/message.edit.success'));
->with('success', trans('admin/asset_maintenances/message.edit.success'));
}
return redirect()->back()->withInput()->withErrors($assetMaintenance->getErrors());
return redirect()->back()->withInput()->withErrors($maintenance->getErrors());
}
/**
@@ -271,19 +260,13 @@ class AssetMaintenancesController extends Controller
* @version v1.0
* @since [v1.8]
*/
public function show($assetMaintenanceId) : View | RedirectResponse
public function show(AssetMaintenance $maintenance) : View | RedirectResponse
{
$this->authorize('view', Asset::class);
// Check if the asset maintenance exists
if (is_null($assetMaintenance = AssetMaintenance::find($assetMaintenanceId))) {
// Redirect to the asset maintenance management page
return redirect()->route('maintenances.index')
->with('error', trans('admin/asset_maintenances/message.not_found'));
} elseif (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
if (! Company::isCurrentUserHasAccess($maintenance->asset)) {
return static::getInsufficientPermissionsRedirect();
}
return view('asset_maintenances/view')->with('assetMaintenance', $assetMaintenance);
return view('asset_maintenances/view')->with('assetMaintenance', $maintenance);
}
}
+14 -45
View File
@@ -109,16 +109,11 @@ class AssetModelsController extends Controller
* @since [v1.0]
* @param int $modelId
*/
public function edit($modelId = null) : View | RedirectResponse
public function edit(AssetModel $model) : View | RedirectResponse
{
$this->authorize('update', AssetModel::class);
if ($item = AssetModel::find($modelId)) {
$category_type = 'asset';
return view('models/edit', compact('item', 'category_type'))->with('depreciation_list', Helper::depreciationList());
}
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
$category_type = 'asset';
return view('models/edit', compact('category_type'))->with('item', $model)->with('depreciation_list', Helper::depreciationList());
}
@@ -133,16 +128,11 @@ class AssetModelsController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update(StoreAssetModelRequest $request, $modelId) : RedirectResponse
public function update(StoreAssetModelRequest $request, AssetModel $model) : RedirectResponse
{
$this->authorize('update', AssetModel::class);
if (is_null($model = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
$model = $request->handleImages($model);
$model->depreciation_id = $request->input('depreciation_id');
$model->eol = $request->input('eol');
$model->name = $request->input('name');
@@ -188,28 +178,16 @@ class AssetModelsController extends Controller
* @since [v1.0]
* @param int $modelId
*/
public function destroy($modelId) : RedirectResponse
public function destroy(AssetModel $model) : RedirectResponse
{
$this->authorize('delete', AssetModel::class);
// Check if the model exists
if (is_null($model = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
if ($model->assets()->count() > 0) {
// Throw an error that this model is associated with assets
return redirect()->route('models.index')->with('error', trans('admin/models/message.assoc_users'));
}
if ($model->image) {
try {
Storage::disk('public')->delete('models/'.$model->image);
$model->update(['image' => null]);
} catch (\Exception $e) {
Log::info($e);
}
}
// Delete the model
$model->delete();
@@ -267,16 +245,10 @@ class AssetModelsController extends Controller
* @since [v1.0]
* @param int $modelId
*/
public function show($modelId = null) : View | RedirectResponse
public function show(AssetModel $model) : View | RedirectResponse
{
$this->authorize('view', AssetModel::class);
$model = AssetModel::withTrashed()->find($modelId);
if (isset($model->id)) {
return view('models/view', compact('model'));
}
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
return view('models/view', compact('model'));
}
/**
@@ -286,23 +258,20 @@ class AssetModelsController extends Controller
* @since [v1.0]
* @param int $modelId
*/
public function getClone($modelId = null) : View | RedirectResponse
public function getClone(AssetModel $model) : View | RedirectResponse
{
$this->authorize('create', AssetModel::class);
// Check if the model exists
if (is_null($model_to_clone = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
$model = clone $model_to_clone;
$cloned_model = clone $model;
$model->id = null;
$model->deleted_at = null;
// Show the page
return view('models/edit')
->with('depreciation_list', Helper::depreciationList())
->with('item', $model)
->with('model_id', $model_to_clone->id)
->with('clone_model', $model_to_clone);
->with('model_id', $model->id)
->with('clone_model', $cloned_model);
}
@@ -321,7 +290,7 @@ class AssetModelsController extends Controller
/**
* Returns a view that allows the user to bulk edit model attrbutes
* Returns a view that allows the user to bulk edit model attributes
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.7]
@@ -58,11 +58,9 @@ class AssetModelsFilesController extends Controller
* @param int $fileId
* @since [v1.0]
*/
public function show($modelId = null, $fileId = null) : StreamedResponse | Response | RedirectResponse | BinaryFileResponse
public function show(AssetModel $model, $fileId = null) : StreamedResponse | Response | RedirectResponse | BinaryFileResponse
{
$model = AssetModel::find($modelId);
// the asset is valid
if (isset($model->id)) {
$this->authorize('view', $model);
if (! $log = Actionlog::find($fileId)) {
@@ -87,12 +85,6 @@ class AssetModelsFilesController extends Controller
}
return StorageHelper::downloader($file);
}
// Prepare the error message
$error = trans('admin/hardware/message.does_not_exist', ['id' => $fileId]);
// Redirect to the hardware management page
return redirect()->route('hardware.index')->with('error', $error);
}
/**
@@ -103,29 +95,21 @@ class AssetModelsFilesController extends Controller
* @param int $fileId
* @since [v1.0]
*/
public function destroy($modelId = null, $fileId = null) : RedirectResponse
public function destroy(AssetModel $model, $fileId = null) : RedirectResponse
{
$model = AssetModel::find($modelId);
$this->authorize('update', $model);
$rel_path = 'private_uploads/assetmodels';
// the asset is valid
if (isset($model->id)) {
$this->authorize('update', $model);
$log = Actionlog::find($fileId);
if ($log) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
$this->authorize('update', $model);
$log = Actionlog::find($fileId);
if ($log) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the hardware management page
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
}
@@ -14,6 +14,7 @@ use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Log;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Validator;
class AssetCheckinController extends Controller
{
@@ -27,18 +28,12 @@ class AssetCheckinController extends Controller
* @param string $backto
* @since [v1.0]
*/
public function create($assetId, $backto = null) : View | RedirectResponse
public function create(Asset $asset, $backto = null) : View | RedirectResponse
{
// Check if the asset exists
if (is_null($asset = Asset::find($assetId))) {
// Redirect to the asset management page with error
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('checkin', $asset);
// This asset is already checked in, redirect
if (is_null($asset->assignedTo)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.checkin.already_checked_in'));
}
@@ -47,7 +42,23 @@ class AssetCheckinController extends Controller
return redirect()->route('hardware.show', $asset->id)->with('error', trans('admin/hardware/general.model_invalid_fix'));
}
return view('hardware/checkin', compact('asset'))->with('statusLabel_list', Helper::statusLabelList())->with('backto', $backto)->with('table_name', 'Assets');
// Invoke the validation to see if the audit will complete successfully
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
if ($asset->isInvalid()) {
return redirect()->route('hardware.edit', $asset)->withErrors($asset->getErrors());
}
$target_option = match ($asset->assigned_type) {
'App\Models\Asset' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.asset_previous')]),
'App\Models\Location' => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.location')]),
default => trans('admin/hardware/form.redirect_to_type', ['type' => trans('general.user')]),
};
return view('hardware/checkin', compact('asset', 'target_option'))
->with('item', $asset)
->with('statusLabel_list', Helper::statusLabelList())
->with('backto', $backto)
->with('table_name', 'Assets');
}
/**
@@ -77,9 +88,12 @@ class AssetCheckinController extends Controller
$this->authorize('checkin', $asset);
if ($asset->assignedType() == Asset::USER) {
$user = $asset->assignedTo;
}
session()->put('checkedInFrom', $asset->assignedTo->id);
session()->put('checkout_to_type', match ($asset->assigned_type) {
'App\Models\User' => 'user',
'App\Models\Location' => 'location',
'App\Models\Asset' => 'asset',
});
$asset->expected_checkin = null;
$asset->last_checkin = now();
@@ -91,6 +105,9 @@ class AssetCheckinController extends Controller
$asset->status_id = e($request->get('status_id'));
}
// Add any custom fields that should be included in the checkout
$asset->customFieldsForCheckinCheckout('display_checkin');
$this->migrateLegacyLocations($asset);
$asset->location_id = $asset->rtd_location_id;
@@ -128,6 +145,9 @@ class AssetCheckinController extends Controller
session()->put('redirect_option', $request->get('redirect_option'));
// Add any custom fields that should be included in the checkout
$asset->customFieldsForCheckinCheckout('display_checkin');
if ($asset->save()) {
event(new CheckoutableCheckedIn($asset, $target, auth()->user(), $request->input('note'), $checkin_at, $originalValues));
@@ -12,6 +12,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\Session;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Validator;
class AssetCheckoutController extends Controller
{
@@ -26,27 +27,33 @@ class AssetCheckoutController extends Controller
* @since [v1.0]
* @return \Illuminate\Contracts\View\View
*/
public function create($assetId) : View | RedirectResponse
public function create(Asset $asset) : View | RedirectResponse
{
// Check if the asset exists
if (is_null($asset = Asset::with('company')->find(e($assetId)))) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('checkout', $asset);
if (!$asset->model) {
return redirect()->route('hardware.show', $asset->id)->with('error', trans('admin/hardware/general.model_invalid_fix'));
return redirect()->route('hardware.show', $asset)
->with('error', trans('admin/hardware/general.model_invalid_fix'));
}
// Invoke the validation to see if the audit will complete successfully
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
if ($asset->isInvalid()) {
return redirect()->route('hardware.edit', $asset)->withErrors($asset->getErrors());
}
if ($asset->availableForCheckout()) {
return view('hardware/checkout', compact('asset'))
->with('statusLabel_list', Helper::deployableStatusLabelList())
->with('table_name', 'Assets');
->with('table_name', 'Assets')
->with('item', $asset);
}
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.checkout.not_available'));
return redirect()->route('hardware.index')
->with('error', trans('admin/hardware/message.checkout.not_available'));
}
/**
@@ -68,7 +75,7 @@ class AssetCheckoutController extends Controller
$this->authorize('checkout', $asset);
if (!$asset->model) {
return redirect()->route('hardware.show', $asset->id)->with('error', trans('admin/hardware/general.model_invalid_fix'));
return redirect()->route('hardware.show', $asset)->with('error', trans('admin/hardware/general.model_invalid_fix'));
}
$admin = auth()->user();
@@ -91,6 +98,7 @@ class AssetCheckoutController extends Controller
$asset->status_id = $request->get('status_id');
}
if(!empty($asset->licenseseats->all())){
if(request('checkout_to_type') == 'user') {
foreach ($asset->licenseseats as $seat){
@@ -100,23 +108,26 @@ class AssetCheckoutController extends Controller
}
}
// Add any custom fields that should be included in the checkout
$asset->customFieldsForCheckinCheckout('display_checkout');
$settings = \App\Models\Setting::getSettings();
// We have to check whether $target->company_id is null here since locations don't have a company yet
if (($settings->full_multiple_companies_support) && ((!is_null($target->company_id)) && (!is_null($asset->company_id)))) {
if ($target->company_id != $asset->company_id){
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('general.error_user_company'));
return redirect()->route('hardware.checkout.create', $asset)->with('error', trans('general.error_user_company'));
}
}
session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]);
session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]);
if ($asset->checkOut($target, $admin, $checkout_at, $expected_checkin, $request->get('note'), $request->get('name'))) {
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success', trans('admin/hardware/message.checkout.success'));
}
// Redirect to the asset management page with error
return redirect()->to("hardware/$assetId/checkout")->with('error', trans('admin/hardware/message.checkout.error').$asset->getErrors());
return redirect()->route("hardware.checkout.create", $asset)->with('error', trans('admin/hardware/message.checkout.error').$asset->getErrors());
} catch (ModelNotFoundException $e) {
return redirect()->back()->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($asset->getErrors());
} catch (CheckoutNotAllowed $e) {
@@ -26,11 +26,8 @@ class AssetFilesController extends Controller
*@since [v1.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(UploadFileRequest $request, $assetId = null) : RedirectResponse
public function store(UploadFileRequest $request, Asset $asset) : RedirectResponse
{
if (! $asset = Asset::find($assetId)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('update', $asset);
@@ -59,31 +56,28 @@ class AssetFilesController extends Controller
* @param int $fileId
* @since [v1.0]
*/
public function show($assetId = null, $fileId = null) : View | RedirectResponse | Response | StreamedResponse | BinaryFileResponse
public function show(Asset $asset, $fileId = null) : View | RedirectResponse | Response | StreamedResponse | BinaryFileResponse
{
if ($asset = Asset::find($assetId)) {
$this->authorize('view', $asset);
$this->authorize('view', $asset);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $asset->id)->find($fileId)) {
$file = 'private_uploads/assets/'.$log->filename;
if ($log->action_type == 'audit') {
$file = 'private_uploads/audits/'.$log->filename;
}
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.file_not_found'));
}
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $asset->id)->find($fileId)) {
$file = 'private_uploads/assets/'.$log->filename;
if ($log->action_type == 'audit') {
$file = 'private_uploads/audits/'.$log->filename;
}
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('hardware.show', $asset)->with('error', trans('general.file_not_found'));
}
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
return redirect()->route('hardware.show', $asset)->with('error', trans('general.log_record_not_found'));
}
@@ -95,23 +89,20 @@ class AssetFilesController extends Controller
* @param int $fileId
* @since [v1.0]
*/
public function destroy($assetId = null, $fileId = null) : RedirectResponse
public function destroy(Asset $asset, $fileId = null) : RedirectResponse
{
if ($asset = Asset::find($assetId)) {
$this->authorize('update', $asset);
$rel_path = 'private_uploads/assets';
$this->authorize('update', $asset);
$rel_path = 'private_uploads/assets';
if ($log = Actionlog::find($fileId)) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
if ($log = Actionlog::find($fileId)) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
return redirect()->route('hardware.show', $asset)->with('error', trans('general.log_record_not_found'));
}
}
@@ -6,6 +6,7 @@ use App\Events\CheckoutableCheckedIn;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Models\Actionlog;
use App\Http\Requests\UploadFileRequest;
use Illuminate\Support\Facades\Log;
@@ -30,6 +31,7 @@ use Illuminate\Http\Response;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use TypeError;
/**
* This class controls all actions related to assets for
@@ -201,7 +203,7 @@ class AssetsController extends Controller
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), $request->input('expected_checkin', null), 'Checked out on asset creation', $request->get('name'), $location);
}
$successes[] = "<a href='" . route('hardware.show', ['hardware' => $asset->id]) . "' style='color: white;'>" . e($asset->asset_tag) . "</a>";
$successes[] = "<a href='" . route('hardware.show', $asset) . "' style='color: white;'>" . e($asset->asset_tag) . "</a>";
} else {
$failures[] = join(",", $asset->getErrors()->all());
@@ -222,7 +224,7 @@ class AssetsController extends Controller
//the most common case, keeping it so we don't have to make every use of that translation string be trans_choice'ed
//and re-translated
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', ['hardware' => $asset->id]), 'id', 'tag' => e($asset->asset_tag)]));
->with('success-unescaped', trans('admin/hardware/message.create.success_linked', ['link' => route('hardware.show', $asset), 'id', 'tag' => e($asset->asset_tag)]));
} else {
//multi-success
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
@@ -240,20 +242,14 @@ class AssetsController extends Controller
* Returns a view that presents a form to edit an existing asset.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
* @since [v1.0]
* @return \Illuminate\Contracts\View\View
*/
public function edit($assetId = null) : View | RedirectResponse
public function edit(Asset $asset) : View | RedirectResponse
{
if (! $item = Asset::find($assetId)) {
// Redirect to the asset management page with error
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
//Handles company checks and permissions.
$this->authorize($item);
return view('hardware/edit', compact('item'))
$this->authorize($asset);
return view('hardware/edit')
->with('item', $asset)
->with('statuslabel_list', Helper::statusLabelList())
->with('statuslabel_types', Helper::statusTypeList());
}
@@ -267,15 +263,14 @@ class AssetsController extends Controller
* @since [v1.0]
* @return \Illuminate\Contracts\View\View
*/
public function show($assetId = null) : View | RedirectResponse
public function show(Asset $asset) : View | RedirectResponse
{
$asset = Asset::withTrashed()->find($assetId);
$this->authorize('view', $asset);
$settings = Setting::getSettings();
if (isset($asset)) {
$audit_log = Actionlog::where('action_type', '=', 'audit')
->where('item_id', '=', $assetId)
->where('item_id', '=', $asset->id)
->where('item_type', '=', Asset::class)
->orderBy('created_at', 'DESC')->first();
@@ -291,7 +286,7 @@ class AssetsController extends Controller
$qr_code = (object) [
'display' => $settings->qr_code == '1',
'url' => route('qr_code/hardware', $asset->id),
'url' => route('qr_code/hardware', $asset),
];
return view('hardware/view', compact('asset', 'qr_code', 'settings'))
@@ -308,14 +303,9 @@ class AssetsController extends Controller
* @since [v1.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function update(ImageUploadRequest $request, $assetId = null) : RedirectResponse
public function update(ImageUploadRequest $request, Asset $asset) : RedirectResponse
{
// Check if the asset exists
if (! $asset = Asset::find($assetId)) {
// Redirect to the asset management page with error
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize($asset);
$asset->status_id = $request->input('status_id', null);
@@ -329,7 +319,7 @@ class AssetsController extends Controller
$asset->eol_explicit = false;
} elseif ($request->filled('asset_eol_date')) {
$asset->asset_eol_date = $request->input('asset_eol_date', null);
$months = Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date);
$months = (int) Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date, true);
if($asset->model->eol) {
if($months != $asset->model->eol > 0) {
$asset->eol_explicit = true;
@@ -351,22 +341,16 @@ class AssetsController extends Controller
$status = Statuslabel::find($request->input('status_id'));
// This is a non-deployable status label - we should check the asset back in.
if (($status && $status->getStatuslabelType() != 'deployable') && ($target = $asset->assignedTo)) {
// This is an archived or undeployable - we should check the asset back in.
// Pending is allowed here
if (($status) && (($status->getStatuslabelType() != 'pending') && ($status->getStatuslabelType() != 'deployable')) && ($target = $asset->assignedTo)) {
$originalValues = $asset->getRawOriginal();
$asset->assigned_to = null;
$asset->assigned_type = null;
$asset->accepted = null;
event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update', date('Y-m-d H:i:s'), $originalValues));
event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update with '.$status->getStatuslabelType().' status', date('Y-m-d H:i:s'), $originalValues));
}
if ($asset->assigned_to == '') {
$asset->location_id = $request->input('rtd_location_id', null);
}
if ($request->filled('image_delete')) {
try {
unlink(public_path().'/uploads/assets/'.$asset->image);
@@ -402,26 +386,26 @@ class AssetsController extends Controller
$asset = $request->handleImages($asset);
// Update custom fields in the database.
// Validation for these fields is handlded through the AssetRequest form request
// FIXME: No idea why this is returning a Builder error on db_column_name.
// Need to investigate and fix. Using static method for now.
$model = AssetModel::find($request->get('model_id'));
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
if ($request->has($field->db_column)) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
}
} else {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->db_column} = $request->input($field->db_column);
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
}
@@ -430,7 +414,7 @@ class AssetsController extends Controller
session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]);
if ($asset->save()) {
return redirect()->to(Helper::getRedirectOption($request, $assetId, 'Assets'))
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))
->with('success', trans('admin/hardware/message.update.success'));
}
@@ -531,12 +515,12 @@ class AssetsController extends Controller
* @param int $assetId
* @since [v1.0]
*/
public function getQrCode($assetId = null) : Response | BinaryFileResponse | string | bool
public function getQrCode(Asset $asset) : Response | BinaryFileResponse | string | bool
{
$settings = Setting::getSettings();
if (($settings->qr_code == '1') && ($settings->label2_2d_type !== 'none')) {
$asset = Asset::withTrashed()->find($assetId);
if ($settings->label2_2d_type !== 'none') {
if ($asset) {
$size = Helper::barcodeDimensions($settings->label2_2d_type);
$qr_file = public_path().'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png';
@@ -590,7 +574,7 @@ class AssetsController extends Controller
file_put_contents($barcode_file, $barcode_obj->getPngData());
return response($barcode_obj->getPngData())->header('Content-type', 'image/png');
} catch (\Exception $e) {
} catch (\Exception|TypeError $e) {
Log::debug('The barcode format is invalid.');
return response(file_get_contents(public_path('uploads/barcodes/invalid_barcode.gif')))->header('Content-type', 'image/gif');
@@ -877,14 +861,6 @@ class AssetsController extends Controller
return view('hardware/quickscan-checkin')->with('statusLabel_list', Helper::statusLabelList());
}
public function audit($id)
{
$settings = Setting::getSettings();
$this->authorize('audit', Asset::class);
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
$asset = Asset::findOrFail($id);
return view('hardware/audit')->with('asset', $asset)->with('next_audit_date', $dt)->with('locations_list');
}
public function dueForAudit()
{
@@ -901,22 +877,73 @@ class AssetsController extends Controller
}
public function auditStore(UploadFileRequest $request, $id)
public function audit(Asset $asset): View | RedirectResponse
{
$this->authorize('audit', Asset::class);
$settings = Setting::getSettings();
$rules = [
'location_id' => 'exists:locations,id|nullable|numeric',
'next_audit_date' => 'date|nullable',
];
$validator = Validator::make($request->all(), $rules);
// Invoke the validation to see if the audit will complete successfully
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
if ($validator->fails()) {
return response()->json(Helper::formatStandardApiResponse('error', null, $validator->errors()->all()));
if ($asset->isInvalid()) {
return redirect()->route('hardware.edit', $asset)->withErrors($asset->getErrors());
}
$asset = Asset::findOrFail($id);
$dt = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
return view('hardware/audit')->with('asset', $asset)->with('item', $asset)->with('next_audit_date', $dt)->with('locations_list');
}
public function auditStore(UploadFileRequest $request, Asset $asset)
{
$this->authorize('audit', Asset::class);
session()->put('redirect_option', $request->get('redirect_option'));
session()->put('other_redirect', 'audit');
$originalValues = $asset->getRawOriginal();
$asset->next_audit_date = $request->input('next_audit_date');
$asset->last_audit_date = date('Y-m-d H:i:s');
// Check to see if they checked the box to update the physical location,
// not just note it in the audit notes
if ($request->input('update_location') == '1') {
$asset->location_id = $request->input('location_id');
}
// Update custom fields in the database
if (($asset->model) && ($asset->model->fieldset)) {
foreach ($asset->model->fieldset->fields as $field) {
if (($field->display_audit=='1') && ($request->has($field->db_column))) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
}
}
} else {
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
}
}
// Invoke the validation to see if the audit will complete successfully
$asset->setRules($asset->getRules() + $asset->customFieldValidationRules());
// Validate the rest of the data before we turn off the event dispatcher
if ($asset->isInvalid()) {
return redirect()->back()->withInput()->withErrors($asset->getErrors());
}
/**
* Even though we do a save() further down, we don't want to log this as a "normal" asset update,
@@ -932,18 +959,11 @@ class AssetsController extends Controller
* which manually invokes Watson Validating to make sure the asset's model is valid.
*
* @see \App\Observers\AssetObserver::updating()
* @see \App\Models\Asset::save()
*/
$asset->unsetEventDispatcher();
$asset->next_audit_date = $request->input('next_audit_date');
$asset->last_audit_date = date('Y-m-d H:i:s');
// Check to see if they checked the box to update the physical location,
// not just note it in the audit notes
if ($request->input('update_location') == '1') {
$asset->location_id = $request->input('location_id');
}
/**
* Invoke Watson Validating to check the asset itself and check to make sure it saved correctly.
@@ -957,8 +977,8 @@ class AssetsController extends Controller
$file_name = $request->handleFile('private_uploads/audits/', 'audit-'.$asset->id, $request->file('image'));
}
$asset->logAudit($request->input('note'), $request->input('location_id'), $file_name);
return redirect()->route('assets.audit.due')->with('success', trans('admin/hardware/message.audit.success'));
$asset->logAudit($request->input('note'), $request->input('location_id'), $file_name, $originalValues);
return redirect()->to(Helper::getRedirectOption($request, $asset->id, 'Assets'))->with('success', trans('admin/hardware/message.audit.success'));
}
return redirect()->back()->withInput()->withErrors($asset->getErrors());
@@ -358,7 +358,11 @@ class BulkAssetsController extends Controller
* to someone/something.
*/
if ($request->filled('status_id')) {
$updated_status = Statuslabel::find($request->input('status_id'));
try {
$updated_status = Statuslabel::findOrFail($request->input('status_id'));
} catch (ModelNotFoundException $e) {
return redirect($bulk_back_url)->with('error', trans('admin/statuslabels/message.does_not_exist'));
}
// We cannot assign a non-deployable status type if the asset is already assigned.
// This could probably be added to a form request.
@@ -366,7 +370,7 @@ class BulkAssetsController extends Controller
// Otherwise we need to make sure the status type is still a deployable one.
if (
($asset->assigned_to == '')
|| ($updated_status->deployable == '1') && ($asset->assetstatus->deployable == '1')
|| ($updated_status->deployable == '1') && ($asset->assetstatus?->deployable == '1')
) {
$this->update_array['status_id'] = $updated_status->id;
}
@@ -525,21 +529,31 @@ class BulkAssetsController extends Controller
$this->authorize('delete', Asset::class);
$bulk_back_url = route('hardware.index');
if ($request->session()->has('bulk_back_url')) {
$bulk_back_url = $request->session()->pull('bulk_back_url');
}
$assetIds = $request->get('ids');
if ($request->filled('ids')) {
$assets = Asset::find($request->get('ids'));
foreach ($assets as $asset) {
$asset->delete();
} // endforeach
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.delete.success'));
// no values given, nothing to update
if(empty($assetIds)) {
return redirect($bulk_back_url)->with('error', trans('admin/hardware/message.delete.nothing_updated'));
}
return redirect($bulk_back_url)->with('error', trans('admin/hardware/message.delete.nothing_updated'));
$assignedAssets = Asset::whereIn('id', $assetIds)->whereNotNull('assigned_to')->get();
if($assignedAssets->isNotEmpty()) {
//if assets are checked out, return a list of asset tags that would need to be checked in first.
$assetTags = $assignedAssets->pluck('asset_tag')->implode(', ');
return redirect($bulk_back_url)->with('error', trans_choice('admin/hardware/message.delete.assigned_to_error', $assignedAssets->count(), ['asset_tag' => $assetTags] ));
}
foreach (Asset::wherein('id', $assetIds)->get() as $asset) {
$asset->delete();
}
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.delete.success'));
// no values given, nothing to update
}
/**
@@ -556,7 +570,6 @@ class BulkAssetsController extends Controller
*/
public function storeCheckout(AssetCheckoutRequest $request) : RedirectResponse | ModelNotFoundException
{
$this->authorize('checkout', Asset::class);
try {
@@ -570,6 +583,8 @@ class BulkAssetsController extends Controller
$asset_ids = array_filter($request->get('selected_assets'));
$assets = Asset::findOrFail($asset_ids);
if (request('checkout_to_type') == 'asset') {
foreach ($asset_ids as $asset_id) {
if ($target->id == $asset_id) {
@@ -589,9 +604,8 @@ class BulkAssetsController extends Controller
}
$errors = [];
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, &$errors, $asset_ids, $request) { //NOTE: $errors is passsed by reference!
foreach ($asset_ids as $asset_id) {
$asset = Asset::findOrFail($asset_id);
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, &$errors, $assets, $request) { //NOTE: $errors is passsed by reference!
foreach ($assets as $asset) {
$this->authorize('checkout', $asset);
$checkout_success = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $asset->name, null);
@@ -618,7 +632,7 @@ class BulkAssetsController extends Controller
// Redirect to the asset management page with error
return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans_choice('admin/hardware/message.multi-checkout.error', $asset_ids))->withErrors($errors);
} catch (ModelNotFoundException $e) {
return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans_choice('admin/hardware/message.multi-checkout.error', $request->input('selected_assets')));
}
}
+10 -43
View File
@@ -206,6 +206,7 @@ class LoginController extends Controller
$user->password = bcrypt($request->input('password'));
}
$user->last_login = \Carbon::now();
$user->email = $ldap_attr['email'];
$user->first_name = $ldap_attr['firstname'];
$user->last_name = $ldap_attr['lastname']; //FIXME (or TODO?) - do we need to map additional fields that we now support? E.g. country, phone, etc.
@@ -226,7 +227,7 @@ class LoginController extends Controller
$strip_prefixes = [
// IIS/AD
// https://github.com/snipe/snipe-it/pull/5862
// https://github.com/grokability/snipe-it/pull/5862
'\\',
// Google Cloud IAP
@@ -283,8 +284,11 @@ class LoginController extends Controller
return redirect()->back()->withInput()->withErrors($validator);
}
$this->maxLoginAttempts = config('auth.passwords.users.throttle.max_attempts');
$this->lockoutTime = config('auth.passwords.users.throttle.lockout_duration');
// Set the custom lockout attempts from the env and sett the custom lockout throttle from the env.
// We divide decayMinutes by 60 here to get minutes, since Laravel changed the default from minutes
// to seconds, and we don't want to break limits on existing systems
$this->maxAttempts = config('auth.passwords.users.throttle.max_attempts');
$this->decayMinutes = (config('auth.passwords.users.throttle.lockout_duration') / 60);
if ($lockedOut = $this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
@@ -354,7 +358,7 @@ class LoginController extends Controller
// We wouldn't normally see this page if 2FA isn't enforced via the
// \App\Http\Middleware\CheckForTwoFactor middleware AND if a device isn't enrolled,
// but let's check check anyway in case there's a browser history or back button thing.
// but let's check anyway in case there's a browser history or back button thing.
// While you can access this page directly, enrolling a device when 2FA isn't enforced
// won't cause any harm.
@@ -432,6 +436,7 @@ class LoginController extends Controller
if (Google2FA::verifyKey($user->two_factor_secret, $secret)) {
$user->two_factor_enrolled = 1;
$user->last_login = \Carbon::now();
$user->saveQuietly();
$request->session()->put('2fa_authed', $user->id);
@@ -479,6 +484,7 @@ class LoginController extends Controller
}
$request->session()->regenerate(true);
$request->session()->forget('2fa_authed');
if ($request->session()->has('password_hash_'.Auth::getDefaultDriver())){
$request->session()->remove('password_hash_'.Auth::getDefaultDriver());
@@ -519,45 +525,6 @@ class LoginController extends Controller
return 'username';
}
/**
* Redirect the user after determining they are locked out.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
protected function sendLockoutResponse(Request $request)
{
$seconds = $this->limiter()->availableIn(
$this->throttleKey($request)
);
$minutes = round($seconds / 60);
$message = trans('auth/message.throttle', ['minutes' => $minutes]);
return redirect()->back()
->withInput($request->only($this->username(), 'remember'))
->withErrors([$this->username() => $message]);
}
/**
* Override the lockout time and duration
*
* @param \Illuminate\Http\Request $request
* @return bool
*/
protected function hasTooManyLoginAttempts(Request $request)
{
$lockoutTime = config('auth.passwords.users.throttle.lockout_duration');
$maxLoginAttempts = config('auth.passwords.users.throttle.max_attempts');
return $this->limiter()->tooManyAttempts(
$this->throttleKey($request),
$maxLoginAttempts,
$lockoutTime
);
}
public function legacyAuthRedirect()
{
@@ -71,20 +71,28 @@ class BulkAssetModelsController extends Controller
if (($request->filled('manufacturer_id') && ($request->input('manufacturer_id') != 'NC'))) {
$update_array['manufacturer_id'] = $request->input('manufacturer_id');
}
if (($request->filled('category_id') && ($request->input('category_id') != 'NC'))) {
$update_array['category_id'] = $request->input('category_id');
}
if ($request->input('fieldset_id') != 'NC') {
$update_array['fieldset_id'] = $request->input('fieldset_id');
}
if ($request->input('depreciation_id') != 'NC') {
$update_array['depreciation_id'] = $request->input('depreciation_id');
}
if ($request->filled('requestable') != '') {
if ($request->input('requestable') != '') {
$update_array['requestable'] = $request->input('requestable');
}
if ($request->filled('min_amt')) {
$update_array['min_amt'] = $request->input('min_amt');
}
if (count($update_array) > 0) {
AssetModel::whereIn('id', $models_raw_array)->update($update_array);
+6 -23
View File
@@ -88,14 +88,10 @@ class CategoriesController extends Controller
* @param int $categoryId
* @since [v1.0]
*/
public function edit($categoryId = null) : RedirectResponse | View
public function edit(Category $category) : RedirectResponse | View
{
$this->authorize('update', Category::class);
if (is_null($item = Category::find($categoryId))) {
return redirect()->route('categories.index')->with('error', trans('admin/categories/message.does_not_exist'));
}
return view('categories/edit', compact('item'))
return view('categories/edit')->with('item', $category)
->with('category_types', Helper::categoryTypeList());
}
@@ -108,19 +104,10 @@ class CategoriesController extends Controller
* @param int $categoryId
* @since [v1.0]
*/
public function update(ImageUploadRequest $request, $categoryId = null) : RedirectResponse
public function update(ImageUploadRequest $request, Category $category) : RedirectResponse
{
$this->authorize('update', Category::class);
if (is_null($category = Category::find($categoryId))) {
// Redirect to the categories management page
return redirect()->route('categories.index')->with('error', trans('admin/categories/message.does_not_exist'));
}
// Update the category data
$category->name = $request->input('name');
// If the item count is > 0, we disable the category type in the edit. Disabled items
// don't POST, so if the category_type is blank we just set it to the default.
// Don't allow the user to change the category_type once it's been created
if (($request->filled('category_type') && ($category->itemCount() > 0))) {
@@ -158,7 +145,7 @@ class CategoriesController extends Controller
{
$this->authorize('delete', Category::class);
// Check if the category exists
if (is_null($category = Category::findOrFail($categoryId))) {
if (is_null($category = Category::withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count', 'models as models_count')->findOrFail($categoryId))) {
return redirect()->route('categories.index')->with('error', trans('admin/categories/message.not_found'));
}
@@ -168,7 +155,6 @@ class CategoriesController extends Controller
Storage::disk('public')->delete('categories'.'/'.$category->image);
$category->delete();
// Redirect to the locations management page
return redirect()->route('categories.index')->with('success', trans('admin/categories/message.delete.success'));
}
@@ -181,10 +167,10 @@ class CategoriesController extends Controller
* @param $id
* @since [v1.8]
*/
public function show($id) : View | RedirectResponse
public function show(Category $category) : View | RedirectResponse
{
$this->authorize('view', Category::class);
if ($category = Category::find($id)) {
if ($category->category_type == 'asset') {
$category_type = 'hardware';
$category_type_route = 'assets';
@@ -199,8 +185,5 @@ class CategoriesController extends Controller
return view('categories/view', compact('category'))
->with('category_type', $category_type)
->with('category_type_route', $category_type_route);
}
return redirect()->route('categories.index')->with('error', trans('admin/categories/message.does_not_exist'));
}
}
+5 -21
View File
@@ -80,16 +80,10 @@ final class CompaniesController extends Controller
* @since [v1.8]
* @param int $companyId
*/
public function edit($companyId) : View | RedirectResponse
public function edit(Company $company) : View | RedirectResponse
{
if (is_null($item = Company::find($companyId))) {
return redirect()->route('companies.index')
->with('error', trans('admin/companies/message.does_not_exist'));
}
$this->authorize('update', $item);
return view('companies/edit')->with('item', $item);
$this->authorize('update', $company);
return view('companies/edit')->with('item', $company);
}
/**
@@ -100,14 +94,10 @@ final class CompaniesController extends Controller
* @param ImageUploadRequest $request
* @param int $companyId
*/
public function update(ImageUploadRequest $request, $companyId) : RedirectResponse
public function update(ImageUploadRequest $request, Company $company) : RedirectResponse
{
if (is_null($company = Company::find($companyId))) {
return redirect()->route('companies.index')->with('error', trans('admin/companies/message.does_not_exist'));
}
$this->authorize('update', $company);
$company->name = $request->input('name');
$company->phone = $request->input('phone');
$company->fax = $request->input('fax');
@@ -158,15 +148,9 @@ final class CompaniesController extends Controller
->with('success', trans('admin/companies/message.delete.success'));
}
public function show($id) : View | RedirectResponse
public function show(Company $company) : View | RedirectResponse
{
$this->authorize('view', Company::class);
if (is_null($company = Company::find($id))) {
return redirect()->route('companies.index')
->with('error', trans('admin/companies/message.not_found'));
}
return view('companies/view')->with('company', $company);
}
}
@@ -107,15 +107,13 @@ class ComponentsController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($componentId = null)
public function edit(Component $component)
{
if ($item = Component::find($componentId)) {
$this->authorize('update', $item);
return view('components/edit', compact('item'))->with('category_type', 'component');
}
return redirect()->route('components.index')->with('error', trans('admin/components/message.does_not_exist'));
$this->authorize('update', $component);
return view('components/edit')
->with('item', $component)
->with('category_type', 'component');
}
@@ -130,11 +128,8 @@ class ComponentsController extends Controller
* @throws \Illuminate\Auth\Access\AuthorizationException
* @since [v3.0]
*/
public function update(ImageUploadRequest $request, $componentId = null)
public function update(ImageUploadRequest $request, Component $component)
{
if (is_null($component = Component::find($componentId))) {
return redirect()->route('components.index')->with('error', trans('admin/components/message.does_not_exist'));
}
$min = $component->numCheckedOut();
$validator = Validator::make($request->all(), [
'qty' => "required|numeric|min:$min",
@@ -201,6 +196,10 @@ class ComponentsController extends Controller
}
}
if ($component->numCheckedOut() > 0) {
return redirect()->route('components.index')->with('error', trans('admin/components/message.delete.error_qty'));
}
$component->delete();
return redirect()->route('components.index')->with('success', trans('admin/components/message.delete.success'));
@@ -216,17 +215,9 @@ class ComponentsController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($componentId = null)
public function show(Component $component)
{
$component = Component::find($componentId);
if (isset($component->id)) {
$this->authorize('view', $component);
return view('components/view', compact('component'));
}
// Redirect to the user management page
return redirect()->route('components.index')
->with('error', trans('admin/components/message.does_not_exist'));
}
}
@@ -104,15 +104,13 @@ class ConsumablesController extends Controller
* @see ConsumablesController::postEdit() method that stores the form data.
* @since [v1.0]
*/
public function edit($consumableId = null) : View | RedirectResponse
public function edit(Consumable $consumable) : View | RedirectResponse
{
if ($item = Consumable::find($consumableId)) {
$this->authorize($item);
$this->authorize($consumable);
return view('consumables/edit')
->with('item', $consumable)
->with('category_type', 'consumable');
return view('consumables/edit', compact('item'))->with('category_type', 'consumable');
}
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
}
/**
@@ -126,11 +124,8 @@ class ConsumablesController extends Controller
* @see ConsumablesController::getEdit() method that stores the form data.
* @since [v1.0]
*/
public function update(StoreConsumableRequest $request, $consumableId = null)
public function update(StoreConsumableRequest $request, Consumable $consumable)
{
if (is_null($consumable = Consumable::find($consumableId))) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
}
$min = $consumable->numCheckedOut();
$validator = Validator::make($request->all(), [
@@ -202,16 +197,11 @@ class ConsumablesController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($consumableId = null)
public function show(Consumable $consumable)
{
$consumable = Consumable::withCount('users as users_consumables')->find($consumableId);
$consumable = Consumable::withCount('users as users_consumables')->find($consumable->id);
$this->authorize($consumable);
if (isset($consumable->id)) {
return view('consumables/view', compact('consumable'));
}
return redirect()->route('consumables.index')
->with('error', trans('admin/consumables/message.does_not_exist'));
return view('consumables/view', compact('consumable'));
}
public function clone(Consumable $consumable) : View
+25 -29
View File
@@ -83,27 +83,30 @@ class CustomFieldsController extends Controller
{
$this->authorize('create', CustomField::class);
$show_in_email = $request->get("show_in_email", 0);
$display_in_user_view = $request->get("display_in_user_view", 0);
$show_in_email = $request->input("show_in_email", 0);
$display_in_user_view = $request->input("display_in_user_view", 0);
// Override the display settings if the field is encrypted
if ($request->get("field_encrypted") == '1') {
if ($request->input("field_encrypted") == '1') {
$show_in_email = '0';
$display_in_user_view = '0';
}
$field = new CustomField([
"name" => trim($request->get("name")),
"element" => $request->get("element"),
"help_text" => $request->get("help_text"),
"field_values" => $request->get("field_values"),
"field_encrypted" => $request->get("field_encrypted", 0),
"name" => trim($request->input("name")),
"element" => $request->input("element"),
"help_text" => $request->input("help_text"),
"field_values" => $request->input("field_values"),
"field_encrypted" => $request->input("field_encrypted", 0),
"show_in_email" => $show_in_email,
"is_unique" => $request->get("is_unique", 0),
"is_unique" => $request->input("is_unique", 0),
"display_in_user_view" => $display_in_user_view,
"auto_add_to_fieldsets" => $request->get("auto_add_to_fieldsets", 0),
"show_in_listview" => $request->get("show_in_listview", 0),
"show_in_requestable_list" => $request->get("show_in_requestable_list", 0),
"auto_add_to_fieldsets" => $request->input("auto_add_to_fieldsets", 0),
"show_in_listview" => $request->input("show_in_listview", 0),
"show_in_requestable_list" => $request->input("show_in_requestable_list", 0),
"display_checkin" => $request->input("display_checkin", 0),
"display_checkout" => $request->input("display_checkout", 0),
"display_audit" => $request->input("display_audit", 0),
"created_by" => auth()->id()
]);
@@ -193,10 +196,8 @@ class CustomFieldsController extends Controller
* @param int $id
* @since [v4.0]
*/
public function edit(Request $request, $id) : View | RedirectResponse
public function edit(Request $request, CustomField $field) : View | RedirectResponse
{
if ($field = CustomField::find($id)) {
$this->authorize('update', $field);
$fieldsets = CustomFieldset::get();
$customFormat = '';
@@ -210,11 +211,7 @@ class CustomFieldsController extends Controller
'fieldsets' => $fieldsets,
'predefinedFormats' => Helper::predefined_formats(),
]);
}
return redirect()->route("fields.index")
->with("error", trans('admin/custom_fields/message.field.invalid'));
}
@@ -229,13 +226,9 @@ class CustomFieldsController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update(CustomFieldRequest $request, $id) : RedirectResponse
public function update(CustomFieldRequest $request, CustomField $field) : RedirectResponse
{
$field = CustomField::find($id);
$this->authorize('update', $field);
$show_in_email = $request->get("show_in_email", 0);
$display_in_user_view = $request->get("display_in_user_view", 0);
@@ -245,8 +238,8 @@ class CustomFieldsController extends Controller
$display_in_user_view = '0';
}
$field->name = trim(e($request->get("name")));
$field->element = e($request->get("element"));
$field->name = trim($request->get("name"));
$field->element = $request->get("element");
$field->field_values = $request->get("field_values");
$field->created_by = auth()->id();
$field->help_text = $request->get("help_text");
@@ -256,11 +249,14 @@ class CustomFieldsController extends Controller
$field->auto_add_to_fieldsets = $request->get("auto_add_to_fieldsets", 0);
$field->show_in_listview = $request->get("show_in_listview", 0);
$field->show_in_requestable_list = $request->get("show_in_requestable_list", 0);
$field->display_checkin = $request->get("display_checkin", 0);
$field->display_checkout = $request->get("display_checkout", 0);
$field->display_audit = $request->get("display_audit", 0);
if ($request->get('format') == 'CUSTOM REGEX') {
$field->format = e($request->get('custom_format'));
$field->format = $request->get('custom_format');
} else {
$field->format = e($request->get('format'));
$field->format = $request->get('format');
}
if ($field->element == 'checkbox' || $field->element == 'radio'){
@@ -35,10 +35,12 @@ class CustomFieldsetsController extends Controller
* @param int $id
* @since [v1.8]
*/
public function show($id) : View | RedirectResponse
public function show(CustomFieldset $fieldset) : View | RedirectResponse
{
$cfset = CustomFieldset::with('fields')
->where('id', '=', $id)->orderBy('id', 'ASC')->first();
->where('id', '=', $fieldset->id)
->orderBy('id', 'ASC')
->first();
$this->authorize('view', $cfset);
@@ -122,16 +124,10 @@ class CustomFieldsetsController extends Controller
* @param int $id
* @since [v6.0.14]
*/
public function edit($id) : View | RedirectResponse
public function edit(CustomFieldset $fieldset) : View | RedirectResponse
{
$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]));
return view('custom_fields.fieldsets.edit')->with('item', $fieldset);
}
/**
@@ -141,23 +137,18 @@ class CustomFieldsetsController extends Controller
* @param int $id
* @since [v6.0.14]
*/
public function update(Request $request, $id) : RedirectResponse
public function update(Request $request, CustomFieldset $fieldset) : RedirectResponse
{
$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());
$fieldset->name = $request->input('name');
if ($fieldset->save()) {
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/general.fieldset_updated'));
}
return redirect()->route('fields.index')->with('error', trans('admin/custom_fields/general.fieldset_does_not_exist', ['id' => $id]));
return redirect()->back()->withInput()->withErrors($fieldset->getErrors());
}
/**
+1 -1
View File
@@ -40,7 +40,7 @@ class DashboardController extends Controller
if ((! file_exists(storage_path().'/oauth-private.key')) || (! file_exists(storage_path().'/oauth-public.key'))) {
Artisan::call('migrate', ['--force' => true]);
\Artisan::call('passport:install');
Artisan::call('passport:install', ['--no-interaction' => true]);
}
return view('dashboard')->with('asset_stats', $asset_stats)->with('counts', $counts);
+6 -21
View File
@@ -73,17 +73,10 @@ class DepartmentsController extends Controller
* @param int $id
* @since [v4.0]
*/
public function show($id) : View | RedirectResponse
public function show(Department $department) : View | RedirectResponse
{
$department = Department::find($id);
$this->authorize('view', $department);
if (isset($department->id)) {
return view('departments/view', compact('department'));
}
return redirect()->route('departments.index')->with('error', trans('admin/departments/message.does_not_exist'));
return view('departments/view', compact('department'));
}
/**
@@ -139,15 +132,10 @@ class DepartmentsController extends Controller
* @param int $departmentId
* @since [v1.0]
*/
public function edit($departmentId = null) : View | RedirectResponse
public function edit(Department $department) : View | RedirectResponse
{
if (is_null($item = Department::find($departmentId))) {
return redirect()->back()->with('error', trans('admin/locations/message.does_not_exist'));
}
$this->authorize('update', $item);
return view('departments/edit', compact('item'));
$this->authorize('update', $department);
return view('departments/edit')->with('item', $department);
}
/**
@@ -158,11 +146,8 @@ class DepartmentsController extends Controller
* @param int $departmentId
* @since [v1.0]
*/
public function update(ImageUploadRequest $request, $id) : RedirectResponse
public function update(ImageUploadRequest $request, Department $department) : RedirectResponse
{
if (is_null($department = Department::find($id))) {
return redirect()->route('departments.index')->with('error', trans('admin/departments/message.does_not_exist'));
}
$this->authorize('update', $department);
@@ -95,17 +95,11 @@ class DepreciationsController extends Controller
* @param int $depreciationId
* @since [v1.0]
*/
public function edit($depreciationId = null) : RedirectResponse | View
public function edit(Depreciation $depreciation) : RedirectResponse | View
{
// Check if the depreciation exists
if (is_null($item = Depreciation::find($depreciationId))) {
// Redirect to the blogs management page
return redirect()->route('depreciations.index')->with('error', trans('admin/depreciations/message.does_not_exist'));
}
$this->authorize('update', $item);
return view('depreciations/edit', compact('item'));
$this->authorize('update', $depreciation);
return view('depreciations/edit')->with('item', $depreciation);
}
/**
@@ -117,17 +111,10 @@ class DepreciationsController extends Controller
* @param int $depreciationId
* @since [v1.0]
*/
public function update(Request $request, $depreciationId = null) : RedirectResponse
public function update(Request $request, Depreciation $depreciation) : RedirectResponse
{
// Check if the depreciation exists
if (is_null($depreciation = Depreciation::find($depreciationId))) {
// Redirect to the blogs management page
return redirect()->route('depreciations.index')->with('error', trans('admin/depreciations/message.does_not_exist'));
}
$this->authorize('update', $depreciation);
// Depreciation data
$depreciation->name = $request->input('name');
$depreciation->months = $request->input('months');
@@ -191,12 +178,12 @@ class DepreciationsController extends Controller
* @param int $depreciationId
* @since [v1.0]
*/
public function show($id) : View | RedirectResponse
public function show(Depreciation $depreciation) : View | RedirectResponse
{
$depreciation = Depreciation::withCount('assets as assets_count')
->withCount('models as models_count')
->withCount('licenses as licenses_count')
->find($id);
->find($depreciation->id);
$this->authorize('view', $depreciation);
+10 -22
View File
@@ -79,19 +79,16 @@ class GroupsController extends Controller
* @param int $id
* @since [v1.0]
*/
public function edit($id) : View | RedirectResponse
public function edit(Group $group) : View | RedirectResponse
{
$group = Group::find($id);
$permissions = config('permissions');
$groupPermissions = $group->decodePermissions();
if ($group) {
$permissions = config('permissions');
$groupPermissions = $group->decodePermissions();
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
if ((!is_array($groupPermissions)) || (!$groupPermissions)) {
$groupPermissions = [];
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
$selected_array = Helper::selectedPermissionsArray($permissions, $groupPermissions);
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
}
/**
@@ -102,11 +99,8 @@ class GroupsController extends Controller
* @param int $id
* @since [v1.0]
*/
public function update(Request $request, $id = null) : RedirectResponse
public function update(Request $request, Group $group) : RedirectResponse
{
if (! $group = Group::find($id)) {
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
$group->name = $request->input('name');
$group->permissions = json_encode($request->input('permission'));
$group->notes = $request->input('notes');
@@ -151,14 +145,8 @@ class GroupsController extends Controller
* @param $id
* @since [v4.0.11]
*/
public function show($id) : View | RedirectResponse
public function show(Group $group) : View | RedirectResponse
{
$group = Group::find($id);
if ($group) {
return view('groups/view', compact('group'));
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
return view('groups/view', compact('group'));
}
}
@@ -4,10 +4,8 @@ namespace App\Http\Controllers\Kits;
use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller;
use App\Models\PredefinedKit;
use App\Models\Asset;
use App\Models\PredefinedLicence;
use App\Models\PredefinedModel;
use App\Models\PredefinedKit;
use App\Models\User;
use App\Services\PredefinedKitCheckoutService;
use Illuminate\Http\Request;
@@ -35,12 +33,9 @@ class CheckoutKitController extends Controller
* @author [D. Minaev.] [<dmitriy.minaev.v@gmail.com>]
* @return \Illuminate\Contracts\View\View View to checkout
*/
public function showCheckout($kit_id)
public function showCheckout(PredefinedKit $kit)
{
$this->authorize('checkout', Asset::class);
$kit = PredefinedKit::findOrFail($kit_id);
return view('kits/checkout')->with('kit', $kit);
}
@@ -76,17 +76,15 @@ class PredefinedKitsController extends Controller
* @param int $kit_id
* @return \Illuminate\Contracts\View\View
*/
public function edit($kit_id = null)
public function edit(PredefinedKit $kit)
{
$this->authorize('update', PredefinedKit::class);
if ($kit = PredefinedKit::find($kit_id)) {
return view('kits/edit')
->with('item', $kit)
->with('models', $kit->models)
->with('licenses', $kit->licenses);
}
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}
/**
@@ -98,15 +96,9 @@ class PredefinedKitsController extends Controller
* @param int $kit_id
* @return \Illuminate\Http\RedirectResponse
*/
public function update(ImageUploadRequest $request, $kit_id = null)
public function update(ImageUploadRequest $request, PredefinedKit $kit)
{
$this->authorize('update', PredefinedKit::class);
// Check if the kit exists
if (is_null($kit = PredefinedKit::find($kit_id))) {
// Redirect to the kits management page
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}
$kit->name = $request->input('name');
if ($kit->save()) {
@@ -153,9 +145,9 @@ class PredefinedKitsController extends Controller
* @param int $modelId
* @return \Illuminate\Contracts\View\View
*/
public function show($kit_id = null)
public function show(PredefinedKit $kit)
{
return $this->edit($kit_id);
return $this->edit($kit);
}
/**
@@ -38,6 +38,7 @@ class LabelsController extends Controller
$exampleAsset->order_number = '12345';
$exampleAsset->purchase_date = '2023-01-01';
$exampleAsset->status_id = 1;
$exampleAsset->location_id = 1;
$exampleAsset->company = new Company([
'name' => trans('admin/labels/table.example_company'),
@@ -28,16 +28,11 @@ class LicenseCheckinController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function create($seatId = null, $backTo = null)
public function create(LicenseSeat $licenseSeat, $backTo = null)
{
// Check if the asset exists
if (is_null($licenseSeat = LicenseSeat::find($seatId)) || is_null($license = License::find($licenseSeat->license_id))) {
// Redirect to the asset management page with error
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
}
$license = License::find($licenseSeat->license_id);
$this->authorize('checkout', $license);
return view('licenses/checkin', compact('licenseSeat'))->with('backto', $backTo);
}
@@ -92,6 +87,7 @@ class LicenseCheckinController extends Controller
if($licenseSeat->assigned_to != null){
$return_to = User::find($licenseSeat->assigned_to);
session()->put('checkedInFrom', $return_to->id);
} else {
$return_to = Asset::find($licenseSeat->asset_id);
}
@@ -28,33 +28,24 @@ class LicenseCheckoutController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function create($id)
public function create(License $license)
{
$this->authorize('checkout', $license);
if ($license = License::find($id)) {
if ($license->category) {
$this->authorize('checkout', $license);
if ($license->category) {
// Make sure there is at least one available to checkout
if ($license->availCount()->count() < 1){
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats'));
}
// Return the checkout view
return view('licenses/checkout', compact('license'));
// Make sure there is at least one available to checkout
if ($license->availCount()->count() < 1) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkout.not_enough_seats'));
}
// Invalid category
return redirect()->route('licenses.edit', ['license' => $license->id])
->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.license')]));
// Return the checkout view
return view('licenses/checkout', compact('license'));
}
// Not found
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
// Invalid category
return redirect()->route('licenses.edit', ['license' => $license->id])
->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.license')]));
}
@@ -121,13 +121,10 @@ class LicensesController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($licenseId = null)
public function edit(License $license)
{
if (is_null($item = License::find($licenseId))) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist'));
}
$this->authorize('update', $item);
$this->authorize('update', $license);
$maintained_list = [
'' => 'Maintained',
@@ -135,7 +132,8 @@ class LicensesController extends Controller
'0' => 'No',
];
return view('licenses/edit', compact('item'))
return view('licenses/edit')
->with('item', $license)
->with('depreciation_list', Helper::depreciationList())
->with('maintained_list', $maintained_list);
}
@@ -153,11 +151,9 @@ class LicensesController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update(Request $request, $licenseId = null)
public function update(Request $request, License $license)
{
if (is_null($license = License::find($licenseId))) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist'));
}
$this->authorize('update', $license);
@@ -201,10 +197,10 @@ class LicensesController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($licenseId)
public function destroy(License $license)
{
// Check if the license exists
if (is_null($license = License::find($licenseId))) {
if (is_null($license = License::find($license->id))) {
// Redirect to the license management page
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
}
@@ -238,14 +234,9 @@ class LicensesController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($licenseId = null)
public function show(License $license)
{
$license = License::with('assignedusers')->find($licenseId);
if (!$license) {
return redirect()->route('licenses.index')
->with('error', trans('admin/licenses/message.does_not_exist'));
}
$license = License::with('assignedusers')->find($license->id);
$users_count = User::where('autoassign_licenses', '1')->count();
$total_seats_count = $license->totalSeatsByLicenseID();
@@ -267,10 +258,10 @@ class LicensesController extends Controller
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $licenseId
* @return \Illuminate\Http\RedirectResponse
* @return \Illuminate\Http\RedirectResponse | \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function getClone($licenseId = null)
public function getClone($licenseId = null) : \Illuminate\Contracts\View\View | \Illuminate\Http\RedirectResponse
{
if (is_null($license_to_clone = License::find($licenseId))) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist'));
+57 -22
View File
@@ -2,10 +2,13 @@
namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\Company;
use App\Models\Location;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Request;
@@ -63,6 +66,7 @@ class LocationsController extends Controller
public function store(ImageUploadRequest $request) : RedirectResponse
{
$this->authorize('create', Location::class);
$location = new Location();
$location->name = $request->input('name');
$location->parent_id = $request->input('parent_id', null);
@@ -79,6 +83,18 @@ class LocationsController extends Controller
$location->phone = request('phone');
$location->fax = request('fax');
$location->notes = $request->input('notes');
$location->company_id = Company::getIdForCurrentUser($request->input('company_id'));
// Only scope the location if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$location->company_id = Company::getIdForCurrentUser($request->input('company_id'));
// check if parent is set and has a different company
if ($location->parent_id && Location::find($location->parent_id)->company_id != $location->company_id) {
return redirect()->back()->withInput()->withInput()->with('error', 'different company than parent');
}
} else {
$location->company_id = $request->input('company_id');
}
$location = $request->handleImages($location);
@@ -97,15 +113,10 @@ class LocationsController extends Controller
* @param int $locationId
* @since [v1.0]
*/
public function edit($locationId = null) : View | RedirectResponse
public function edit(Location $location) : View | RedirectResponse
{
$this->authorize('update', Location::class);
// Check if the location exists
if (is_null($item = Location::find($locationId))) {
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
return view('locations/edit', compact('item'));
return view('locations/edit')->with('item', $location);
}
/**
@@ -117,15 +128,10 @@ class LocationsController extends Controller
* @param int $locationId
* @since [v1.0]
*/
public function update(ImageUploadRequest $request, $locationId = null) : RedirectResponse
public function update(ImageUploadRequest $request, Location $location) : RedirectResponse
{
$this->authorize('update', Location::class);
// Check if the location exists
if (is_null($location = Location::find($locationId))) {
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
// Update the location data
$location->name = $request->input('name');
$location->parent_id = $request->input('parent_id', null);
$location->currency = $request->input('currency', '$');
@@ -141,6 +147,17 @@ class LocationsController extends Controller
$location->manager_id = $request->input('manager_id');
$location->notes = $request->input('notes');
// Only scope the location if the setting is enabled
if (Setting::getSettings()->scope_locations_fmcs) {
$location->company_id = Company::getIdForCurrentUser($request->input('company_id'));
// check if there are related objects with different company
if (Helper::test_locations_fmcs(false, $location->id, $location->company_id)) {
return redirect()->back()->withInput()->withInput()->with('error', 'error scoped locations');
}
} else {
$location->company_id = $request->input('company_id');
}
$location = $request->handleImages($location);
if ($location->save()) {
@@ -160,6 +177,7 @@ class LocationsController extends Controller
public function destroy($locationId) : RedirectResponse
{
$this->authorize('delete', Location::class);
if (is_null($location = Location::find($locationId))) {
return redirect()->to(route('locations.index'))->with('error', trans('admin/locations/message.does_not_exist'));
}
@@ -194,15 +212,17 @@ class LocationsController extends Controller
* @param int $id
* @since [v1.0]
*/
public function show($id = null) : View | RedirectResponse
public function show(Location $location) : View | RedirectResponse
{
$this->authorize('view', Location::class);
$location = Location::withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('rtd_assets as rtd_assets_count')
->withCount('children as children_count')
->withCount('users as users_count')
->withTrashed()
->find($id);
->find($location->id);
if (isset($location->id)) {
return view('locations/view', compact('location'));
@@ -213,20 +233,24 @@ class LocationsController extends Controller
public function print_assigned($id) : View | RedirectResponse
{
$this->authorize('view', Location::class);
if ($location = Location::where('id', $id)->first()) {
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$company = Company::where('id', $location->company_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('assigned_to', $id)->where('assigned_type', Location::class)->with('model', 'model.category')->get();
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
return view('locations/print')
->with('assets', $assets)
->with('users',$users)
->with('location', $location)
->with('parent', $parent)
->with('manager', $manager)
->with('company', $company);
}
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
@@ -295,13 +319,20 @@ class LocationsController extends Controller
}
public function print_all_assigned($id) : View | RedirectResponse
{
$this->authorize('view', Location::class);
if ($location = Location::where('id', $id)->first()) {
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$company = Company::where('id', $location->company_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('location_id', $id)->with('model', 'model.category')->get();
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
return view('locations/print')
->with('assets', $assets)
->with('users',$users)
->with('location', $location)
->with('parent', $parent)
->with('manager', $manager)
->with('company', $company);
}
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
@@ -315,6 +346,8 @@ class LocationsController extends Controller
*/
public function postBulkDelete(Request $request) : View | RedirectResponse
{
$this->authorize('update', Location::class);
$locations_raw_array = $request->input('ids');
// Make sure some IDs have been selected
@@ -348,6 +381,8 @@ class LocationsController extends Controller
*/
public function postBulkDeleteStore(Request $request) : RedirectResponse
{
$this->authorize('delete', Location::class);
$locations_raw_array = $request->input('ids');
if ((is_array($locations_raw_array)) && (count($locations_raw_array) > 0)) {
@@ -0,0 +1,111 @@
<?php
namespace App\Http\Controllers;
use App\Helpers\StorageHelper;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\Location;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Storage;
use \Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class LocationsFilesController extends Controller
{
/**
* Upload a file to the server.
*
* @param UploadFileRequest $request
* @param int $modelId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*@since [v1.0]
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function store(UploadFileRequest $request, Location $location) : RedirectResponse
{
$this->authorize('update', $location);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/locations')) {
Storage::makeDirectory('private_uploads/locations', 775);
}
foreach ($request->file('file') as $file) {
$file_name = $request->handleFile('private_uploads/locations/','location-'.$location->id, $file);
$location->logUpload($file_name, $request->get('notes'));
}
return redirect()->back()->withFragment('files')->with('success', trans('general.file_upload_success'));
}
return redirect()->back()->withFragment('files')->with('error', trans('admin/hardware/message.upload.nofiles'));
}
/**
* Check for permissions and display the file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
*/
public function show(Location $location, $fileId = null) : StreamedResponse | Response | RedirectResponse | BinaryFileResponse
{
$this->authorize('view', $location);
if (! $log = Actionlog::find($fileId)) {
return redirect()->back()->withFragment('files')->with('error', 'No matching file record');
}
$file = 'private_uploads/locations/'.$log->filename;
if (! Storage::exists($file)) {
return redirect()->back()->withFragment('files')->with('error', 'No matching file on server');
}
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
return Storage::download($file, $log->filename, $headers);
}
return StorageHelper::downloader($file);
}
/**
* Delete the associated file
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
*/
public function destroy(Location $location, $fileId = null) : RedirectResponse
{
$rel_path = 'private_uploads/locations';
$this->authorize('update', $location);
$log = Actionlog::find($fileId);
if ($log) {
// This should be moved to purge
// if (Storage::exists($rel_path.'/'.$log->filename)) {
// Storage::delete($rel_path.'/'.$log->filename);
// }
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}
}
@@ -6,6 +6,7 @@ use App\Http\Requests\ImageUploadRequest;
use App\Models\Actionlog;
use App\Models\Manufacturer;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
@@ -31,7 +32,30 @@ class ManufacturersController extends Controller
public function index() : View
{
$this->authorize('index', Manufacturer::class);
return view('manufacturers/index');
$manufacturer_count = Manufacturer::withTrashed()->count();
return view('manufacturers/index')->with('manufacturer_count', $manufacturer_count);
}
/**
* Returns a view that invokes the ajax tables which actually contains
* the content for the manufacturers listing, which is generated in getDatatable.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see Api\ManufacturersController::index() method that generates the JSON response
* @since [v1.0]
*/
public function seed() : RedirectResponse
{
$this->authorize('index', Manufacturer::class);
$manufacturers_count = Manufacturer::withTrashed()->count();
if ($manufacturers_count == 0) {
Artisan::call('db:seed', ['--class' => 'ManufacturerSeeder']);
return redirect()->route('manufacturers.index')->with('success', trans('general.seeding.manufacturers.success'));
}
return redirect()->route('manufacturers.index')->with('error', trans_choice('general.seeding.manufacturers.error', ['count' => $manufacturers_count]));
}
/**
@@ -85,18 +109,10 @@ class ManufacturersController extends Controller
* @param int $manufacturerId
* @since [v1.0]
*/
public function edit($manufacturerId = null) : View | RedirectResponse
public function edit(Manufacturer $manufacturer) : View | RedirectResponse
{
// Handles manufacturer checks and permissions.
$this->authorize('update', Manufacturer::class);
// Check if the manufacturer exists
if (! $item = Manufacturer::find($manufacturerId)) {
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
}
// Show the page
return view('manufacturers/edit', compact('item'));
return view('manufacturers/edit')->with('item', $manufacturer);
}
/**
@@ -108,16 +124,10 @@ class ManufacturersController extends Controller
* @param int $manufacturerId
* @since [v1.0]
*/
public function update(ImageUploadRequest $request, $manufacturerId = null) : RedirectResponse
public function update(ImageUploadRequest $request, Manufacturer $manufacturer) : RedirectResponse
{
$this->authorize('update', Manufacturer::class);
// Check if the manufacturer exists
if (is_null($manufacturer = Manufacturer::find($manufacturerId))) {
// Redirect to the manufacturer page
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
}
// Save the data
$manufacturer->name = $request->input('name');
$manufacturer->url = $request->input('url');
$manufacturer->support_url = $request->input('support_url');
@@ -185,18 +195,10 @@ class ManufacturersController extends Controller
* @param int $manufacturerId
* @since [v1.0]
*/
public function show($manufacturerId = null) : View | RedirectResponse
public function show(Manufacturer $manufacturer) : View | RedirectResponse
{
$this->authorize('view', Manufacturer::class);
$manufacturer = Manufacturer::find($manufacturerId);
if (isset($manufacturer->id)) {
return view('manufacturers/view', compact('manufacturer'));
}
$error = trans('admin/manufacturers/message.does_not_exist');
// Redirect to the user management page
return redirect()->route('manufacturers.index')->with('error', $error);
return view('manufacturers/view', compact('manufacturer'));
}
/**
+5 -4
View File
@@ -41,10 +41,11 @@ class ModalController extends Controller
$view = view("modals.${type}");
if ($type == "statuslabel") {
$view->with('statuslabel_types', Helper::statusTypeList());
}
if (in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) {
$view->with('kitId', $itemId);
$view->with('statuslabel_types', Helper::statusTypeList());
}
if (in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) {
$view->with('kitId', $itemId);
}
return $view;
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers;
use App\Models\Actionlog;
use App\Models\Asset;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class NotesController extends Controller
{
public function store(Request $request)
{
$this->authorize('update', Asset::class);
$validated = $request->validate([
'id' => 'required',
'note' => 'required|string|max:50000',
'type' => [
'required',
Rule::in(['asset']),
],
]);
$item = Asset::findOrFail($validated['id']);
$this->authorize('update', $item);
$logaction = new Actionlog;
$logaction->item_id = $item->id;
$logaction->item_type = get_class($item);
$logaction->note = $validated['note'];
$logaction->created_by = Auth::id();
$logaction->logaction('note added');
return redirect()
->route('hardware.show', $validated['id'])
->withFragment('history')
->with('success', trans('general.note_added'));
}
}
+2 -2
View File
@@ -53,7 +53,7 @@ class ProfileController extends Controller
$user->enable_confetti = $request->input('enable_confetti', false);
if (! config('app.lock_passwords')) {
$user->locale = $request->input('locale', 'en-US');
$user->locale = $request->input('locale');
}
if ((Gate::allows('self.two_factor')) && ((Setting::getSettings()->two_factor_enabled == '1') && (! config('app.lock_passwords')))) {
@@ -136,7 +136,7 @@ class ProfileController extends Controller
}
// This checks to make sure that the user's password isn't the same as their username,
// email address, first name or last name (see https://github.com/snipe/snipe-it/issues/8661)
// email address, first name or last name (see https://github.com/grokability/snipe-it/issues/8661)
// While this is handled via SaveUserRequest form request in other places, we have to do this manually
// here because we don't have the username, etc form fields available in the profile password change
// form.
+39 -39
View File
@@ -243,7 +243,7 @@ class ReportsController extends Controller
$header = [
trans('general.date'),
trans('general.admin'),
trans('general.created_by'),
trans('general.action'),
trans('general.type'),
trans('general.item'),
@@ -266,7 +266,7 @@ class ReportsController extends Controller
$actionlogs = Actionlog::with('item', 'user', 'target', 'location', 'adminuser')
->orderBy('created_at', 'DESC')
->chunk(20, function ($actionlogs) use ($handle) {
->chunk(500, function ($actionlogs) use ($handle) {
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
Log::debug('Walking results: '.$executionTime);
$count = 0;
@@ -485,7 +485,7 @@ class ReportsController extends Controller
$header[] = trans('admin/hardware/table.purchase_date');
}
if (($request->filled('purchase_cost')) || ($request->filled('depreciation'))) {
if ($request->filled('purchase_cost')) {
$header[] = trans('admin/hardware/table.purchase_cost');
}
@@ -493,6 +493,17 @@ class ReportsController extends Controller
$header[] = trans('admin/hardware/table.eol');
}
if ($request->filled('warranty')) {
$header[] = trans('admin/hardware/form.warranty');
$header[] = trans('admin/hardware/form.warranty_expires');
}
if ($request->filled('depreciation')) {
$header[] = trans('admin/hardware/table.book_value');
$header[] = trans('admin/hardware/table.diff');
$header[] = trans('admin/hardware/form.fully_depreciated');
}
if ($request->filled('order')) {
$header[] = trans('admin/hardware/form.order');
}
@@ -579,17 +590,6 @@ class ReportsController extends Controller
$header[] = trans('general.status');
}
if ($request->filled('warranty')) {
$header[] = trans('admin/hardware/form.warranty');
$header[] = trans('admin/hardware/form.warranty_expires');
}
if ($request->filled('depreciation')) {
$header[] = trans('admin/hardware/table.book_value');
$header[] = trans('admin/hardware/table.diff');
$header[] = trans('admin/hardware/form.fully_depreciated');
}
if ($request->filled('checkout_date')) {
$header[] = trans('admin/hardware/table.checkout_date');
}
@@ -737,6 +737,11 @@ class ReportsController extends Controller
if (($request->filled('next_audit_start')) && ($request->filled('next_audit_end'))) {
$assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]);
}
if (($request->filled('last_updated_start')) && ($request->filled('last_updated_end'))) {
$assets->whereBetween('assets.updated_at', [$request->input('last_updated_start'), $request->input('last_updated_end')]);
}
if ($request->filled('exclude_archived')) {
$assets->notArchived();
}
@@ -748,7 +753,7 @@ class ReportsController extends Controller
}
Log::debug($assets->toSql());
$assets->orderBy('assets.id', 'ASC')->chunk(20, function ($assets) use ($handle, $customfields, $request) {
$assets->orderBy('assets.id', 'ASC')->chunk(500, function ($assets) use ($handle, $customfields, $request) {
$executionTime = microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'];
Log::debug('Walking results: '.$executionTime);
@@ -805,6 +810,19 @@ class ReportsController extends Controller
$row[] = ($asset->purchase_date != '') ? $asset->asset_eol_date : '';
}
if ($request->filled('warranty')) {
$row[] = ($asset->warranty_months) ? $asset->warranty_months : '';
$row[] = $asset->present()->warranty_expires();
}
if ($request->filled('depreciation')) {
$depreciation = $asset->getDepreciatedValue();
$diff = ($asset->purchase_cost - $depreciation);
$row[] = Helper::formatCurrencyOutput($depreciation);
$row[] = Helper::formatCurrencyOutput($diff);
$row[] = (($asset->depreciation) && ($asset->depreciated_date())) ? $asset->depreciated_date()->format('Y-m-d') : '';
}
if ($request->filled('order')) {
$row[] = ($asset->order_number) ? $asset->order_number : '';
}
@@ -938,19 +956,6 @@ class ReportsController extends Controller
$row[] = ($asset->assetstatus) ? $asset->assetstatus->name.' ('.$asset->present()->statusMeta.')' : '';
}
if ($request->filled('warranty')) {
$row[] = ($asset->warranty_months) ? $asset->warranty_months : '';
$row[] = $asset->present()->warranty_expires();
}
if ($request->filled('depreciation')) {
$depreciation = $asset->getDepreciatedValue();
$diff = ($asset->purchase_cost - $depreciation);
$row[] = Helper::formatCurrencyOutput($depreciation);
$row[] = Helper::formatCurrencyOutput($diff);
$row[] = (($asset->depreciation) && ($asset->depreciated_date())) ? $asset->depreciated_date()->format('Y-m-d') : '';
}
if ($request->filled('checkout_date')) {
$row[] = ($asset->last_checkout) ? $asset->last_checkout : '';
}
@@ -1081,10 +1086,10 @@ class ReportsController extends Controller
$row[] = e($assetMaintenance->start_date);
$row[] = e($assetMaintenance->completion_date);
if (is_null($assetMaintenance->asset_maintenance_time)) {
$improvementTime = intval(Carbon::now()
->diffInDays(Carbon::parse($assetMaintenance->start_date)));
$improvementTime = (int) Carbon::now()
->diffInDays(Carbon::parse($assetMaintenance->start_date), true);
} else {
$improvementTime = intval($assetMaintenance->asset_maintenance_time);
$improvementTime = (int) $assetMaintenance->asset_maintenance_time;
}
$row[] = $improvementTime;
$row[] = trans('general.currency') . Helper::formatCurrencyOutput($assetMaintenance->cost);
@@ -1175,18 +1180,13 @@ class ReportsController extends Controller
}
$email = $assetItem->assignedTo?->email;
$locale = $assetItem->assignedTo?->locale;
// Only send notification if assigned
if ($locale && $email) {
Mail::to($email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $acceptance, $logItem->note))->locale($locale));
} elseif ($email) {
Mail::to($email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $acceptance, $logItem->note)));
}
if ($email == ''){
if (is_null($email) || $email === '') {
return redirect()->route('reports/unaccepted_assets')->with('error', trans('general.no_email'));
}
Mail::to($email)->send((new CheckoutAssetMail($assetItem, $assetItem->assignedTo, $logItem->user, $acceptance, $logItem->note, firstTimeSending: false))->locale($locale));
return redirect()->route('reports/unaccepted_assets')->with('success', trans('admin/reports/general.reminder_sent'));
}
+29 -3
View File
@@ -14,6 +14,7 @@ use App\Http\Requests\StoreLabelSettings;
use App\Http\Requests\StoreSecuritySettings;
use App\Models\CustomField;
use App\Models\Group;
use App\Models\Labels\Label as LabelModel;
use App\Models\Setting;
use App\Models\Asset;
use App\Models\User;
@@ -256,7 +257,7 @@ class SettingsController extends Controller
Artisan::call('migrate', ['--force' => true]);
if ((! file_exists(storage_path().'/oauth-private.key')) || (! file_exists(storage_path().'/oauth-public.key'))) {
Artisan::call('migrate', ['--path' => 'vendor/laravel/passport/database/migrations', '--force' => true]);
Artisan::call('passport:install');
Artisan::call('passport:install', ['--no-interaction' => true]);
}
return view('setup/migrate')
@@ -290,7 +291,6 @@ class SettingsController extends Controller
public function getSettings() : View
{
$setting = Setting::getSettings();
return view('settings/general', compact('setting'));
}
@@ -314,7 +314,23 @@ class SettingsController extends Controller
$setting->modellist_displays = implode(',', $request->input('show_in_model_list'));
}
$old_locations_fmcs = $setting->scope_locations_fmcs;
$setting->full_multiple_companies_support = $request->input('full_multiple_companies_support', '0');
$setting->scope_locations_fmcs = $request->input('scope_locations_fmcs', '0');
// Backward compatibility for locations makes no sense without FullMultipleCompanySupport
if (!$setting->full_multiple_companies_support) {
$setting->scope_locations_fmcs = '0';
}
// check for inconsistencies when activating scoped locations
if ($old_locations_fmcs == '0' && $setting->scope_locations_fmcs == '1') {
$mismatched = Helper::test_locations_fmcs(false);
if (count($mismatched) != 0) {
return redirect()->back()->withInput()->with('error', trans_choice('admin/settings/message.location_scoping.mismatch', count($mismatched)).' '.trans('admin/settings/message.location_scoping.not_saved'));
}
}
$setting->unique_serial = $request->input('unique_serial', '0');
$setting->shortcuts_enabled = $request->input('shortcuts_enabled', '0');
$setting->show_images_in_email = $request->input('show_images_in_email', '0');
@@ -428,6 +444,13 @@ class SettingsController extends Controller
$setting->label_logo = null;
}
// Acceptance PDF upload
$setting = $request->handleImages($setting, 600, 'acceptance_pdf_logo', '', 'acceptance_pdf_logo');
if ('1' == $request->input('clear_acceptance_pdf_logo')) {
$setting = $request->deleteExistingImage($setting, '', 'acceptance_pdf_logo');
$setting->acceptance_pdf_logo = null;
}
// Favicon upload
$setting = $request->handleImages($setting, 100, 'favicon', '', 'favicon');
if ('1' == $request->input('clear_favicon')) {
@@ -435,6 +458,7 @@ class SettingsController extends Controller
$setting->favicon = null;
}
// Default avatar upload
$setting = $request->handleImages($setting, 500, 'default_avatar', 'avatars', 'default_avatar');
if ($request->input('clear_default_avatar') == '1') {
@@ -748,6 +772,7 @@ class SettingsController extends Controller
$setting->label2_2d_type = $request->input('label2_2d_type');
$setting->label2_2d_target = $request->input('label2_2d_target');
$setting->label2_fields = $request->input('label2_fields');
$setting->label2_empty_row_count = $request->input('label2_empty_row_count');
$setting->labels_per_page = $request->input('labels_per_page');
$setting->labels_width = $request->input('labels_width');
$setting->labels_height = $request->input('labels_height');
@@ -850,7 +875,8 @@ class SettingsController extends Controller
$setting->ldap_fname_field = $request->input('ldap_fname_field');
$setting->ldap_auth_filter_query = $request->input('ldap_auth_filter_query');
$setting->ldap_version = $request->input('ldap_version', 3);
$setting->ldap_active_flag = $request->input('ldap_active_flag');
$setting->ldap_active_flag = $request->input('ldap_active_flag', 0);
$setting->ldap_invert_active_flag = $request->input('ldap_invert_active_flag', 0);
$setting->ldap_emp_num = $request->input('ldap_emp_num');
$setting->ldap_email = $request->input('ldap_email');
$setting->ldap_manager = $request->input('ldap_manager');
@@ -26,14 +26,10 @@ class StatuslabelsController extends Controller
return view('statuslabels.index');
}
public function show($id) : View | RedirectResponse
public function show(Statuslabel $statuslabel) : View | RedirectResponse
{
$this->authorize('view', Statuslabel::class);
if ($statuslabel = Statuslabel::find($id)) {
return view('statuslabels.view')->with('statuslabel', $statuslabel);
}
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist'));
return view('statuslabels.view')->with('statuslabel', $statuslabel);
}
/**
@@ -91,20 +87,15 @@ class StatuslabelsController extends Controller
*
* @param int $statuslabelId
*/
public function edit($statuslabelId = null) : View | RedirectResponse
public function edit(Statuslabel $statuslabel) : View | RedirectResponse
{
$this->authorize('update', Statuslabel::class);
// Check if the Statuslabel exists
if (is_null($item = Statuslabel::find($statuslabelId))) {
// Redirect to the blogs management page
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist'));
}
$use_statuslabel_type = $item->getStatuslabelType();
$statuslabel_types = ['' => trans('admin/hardware/form.select_statustype')] + ['undeployable' => trans('admin/hardware/general.undeployable')] + ['pending' => trans('admin/hardware/general.pending')] + ['archived' => trans('admin/hardware/general.archived')] + ['deployable' => trans('admin/hardware/general.deployable')];
return view('statuslabels/edit', compact('item', 'statuslabel_types'))->with('use_statuslabel_type', $use_statuslabel_type);
return view('statuslabels/edit', compact('statuslabel_types'))
->with('item', $statuslabel)
->with('use_statuslabel_type', $statuslabel);
}
/**
@@ -112,14 +103,9 @@ class StatuslabelsController extends Controller
*
* @param int $statuslabelId
*/
public function update(Request $request, $statuslabelId = null) : RedirectResponse
public function update(Request $request, Statuslabel $statuslabel) : RedirectResponse
{
$this->authorize('update', Statuslabel::class);
// Check if the Statuslabel exists
if (is_null($statuslabel = Statuslabel::find($statuslabelId))) {
// Redirect to the blogs management page
return redirect()->route('statuslabels.index')->with('error', trans('admin/statuslabels/message.does_not_exist'));
}
if (! $request->filled('statuslabel_types')) {
return redirect()->back()->withInput()->withErrors(['statuslabel_types' => trans('validation.statuslabel_type')]);
+5 -22
View File
@@ -77,17 +77,10 @@ class SuppliersController extends Controller
*
* @param int $supplierId
*/
public function edit($supplierId = null) : View | RedirectResponse
public function edit(Supplier $supplier) : View | RedirectResponse
{
$this->authorize('update', Supplier::class);
// Check if the supplier exists
if (is_null($item = Supplier::find($supplierId))) {
// Redirect to the supplier page
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.does_not_exist'));
}
// Show the page
return view('suppliers/edit', compact('item'));
return view('suppliers/edit')->with('item', $supplier);
}
/**
@@ -95,14 +88,9 @@ class SuppliersController extends Controller
*
* @param int $supplierId
*/
public function update($supplierId, ImageUploadRequest $request) : RedirectResponse
public function update(ImageUploadRequest $request, Supplier $supplier) : RedirectResponse
{
$this->authorize('update', Supplier::class);
if (is_null($supplier = Supplier::find($supplierId))) {
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.does_not_exist'));
}
// Save the data
$supplier->name = request('name');
$supplier->address = request('address');
@@ -163,15 +151,10 @@ class SuppliersController extends Controller
* @param null $supplierId
* @internal param int $assetId
*/
public function show($supplierId = null) : View | RedirectResponse
public function show(Supplier $supplier) : View | RedirectResponse
{
$this->authorize('view', Supplier::class);
$supplier = Supplier::find($supplierId);
return view('suppliers/view', compact('supplier'));
if (isset($supplier->id)) {
return view('suppliers/view', compact('supplier'));
}
return redirect()->route('suppliers.index')->with('error', trans('admin/suppliers/message.does_not_exist'));
}
}
@@ -15,6 +15,7 @@ use App\Models\ConsumableAssignment;
use App\Models\Consumable;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\CurrentInventory;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;
@@ -52,6 +53,28 @@ class BulkUsersController extends Controller
return view('users/bulk-edit', compact('users'))
->with('groups', Group::pluck('name', 'id'));
// bulk send assigned inventory
} elseif ($request->input('bulk_actions') == 'send_assigned') {
$this->authorize('update', User::class);
$users_without_email = 0;
foreach ($users as $user) {
if (empty($user->email)) {
$users_without_email++;
} else {
$user->notify((new CurrentInventory($user)));
}
}
if ($users_without_email == 0) {
return redirect()->back()->with('success', trans_choice('admin/users/general.users_notified', $users->count()));
} else {
return redirect()->back()->with('warning', trans_choice('admin/users/general.users_notified_warning', $users->count(), ['no_email' => $users_without_email]));
}
// bulk delete, display the bulk delete confirmation form
} elseif ($request->input('bulk_actions') == 'delete') {
$this->authorize('delete', User::class);
@@ -275,7 +298,6 @@ class BulkUsersController extends Controller
$this->logItemCheckinAndDelete($assets, Asset::class);
$this->logAccessoriesCheckin($accessoryUserRows);
$this->logItemCheckinAndDelete($licenses, License::class);
$this->logConsumablesCheckin($consumableUserRows);
Asset::whereIn('id', $assets->pluck('id'))->update([
'status_id' => e(request('status_id')),
@@ -337,21 +359,7 @@ class BulkUsersController extends Controller
$logAction->item_type = Accessory::class;
$logAction->target_id = $accessoryUserRow->assigned_to;
$logAction->target_type = User::class;
$logAction->created_at = auth()->id();
$logAction->note = 'Bulk checkin items';
$logAction->logaction('checkin from');
}
}
private function logConsumablesCheckin(Collection $consumableUserRows): void
{
foreach ($consumableUserRows as $consumableUserRow) {
$logAction = new Actionlog();
$logAction->item_id = $consumableUserRow->consumable_id;
$logAction->item_type = Consumable::class;
$logAction->target_id = $consumableUserRow->assigned_to;
$logAction->target_type = User::class;
$logAction->created_at = auth()->id();
$logAction->created_by = auth()->id();
$logAction->note = 'Bulk checkin items';
$logAction->logaction('checkin from');
}
@@ -22,43 +22,34 @@ class UserFilesController extends Controller
*@author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.6]
*/
public function store(UploadFileRequest $request, $userId = null)
public function store(UploadFileRequest $request, User $user)
{
$user = User::find($userId);
$destinationPath = config('app.private_uploads').'/users';
$this->authorize('update', $user);
$files = $request->file('file');
if (isset($user->id)) {
$this->authorize('update', $user);
$logActions = [];
$files = $request->file('file');
if (is_null($files)) {
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));
}
foreach ($files as $file) {
$file_name = $request->handleFile('private_uploads/users/', 'user-'.$user->id, $file);
//Log the uploaded file to the log
$logAction = new Actionlog();
$logAction->item_id = $user->id;
$logAction->item_type = User::class;
$logAction->created_by = auth()->id();
$logAction->note = $request->input('notes');
$logAction->target_id = null;
$logAction->created_at = date("Y-m-d H:i:s");
$logAction->filename = $file_name;
$logAction->action_type = 'uploaded';
if (! $logAction->save()) {
return JsonResponse::create(['error' => 'Failed validation: '.print_r($logAction->getErrors(), true)], 500);
}
$logActions[] = $logAction;
}
// dd($logActions);
return redirect()->back()->withFragment('files')->with('success', trans('admin/users/message.upload.success'));
if (is_null($files)) {
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));
}
foreach ($files as $file) {
$file_name = $request->handleFile('private_uploads/users/', 'user-'.$user->id, $file);
//Log the uploaded file to the log
$logAction = new Actionlog();
$logAction->item_id = $user->id;
$logAction->item_type = User::class;
$logAction->created_by = auth()->id();
$logAction->note = $request->input('notes');
$logAction->target_id = null;
$logAction->created_at = date("Y-m-d H:i:s");
$logAction->filename = $file_name;
$logAction->action_type = 'uploaded';
if (! $logAction->save()) {
return JsonResponse::create(['error' => 'Failed validation: '.print_r($logAction->getErrors(), true)], 500);
}
return redirect()->back()->withFragment('files')->with('success', trans('admin/users/message.upload.success'));
}
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));
}
@@ -110,7 +101,7 @@ class UserFilesController extends Controller
* @return mixed
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($userId = null, $fileId = null)
public function show(User $user, $fileId = null)
{
@@ -118,29 +109,21 @@ class UserFilesController extends Controller
return redirect()->route('users.show')->with('error', 'Invalid file request');
}
if ($user = User::find($userId)) {
$this->authorize('view', $user);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $user->id)->find($fileId)) {
$file = 'private_uploads/users/'.$log->filename;
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $user->id)->find($fileId)) {
$file = 'private_uploads/users/'.$log->filename;
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.file_not_found'));
}
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.file_not_found'));
}
// The log record doesn't exist somehow
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found'));
return redirect()->back()->with('error', trans('general.file_not_found'));
}
// Redirect to the user management page if the user doesn't exist
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', ['id' => $userId]));
// The log record doesn't exist somehow
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found'));
}
}
+29 -29
View File
@@ -178,18 +178,22 @@ class UsersController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param $permissions
* @return \Illuminate\Contracts\View\View
* @return \Illuminate\Contracts\View\View|\Illuminate\Http\RedirectResponse
* @internal param int $id
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($id)
public function edit(User $user)
{
$this->authorize('update', User::class);
$user = User::with(['assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc'])->withTrashed()->find($id);
$user = User::with(['assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc'])->withTrashed()->find($user->id);
if ($user) {
if ($user->trashed()) {
return redirect()->route('users.show', $user->id);
}
$permissions = config('permissions');
$groups = Group::pluck('name', 'id');
@@ -201,7 +205,6 @@ class UsersController extends Controller
return view('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))->with('item', $user);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
/**
@@ -324,7 +327,7 @@ class UsersController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy(DeleteUserRequest $request, $id = null)
public function destroy(DeleteUserRequest $request, $id)
{
$this->authorize('delete', User::class);
@@ -333,13 +336,6 @@ class UsersController extends Controller
$this->authorize('delete', $user);
if ($user->delete()) {
if (Storage::disk('public')->exists('avatars/' . $user->avatar)) {
try {
Storage::disk('public')->delete('avatars/' . $user->avatar);
} catch (\Exception $e) {
Log::debug($e);
}
}
return redirect()->route('users.index')->with('success', trans('admin/users/message.success.delete'));
}
}
@@ -398,23 +394,27 @@ class UsersController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($userId = null)
public function show(User $user)
{
// Make sure the user can view users at all
$this->authorize('view', User::class);
$user = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find($userId);
$user = User::with([
'consumables',
'accessories',
'licenses',
'userloc',
])
->withTrashed()
->find($user->id);
// Make sure they can view this particular user
$this->authorize('view', $user);
if ($user) {
$userlog = $user->userlog->load('item');
return view('users/view', compact('user', 'userlog'))->with('settings', Setting::getSettings());
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', ['id' => $userId]));
return view('users/view', [
'user' => $user,
'settings' => Setting::getSettings(),
]);
}
@@ -428,7 +428,7 @@ class UsersController extends Controller
* @return \Illuminate\Contracts\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function getClone(Request $request, $id = null)
public function getClone(Request $request, User $user)
{
$this->authorize('create', User::class);
@@ -438,7 +438,7 @@ class UsersController extends Controller
app('request')->request->set('permissions', $permissions);
$user_to_clone = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find($id);
$user_to_clone = User::with('assets', 'assets.model', 'consumables', 'accessories', 'licenses', 'userloc')->withTrashed()->find($user->id);
// Make sure they can view this particular user
$this->authorize('view', $user_to_clone);
@@ -468,10 +468,10 @@ class UsersController extends Controller
->with('user', $user)
->with('groups', Group::pluck('name', 'id'))
->with('userGroups', $userGroups)
->with('clone_user', $user_to_clone);
->with('clone_user', $user_to_clone)
->with('item', $user);
}
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
@@ -598,18 +598,18 @@ class UsersController extends Controller
$user = User::where('id', $id)
->with([
'assets.assetlog',
'assets.assignedAssets.assetlog',
'assets.log' => fn($query) => $query->withTrashed()->where('target_type', User::class)->where('target_id', $id)->where('action_type', 'accepted'),
'assets.assignedAssets.log' => fn($query) => $query->withTrashed()->where('target_type', User::class)->where('target_id', $id)->where('action_type', 'accepted'),
'assets.assignedAssets.defaultLoc',
'assets.assignedAssets.location',
'assets.assignedAssets.model.category',
'assets.defaultLoc',
'assets.location',
'assets.model.category',
'accessories.assetlog',
'accessories.log' => fn($query) => $query->withTrashed()->where('target_type', User::class)->where('target_id', $id)->where('action_type', 'accepted'),
'accessories.category',
'accessories.manufacturer',
'consumables.assetlog',
'consumables.log' => fn($query) => $query->withTrashed()->where('target_type', User::class)->where('target_id', $id)->where('action_type', 'accepted'),
'consumables.category',
'consumables.manufacturer',
'licenses.category',
+28 -55
View File
@@ -2,18 +2,21 @@
namespace App\Http\Controllers;
use App\Actions\CheckoutRequests\CancelCheckoutRequestAction;
use App\Actions\CheckoutRequests\CreateCheckoutRequestAction;
use App\Exceptions\AssetNotRequestable;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Company;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\RequestAssetCancelation;
use App\Notifications\RequestAssetNotification;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Http\Request;
use Illuminate\Http\RedirectResponse;
use \Illuminate\Contracts\View\View;
use Log;
use Exception;
/**
* This controller handles all actions related to the ability for users
@@ -81,7 +84,7 @@ class ViewAssetsController extends Controller
return view('account/requestable-assets', compact('assets', 'models'));
}
public function getRequestItem(Request $request, $itemType, $itemId = null, $cancel_by_admin = false, $requestingUser = null) : RedirectResponse
public function getRequestItem(Request $request, $itemType, $itemId = null, $cancel_by_admin = false, $requestingUser = null): RedirectResponse
{
$item = null;
$fullItemType = 'App\\Models\\'.studly_case($itemType);
@@ -144,63 +147,33 @@ class ViewAssetsController extends Controller
* Process a specific requested asset
* @param null $assetId
*/
public function getRequestAsset($assetId = null) : RedirectResponse
public function store(Asset $asset): RedirectResponse
{
$user = auth()->user();
// Check if the asset exists and is requestable
if (is_null($asset = Asset::RequestableAssets()->find($assetId))) {
return redirect()->route('requestable-assets')
->with('error', trans('admin/hardware/message.does_not_exist_or_not_requestable'));
}
if (! Company::isCurrentUserHasAccess($asset)) {
return redirect()->route('requestable-assets')
->with('error', trans('general.insufficient_permissions'));
}
$data['item'] = $asset;
$data['target'] = auth()->user();
$data['item_quantity'] = 1;
$settings = Setting::getSettings();
$logaction = new Actionlog();
$logaction->item_id = $data['asset_id'] = $asset->id;
$logaction->item_type = $data['item_type'] = Asset::class;
$logaction->created_at = $data['requested_date'] = date('Y-m-d H:i:s');
if ($user->location_id) {
$logaction->location_id = $user->location_id;
}
$logaction->target_id = $data['user_id'] = auth()->id();
$logaction->target_type = User::class;
// If it's already requested, cancel the request.
if ($asset->isRequestedBy(auth()->user())) {
$asset->cancelRequest();
$asset->decrement('requests_counter', 1);
$logaction->logaction('request canceled');
try {
$settings->notify(new RequestAssetCancelation($data));
} catch (\Exception $e) {
Log::warning($e);
}
return redirect()->route('requestable-assets')
->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
}
$logaction->logaction('requested');
$asset->request();
$asset->increment('requests_counter', 1);
try {
$settings->notify(new RequestAssetNotification($data));
} catch (\Exception $e) {
Log::warning($e);
CreateCheckoutRequestAction::run($asset, auth()->user());
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.success'));
} catch (AssetNotRequestable $e) {
return redirect()->back()->with('error', 'Asset is not requestable');
} catch (AuthorizationException $e) {
return redirect()->back()->with('error', trans('admin/hardware/message.requests.error'));
} catch (Exception $e) {
report($e);
return redirect()->back()->with('error', trans('general.something_went_wrong'));
}
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.success'));
}
public function destroy(Asset $asset): RedirectResponse
{
try {
CancelCheckoutRequestAction::run($asset, auth()->user());
return redirect()->route('requestable-assets')->with('success')->with('success', trans('admin/hardware/message.requests.canceled'));
} catch (Exception $e) {
report($e);
return redirect()->back()->with('error', trans('general.something_went_wrong'));
}
}
public function getRequestedAssets() : View
{
return view('account/requested');
+3 -2
View File
@@ -24,7 +24,7 @@ class DeleteUserRequest extends FormRequest
public function prepareForValidation(): void
{
$user_to_delete = User::withTrashed()->find(request()->route('user'));
$user_to_delete = User::withTrashed()->with('managesUsers')->find(request()->route('user'));
if ($user_to_delete) {
$this->merge([
@@ -61,7 +61,8 @@ class DeleteUserRequest extends FormRequest
public function messages(): array
{
$user_to_delete = User::withTrashed()->find(request()->route('user'));
$user_to_delete = User::withTrashed()->with('managesUsers')->find(request()->route('user'));
$messages = [];
if ($user_to_delete) {

Some files were not shown because too many files have changed in this diff Show More