Compare commits

...

2625 Commits

Author SHA1 Message Date
snipe da86e919d9 Bumped version to v8.6.2 2026-06-13 19:19:50 +01:00
snipe 45d6a491cb Localization: Fixed #19173 - use translatoon string for depreciation helper 2026-06-13 18:02:00 +01:00
snipe 3dc90f89f6 Localization: Fixed #19176 - use translation key for “send email” 2026-06-13 17:57:09 +01:00
snipe e2bea57146 Merge pull request #19167 from grokability/fmcs-scope-check-updates-for-multiple-companies
FMCS/Console: Fixed #19166 scope check updates for multiple companies, adds floater
2026-06-13 14:51:01 +01:00
snipe 43a32071f1 FMCS/Companyable Trait: refactor API call to use canCheckoutTo 2026-06-13 14:38:32 +01:00
snipe e3a9872d28 Updated tests 2026-06-13 13:18:37 +01:00
snipe 75f86cd669 FMCS+location+floater+importer: handle the importer as well 2026-06-13 12:55:10 +01:00
snipe 73f72cbbb0 Use the new companyable trait in the bulk assets controller 2026-06-13 12:42:48 +01:00
snipe 2033f25386 FMCS/Floater: Refactor logic into the companyable trait 2026-06-13 12:36:15 +01:00
snipe 8d0a6af2aa Refactor into the Companyable trait 2026-06-13 12:35:48 +01:00
snipe a698ba3082 Dev assets 2026-06-12 22:25:47 +01:00
snipe b57d286b15 Bumped hash 2026-06-12 22:25:30 +01:00
snipe 3cd5e86527 Updated language strings 2026-06-12 22:23:44 +01:00
snipe bccba46332 Merge pull request #19170 from marcusmoore/fixes/21586-importer-error-handling
Importer: allow rendering simple error messages
2026-06-12 22:02:52 +01:00
snipe 70357ada3d Merge pull request #19175 from marcusmoore/fixes/21665-filter-request-validation
Reporting: improve validation for item and target types
2026-06-12 22:02:30 +01:00
snipe 043ad713e7 Merge pull request #19115 from grokability/#19096-and-#19095-company-and-location-and-groups-in-scim
Fixed #19095 and #19096 - SCIM updates in Azure/Entra
2026-06-12 21:52:32 +01:00
snipe bb178b0a5c Merge pull request #19183 from uberbrady/#19096-and-#19095-company-and-location-and-groups-in-scim
SCIM: Fix address handling and work around Entra email changes
2026-06-12 21:51:37 +01:00
Brady Wetherington 288bded7d9 SCIM: Fix address handling and work around Entra email changes 2026-06-12 21:43:47 +01:00
snipe d12ad3d538 Table row selection: Use document.getElementById and DOM/jQuery element constructors 2026-06-12 19:55:07 +01:00
snipe 905d498ecd Maintenances: Fixed FD-55977 - Cross-company asset maintenance re-parenting via API update 2026-06-12 19:17:44 +01:00
snipe 802067f398 Acceptances: Fixed FD-55978 - Cross-company deletion of pending checkout acceptances via unscoped report endpoint 2026-06-12 19:15:36 +01:00
snipe b40e227ad3 Merge pull request #19182 from uberbrady/fix_too_many_placeholders
Custom Asset Report: Fixed [RB-21669] - use subquery for action_date
2026-06-12 18:45:22 +01:00
Brady Wetherington b89504e1c3 Custom Asset Report: Fixed [RB-21669] - use subquery for action_log action_date 2026-06-12 17:49:48 +01:00
snipe c8ae09cd43 FMCS location scoping - Added tests 2026-06-12 17:26:57 +01:00
snipe 8ebddd95ff FMCS+location scoping - Fixed scope boundaries 2026-06-12 16:46:23 +01:00
snipe c14880dfca Oh, pint 2026-06-12 16:10:29 +01:00
snipe a27c551f64 Style changes requested 2026-06-12 16:10:17 +01:00
Marcus Moore e71453cb5d Reporting: re-add camel and pascal casing for asset model and license seat 2026-06-11 12:41:49 -07:00
Marcus Moore bb19add3b6 Reporting: improve validation 2026-06-11 12:25:40 -07:00
snipe 9bd6396a15 Merge pull request #19162 from marcusmoore/fixes/21663-audit-notification
Auditing: Added try catch around sending notification
2026-06-11 00:41:07 +01:00
Marcus Moore b060327219 Importer: allow rendering simple error messages
[RB-21586]
2026-06-10 11:51:03 -07:00
Marcus Moore 8b383df13f Logging: use warning instead of error 2026-06-10 09:53:30 -07:00
snipe 6a0ec69451 FMCS/Validation: Fixed #19166 - translate error messages on FMCS fail 2026-06-10 12:44:46 +01:00
snipe 66bf6275b8 Merge branch 'develop' into fmcs-scope-check-updates-for-multiple-companies 2026-06-10 12:34:09 +01:00
snipe 6fc2ff7252 FMCS console checker: added test 2026-06-10 12:15:28 +01:00
snipe 0f6367bb17 FMCS: Extended checks to accessories, bulk controllers, etc 2026-06-10 11:47:54 +01:00
snipe e3190c3922 FMCS Admin Settings: updated language 2026-06-10 11:41:02 +01:00
snipe 53628d6ae3 FMCS: Users API - Check for floater in results 2026-06-10 11:26:41 +01:00
snipe d03f68ae34 FMCS: Updated floater value in controller 2026-06-10 11:26:12 +01:00
snipe 87bc834885 FMCS: updated language strings (may tweak) 2026-06-10 11:25:13 +01:00
snipe 9f89dffaae FMCS: update the helper that checks for location-scoping 2026-06-10 11:23:14 +01:00
snipe ab1a5c0241 FMCS: check for floater mode in user and company 2026-06-10 11:22:50 +01:00
snipe 758c1cabc5 FMSC Tests: added enableFloaterMode for setup 2026-06-10 11:20:55 +01:00
snipe 3dd5358e73 FMCS: updated/added tests 2026-06-10 11:20:33 +01:00
snipe 8cc4ad27c9 FMCS: Added floater option checkbox to general settings 2026-06-10 11:20:05 +01:00
snipe cd1f6b8e73 FMCS: Added floater option in admin settings 2026-06-10 11:19:39 +01:00
snipe 07e70cf7a9 Added test 2026-06-10 11:19:16 +01:00
snipe a9d1069705 Merge pull request #19161 from Godmartinz/assignedTo_fix
FD[55918] Fixes location not displaying on labels when assigned to.
2026-06-09 23:04:30 +01:00
snipe 10703263a8 Livewire: Added ComponentNotFoundException to $dontReport
A bot was POSTing a crafted payload to that endpoint requesting the `filament.pages.dashboard` component - a known Filament probe - while posting to the . Livewire resolved the route, couldn't find that component class, and threw `ComponentNotFoundException` uncaught, resulting in a 500.

`ComponentNotFoundException` is now in `$dontReport` (so it won't flood our error tracker) and returns a 404 JSON response, the same pattern already used for `PublicPropertyNotFoundException`. The bot gets a 404 and moves on, no more 500s.
2026-06-09 20:33:27 +01:00
snipe b0aa21bee7 FMCS: throw an error if companies don’t match, updated tests 2026-06-09 19:08:27 +01:00
Marcus Moore 82fa1d7a26 Auditing: wrap audit notification in try catch 2026-06-09 11:04:22 -07:00
Godfrey M be446e97d7 Labels: use instanceOf to differentiate accessors 2026-06-09 10:55:15 -07:00
snipe c44f3319e3 Fixed company quirk with multi-company users creating assets, etc 2026-06-09 18:50:49 +01:00
Godfrey M 678d1c1428 Labels: return full_name instead of display_name for assignedTo 2026-06-09 10:50:18 -07:00
Godfrey M 535d7c0ff6 Label Fields: Fixes location assignedTos coming back null 2026-06-09 10:38:43 -07:00
snipe e430e4e6e2 Tests: Added explicit sort on tests to fix flakiness 2026-06-09 13:02:05 +01:00
snipe df92076e15 Added notes for FMCS scoping 2026-06-09 12:47:11 +01:00
snipe e2ba35ee80 Small FMCS fixes 2026-06-09 12:33:48 +01:00
snipe f4cac96358 Apply scope to print page 2026-06-09 12:18:50 +01:00
snipe 5257c2ce84 Merge pull request #19158 from grokability/added-qr-codes-to-non-assets
QR Codes: Added QR codes for non-assets
2026-06-08 22:38:16 +01:00
snipe b378cf31f4 Merge pull request #19160 from grokability/added-changed-log-meta-to-accessories-and-licenses
Logging: Fixed FD-55757 - Added changed log meta to accessories and licenses
2026-06-08 22:37:59 +01:00
snipe 0f184840df Pint 2026-06-08 22:29:53 +01:00
snipe 3df21df85b Logging: Fixed FD-55757 - added log_meta for licenses and accessories 2026-06-08 22:29:44 +01:00
snipe 0d870d540d Kits: Fixed FD-55737 - Kit License Association Lacks Object-Level Authorization 2026-06-08 21:55:16 +01:00
snipe 144772cfbe Fixed tests 2026-06-08 21:41:22 +01:00
snipe 80c8aa41dc License Checkin (legacy): Fixes FD-55734 - License Single-Seat Checkin Uses Incorrect Permission Check 2026-06-08 20:59:10 +01:00
snipe 5658cd6dd4 Reports (legacy): Fixed FD-55739 - Use CSV escaping on legacy depreciation and license reports 2026-06-08 20:40:03 +01:00
snipe 374f426f0c Bulk checkin (with optional delete) users: Tightened the gates to check for more specific checkin permissions 2026-06-08 20:30:43 +01:00
snipe 2af0c237a9 Security+SAML: Check the redirect option for host validation 2026-06-08 20:29:59 +01:00
snipe dafd72af59 Users UI: Check whether the user can see assets, etc on user view page 2026-06-08 20:13:47 +01:00
snipe cbc6dc94a5 Licenses/Accessory/Consumables: Fixed FD-55732 - confirm FMCS on backend 2026-06-08 17:08:18 +01:00
snipe f74e7510c5 Licenses Checkout: Fixed FD-55733 - License Bulk Checkout Uses Incorrect Permission Check 2026-06-08 17:03:16 +01:00
snipe d87cd7cbb9 Users Merge: Fixed FD-55767 - added canEditAuthFields for users in merge 2026-06-08 16:57:05 +01:00
snipe 9a8cbd6e00 API: Fixed FD-55735- API Location Creation Bypasses FMCS Parent-Child Company Boundary Validation 2026-06-08 16:52:05 +01:00
snipe abc4363e83 Fixed FD-55839 - arbitrary file deletion 2026-06-08 16:48:18 +01:00
snipe df0ee6020a Fixed FD-55803 - escape links 2026-06-08 16:36:17 +01:00
snipe 53599544af Fixed FD-55751 - check for safe inline, force download otherwise 2026-06-08 16:31:52 +01:00
snipe b5ec9e080d QR Codes: Added QR codes for non-assets 2026-06-08 16:19:21 +01:00
snipe 8f98c8a862 Accessory checkouts: Fixed #19154 - get checkout company by way of parent accessory 2026-06-08 14:38:49 +01:00
snipe 0959d87534 Pint 2026-06-08 14:04:00 +01:00
snipe 1252681d55 API pagination: Fixed #19155 - API not paginating correctly with page=x, added tests 2026-06-08 14:03:47 +01:00
snipe 9bc4efa5ff Disable FK checks on seeder 2026-06-08 13:43:06 +01:00
snipe 5656e4f5b7 Fixed #19136 - translate strings on importer 2026-06-04 18:22:37 +01:00
snipe a966198a75 Fixed #19143 - dynamic URL for support URL on manufacturer 2026-06-04 18:13:42 +01:00
snipe 4ff214ac47 Component-ify companies 2026-06-04 16:53:34 +01:00
snipe 5169d174ad Merge pull request #19144 from uberbrady/#19096-and-#19095-company-and-location-and-groups-in-scim
Fix to SCIM companies, and some PHP errors around inheritance
2026-06-04 16:45:28 +01:00
snipe 9c849c337f Merge pull request #19103 from Godmartinz/google_chat_null_bug
[FD-55583] Fixed google webhook check in notification
2026-06-04 14:51:46 +01:00
snipe d0685464f6 Merge pull request #19142 from grokability/components-component-blade
Components component blade
2026-06-04 14:50:29 +01:00
snipe 10b5a8ef21 Use qty component 2026-06-04 14:42:25 +01:00
snipe f0a9a49753 Update components to use… blade components 2026-06-04 14:34:32 +01:00
Brady Wetherington 1afde946d2 Fix to SCIM companies, and some PHP errors around inheritance 2026-06-04 14:25:06 +01:00
snipe e8ba1feddc Fixed RDS database single transaction setting 2026-06-04 13:56:33 +01:00
snipe 18e9b5c5bf Merge pull request #19141 from grokability/consumables-blade-components
Updated consumables to use blade components
2026-06-04 13:48:00 +01:00
snipe f186dc20f6 Updated consumables to use blade components 2026-06-04 13:40:21 +01:00
snipe 80a722d465 Merge pull request #19140 from grokability/accessories-component-blades
Accessories component blades
2026-06-04 13:26:22 +01:00
snipe 765487f62e Added form-static blade 2026-06-04 13:23:14 +01:00
snipe 1d186fffaa Use display_name 2026-06-04 13:19:32 +01:00
snipe 6295b7726e Added breadcrumb trail for checkin/checkout/clone 2026-06-04 13:06:45 +01:00
snipe e7c45644b9 Blade-ify the accessories views 2026-06-04 13:00:31 +01:00
snipe 356a0d4c12 Fixed RB-20978 - Header may not contain more than a single header, new line detected
When edit() is called, it stores url()->previous() (the Referer header) as url.intended. When update() is called after, getRedirectOption() pulls that URL out of the session and uses it as a Location header. If that URL ever contains a \n or \r\n - whether from a crafted Referer header, a stale SAML RelayState, or a proxy quirk - PHP's header() function raises this exception as a header injection safeguard.
2026-06-03 20:38:50 +01:00
snipe 00d4d6c7a8 Don’t strip comany association if company_id is passed to the user (old integrations) 2026-06-03 12:30:08 +01:00
snipe 371d44b2a7 Fixed weird escaping in BS table export when text is hyperlinked 2026-06-03 11:59:19 +01:00
snipe 79732a9151 Fixed #19120 - added DB_DUMP_SINGLE_TRANSACTION to .env for RDS support 2026-06-03 11:40:33 +01:00
snipe a6e55fb462 Fixed #19130 - normalize null and 0 in permissions array, since they mean the same 2026-06-03 11:33:48 +01:00
snipe d032a51a3d Validate comapny exists 2026-06-03 11:26:23 +01:00
snipe 9c2495af29 Fixed #19131 - tighter validation for company_id/company_ids 2026-06-03 11:21:44 +01:00
snipe d7bc6c45f6 Merge pull request #19135 from grokability/#19133-add-optional-clear-name-to-quick-scan-and-bulk-audit
🎥 Fixed #19133 - added optional clear asset name to quick scan checkin/audit
2026-06-03 11:17:12 +01:00
snipe 4382e01f57 Added tests 2026-06-03 10:52:11 +01:00
snipe bab5294399 Fixed #19133 - added optional clear asset name to quick scan checkin/audit 2026-06-03 10:52:04 +01:00
snipe a161fa8519 Fix company syncing in bulk editing users
If the target user belongs to [A, B, C] and the acting admin belongs to [B, C], only B and C get detached. Company A — which the acting admin can't see — is left untouched.
2026-06-03 10:36:46 +01:00
snipe 5e5bd7a17d Merge pull request #19132 from marcusmoore/fixes/19128-settings-markdown
Fixed #19128: Rendering on general settings page
2026-06-02 21:09:51 +01:00
Marcus Moore 285717ab12 Closing icon properly 2026-06-02 10:01:23 -07:00
snipe 81d91da0b8 Merge pull request #19127 from marcusmoore/55765-supplier-note-length
Bump note length validation for supplier model
2026-06-02 07:57:45 +01:00
Marcus Moore b017e9382f Bump note length validation for supplier 2026-06-01 16:53:36 -07:00
snipe eb5334e865 Fixed #18953 - removed excel as dropdown option for BS-table export
The 'excel' export type in the bootstrap-table config generates an HTML document with MSO namespace tags disguised as an .xls file.

Excel recognizes the mismatch and warns. The 'xlsx' type (also in the list) uses SheetJS to generate a real .xlsx file.
2026-06-01 18:43:10 +01:00
snipe 01b1c3923d Fixed #19119 - updated structure for accessort export, added tests 2026-06-01 18:25:43 +01:00
snipe 780fb76af8 Added jfif to extension list in config 2026-06-01 17:29:02 +01:00
snipe ab90fc16e0 Merge pull request #19118 from grokability/check-in-and-delete-cli-refactor
Check in and delete by company via command line
2026-05-30 18:27:23 +01:00
snipe 990c50c5b9 Prevent the admin (acting) user from still being associated with a deleted company (if deleting the comapny was selected) 2026-05-30 18:13:23 +01:00
snipe 2e91b3dc9a Remove the pivot company record for asking user if the “delete company” option is selected 2026-05-30 17:59:35 +01:00
snipe 211bd02786 Small UI improvements 2026-05-30 17:52:06 +01:00
snipe e8d000a17a Restrict admin user search to superadmins only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:35:39 +01:00
snipe 8fc373abfc Ask to delete the companies themselves, suppress backup noise 2026-05-30 12:29:02 +01:00
snipe a473ca737e Added test 2026-05-30 12:26:11 +01:00
snipe ff6fc68981 Added mailer 2026-05-30 12:26:04 +01:00
snipe f133a67550 Added email blade 2026-05-30 12:25:36 +01:00
snipe b0a6cdc29f Added delete cli prompt tool 2026-05-30 11:47:52 +01:00
snipe edcb429366 Fixed test 2026-05-30 10:18:46 +01:00
snipe ba5a674526 Fixed FD-55720 check on legacy route 2026-05-30 10:04:00 +01:00
snipe e84496f8b1 Fixed kit gate 2026-05-30 09:40:37 +01:00
snipe 5f9212383a Merge pull request #19117 from grokability/#19086-added-markdown-custom-fields
🎥 Fixed #19086 - added markdown textarea custom fields
2026-05-30 09:30:01 +01:00
snipe a5493f11bc Fixed weird HTML on showing encrypted fields on click 2026-05-30 09:13:11 +01:00
snipe ce434b3d04 Added thead to remove the weird dupe footer when we’re using icon headers 2026-05-29 20:53:54 +01:00
snipe ade07b411b Added helper and CSS 2026-05-29 17:37:12 +01:00
snipe 3868e469c0 Merge pull request #19104 from Godmartinz/gh19083-assgnedTo-displayname-split
Adds #19083 display name as an option for label field options
2026-05-29 12:22:40 +01:00
snipe ea939acbd3 Support multi-company in SCIM sync 2026-05-29 11:37:11 +01:00
snipe 522544c131 Fixed #19095 and #19096 - SCIM updates in Azure/Entra 2026-05-29 11:22:43 +01:00
snipe 445fb6f253 Merge remote-tracking branch 'origin/master' into develop 2026-05-29 10:58:33 +01:00
snipe 7bf8fd5eeb Fixed #19106 - tighten up user accessor to treat null and empty string the same 2026-05-29 10:55:53 +01:00
snipe c758fb4c83 Pint 2026-05-29 10:50:31 +01:00
snipe 4145f64399 Exclude current id on checkin pages 2026-05-29 10:50:10 +01:00
snipe 4120ab6fe6 Pint 2026-05-29 10:40:21 +01:00
snipe 0170fb7711 Added test for location scoping 2026-05-29 10:39:03 +01:00
snipe 42df2f6c31 One more fix for #19112 2026-05-29 09:37:23 +01:00
snipe 9b522b69ff Fixed #19112 - company list disabled 2026-05-29 09:13:03 +01:00
snipe 135db70b0f Fixed #19100 - check all companies a user belongs to for asset assignment 2026-05-29 08:50:34 +01:00
snipe 048e97f9a9 Added query count test 2026-05-29 08:34:34 +01:00
snipe 18d8f257ee Merge pull request #19108 from grokability/fixed-fd-55710-flattern-queries
Fixed FD-55710 - flatten EXIST queries
2026-05-29 01:42:31 +01:00
snipe ec67195014 Removed a few duplicate queries 2026-05-29 01:34:11 +01:00
snipe 0d745ad10f Added view composer forn sidebar counts, removed sidebar middleware 2026-05-29 01:30:34 +01:00
snipe 89ce71b350 Flatten queries 2026-05-29 00:54:03 +01:00
snipe 63c1f7922f Added test 2026-05-29 00:53:48 +01:00
snipe 5809ac7997 Removed $with 2026-05-29 00:53:21 +01:00
Godfrey M 92b6e46249 adds display name as an option for labels 2026-05-28 11:01:26 -07:00
Godfrey M 46c11d8599 add nullsafe operator to item location in google chat message 2026-05-28 09:44:37 -07:00
snipe 7651365ff6 Merge pull request #19102 from Godmartinz/update-asset_not_deployable_to_translation_choice
fixes not deployable translation usage
2026-05-28 17:17:59 +01:00
Godfrey M 35caa0e68d fix translation to use choice 2026-05-28 09:00:23 -07:00
snipe e0a7fe443d Merge remote-tracking branch 'origin/develop' 2026-05-28 12:35:48 +01:00
snipe c31190a128 Merge pull request #19097 from grokability/fd-55359-css-validation
Fixed FD-55359 - adds CSS color validation
2026-05-28 12:35:24 +01:00
snipe de50ec30b7 Pint, of course 2026-05-28 12:25:22 +01:00
snipe c0fe308d7d Fixed FD-55359 - sanitize CSS 2026-05-28 12:25:12 +01:00
snipe 0a20141b7c Removed bulk action for deleted 2026-05-28 11:29:49 +01:00
snipe 4d0282ca0a Merge remote-tracking branch 'origin/develop' 2026-05-28 11:06:31 +01:00
snipe e61143f746 Allow checkin from deleted view 2026-05-28 11:06:13 +01:00
snipe 69dc91d225 Show deleted_at date in table if looking at deleted assets 2026-05-28 10:45:07 +01:00
snipe 6f1c49e14d Fixed #19089 - show uploads in activity report for companies, models, etc 2026-05-28 10:14:30 +01:00
snipe 78acc3685d Updated icons 2026-05-28 08:52:01 +01:00
snipe bf5013e527 Prod assets 2026-05-27 15:21:24 +01:00
snipe cbd961e922 Merge remote-tracking branch 'origin/develop' 2026-05-27 15:20:55 +01:00
snipe fa26e23383 Fixed #19088 - added suppliers transformer 2026-05-27 15:20:26 +01:00
snipe 7abe1bed50 Merge remote-tracking branch 'origin/develop' 2026-05-27 10:46:49 +01:00
snipe 155df0a94d Fixed multi-select edge case 2026-05-27 10:36:19 +01:00
snipe 4d06e81768 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2026-05-27 09:42:05 +01:00
snipe 9bf1e2401d Bumped minor release 2026-05-27 09:41:00 +01:00
snipe 4edf40acaf Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2026-05-27 09:26:55 +01:00
snipe a54ed750a3 Fixed if/else 2026-05-27 09:23:05 +01:00
snipe c02a6c105a Bumped version 2026-05-26 23:24:04 +01:00
snipe 4d2416ab96 Bumped mid-version 2026-05-26 23:21:55 +01:00
snipe 61ae30528a Merge pull request #19079 from marcusmoore/composer-lock-update
Updated composer lock file
2026-05-26 23:20:06 +01:00
Marcus Moore e883eb70b9 Update lock file
composer update --lock
2026-05-26 15:00:33 -07:00
snipe a5b1379cdb Removed skip mysql rule in tests 2026-05-26 22:52:03 +01:00
snipe ef64210ed2 Allow querying on cusotm fields fieldname directly by column name 2026-05-26 22:51:46 +01:00
snipe f29846ec20 Pint 2026-05-26 20:54:51 +01:00
snipe d2b4d84374 Updated translations 2026-05-26 20:51:26 +01:00
snipe dfe3f5fb9f Merge pull request #19045 from Godmartinz/gh-18990
adds 3rd pluralization to unaccepted_profile_warning
2026-05-26 19:49:22 +01:00
Godfrey M 8dbb19eb82 only change the en-US translation 2026-05-26 10:30:04 -07:00
snipe 45cdff6920 Merge pull request #19072 from grokability/security-fixes
Misc security fixes
2026-05-26 14:35:45 +01:00
snipe c25d56ea85 Refactored licenses controller to use a pessimistic lock inside a transaction 2026-05-26 14:24:02 +01:00
snipe f92a9a6cc6 Made isFullMultipleCompanySupportEnabled a public method 2026-05-26 14:23:32 +01:00
snipe 988729fbeb Skip user records if user exists in another company if FMCS is enabled 2026-05-26 13:36:02 +01:00
snipe e00f7b5b67 Added tests 2026-05-26 13:31:33 +01:00
snipe 39fbe98313 Fixed overwriting ownership of import 2026-05-26 13:11:30 +01:00
snipe 46d5234fd7 Throttle TOTP requests 2026-05-26 13:04:26 +01:00
snipe dd4117bd5b Tighter guard on user imports auth fields if the user is authenticated (aka not run via cli) 2026-05-26 12:56:10 +01:00
snipe 4dcd5190df Merge pull request #19025 from grokability/move-api-singletons-into-middleware
Move API singletons from SettingServiceProvider into middleware
2026-05-26 12:07:03 +01:00
snipe 48728e83b2 Merge pull request #19051 from grokability/_multi-company-support
Allow user to be a member of multiple companies
2026-05-26 12:03:24 +01:00
snipe 087b895bba Merge branch 'develop' into _multi-company-support
# Conflicts:
#	app/Http/Controllers/Users/BulkUsersController.php
#	app/Presenters/LicensePresenter.php
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-05-26 11:53:48 +01:00
snipe 2ed28f7f7a Dev manifest 2026-05-26 11:48:34 +01:00
snipe 9f50328da2 Merge hell :( 2026-05-26 11:48:15 +01:00
snipe 3737b34913 Back-patch security fixes 2026-05-26 11:36:29 +01:00
snipe aa0eb24e80 Fixed merge mess 2026-05-26 11:15:30 +01:00
snipe 9d012dd06d WTF 2026-05-26 11:14:27 +01:00
snipe df28c80553 Dev assets 2026-05-26 11:03:55 +01:00
snipe 2a3a3f7818 Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 11:03:55 +01:00
snipe 15cb7993f6 Moved password visibility toggle to snipeit.js 2026-05-26 11:03:55 +01:00
snipe 15529a0c9c Bulk checkin license seats 2026-05-26 11:03:55 +01:00
snipe d2c30dd08c Dev assets 2026-05-26 11:03:55 +01:00
snipe 972b27140a Updated assets 2026-05-26 11:03:55 +01:00
snipe cac13dd949 Dev assets 2026-05-26 11:03:55 +01:00
snipe 112bf498e6 Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 11:03:55 +01:00
snipe 02488a62c1 Updated controllers 2026-05-26 11:03:55 +01:00
snipe f5313f6ec0 Updated dev assets 2026-05-26 11:03:55 +01:00
snipe 3206549170 Moved password visibility toggle to snipeit.js 2026-05-26 11:03:48 +01:00
snipe 59b621500f Bulk checkin license seats 2026-05-26 11:03:40 +01:00
snipe cd5716d66d Fixed FD-54447 - superuser on user bulk edit check for groups 2026-05-26 11:03:07 +01:00
snipe 6a68a38d71 Dev assets 2026-05-26 11:02:44 +01:00
snipe f23ea5ce8f Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 11:02:35 +01:00
snipe c893b69b5f Fixed merge conflict 2026-05-26 10:52:04 +01:00
snipe 269e6c4ef6 Dev assets *again* 2026-05-26 10:49:32 +01:00
snipe a0ab9d3a80 Updated dev assets 2026-05-26 10:49:06 +01:00
snipe cdd72cf372 Dev assets 2026-05-26 10:49:05 +01:00
snipe e38b8cdd68 Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 10:49:05 +01:00
snipe c44cb23dea Updated JS to add the array endpoint for company_ids (plural) 2026-05-26 10:49:05 +01:00
snipe 84bdfa98d1 Updated dev assets 2026-05-26 10:49:05 +01:00
snipe f3055e7442 Moved password visibility toggle to snipeit.js 2026-05-26 10:48:54 +01:00
snipe 9c36ade1e2 Bulk checkin license seats 2026-05-26 10:48:44 +01:00
snipe 4127c6a0c0 Fixed FD-54447 - superuser on user bulk edit check for groups 2026-05-26 10:48:24 +01:00
snipe c133c869ae Dev assets 2026-05-26 10:47:48 +01:00
snipe d74197aacc Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 10:47:40 +01:00
snipe c870dd0dae Updated assets 2026-05-26 10:41:48 +01:00
snipe 6d1d89105d Updated JS to add the array endpoint for company_ids (plural) 2026-05-26 10:41:30 +01:00
snipe f3a4f5edaa Allow query string or parameter for byserial 2026-05-26 10:41:23 +01:00
snipe 8f61d1e729 Add @CybotTM as a contributor 2026-05-26 10:41:23 +01:00
Sebastian Mendel 4782734ed4 Fix dead QUEUE_DRIVER env var name in templates and test config
`config/queue.php` reads `env('QUEUE_CONNECTION', 'sync')` since the
Laravel Shift in v6.0.0 (commit cc3c59bf97), but seven .env templates
and phpunit.xml still set `QUEUE_DRIVER` — the old Laravel <5.7 name
that the framework no longer reads. The default is `sync` anyway so
the gap is silent; but anyone copying these templates and trying to
enable an async driver (redis, database, beanstalkd, sqs) finds their
setting silently ignored.

Rename across:
- .env.example
- .env.docker
- .env.dev.docker
- .env.dusk.example
- docker/docker-secrets.env
- docker/docker.env
- phpunit.xml (XML <env> tag)

No code change. Default value `sync` preserved everywhere.

---
Disclosure: drafted with a coding agent's help.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
2026-05-26 10:41:23 +01:00
chrisnox a9d65f7e81 Update README.md 2026-05-26 10:41:22 +01:00
chrisnox e59f5d92a4 Update README.md 2026-05-26 10:41:22 +01:00
snipe 93576fc435 Include table prefixes on OAuth Clients 2026-05-26 10:41:22 +01:00
snipe 221ae337f2 Nullsafe on requesting user 2026-05-26 10:41:22 +01:00
snipe 1b1d1f77d5 Account for deleted adminuser in journal note for assets 2026-05-26 10:41:22 +01:00
snipe d7ef85235c Fixed flaky test 2026-05-26 10:41:22 +01:00
snipe 3a714c3ef6 Updated dev assets 2026-05-26 10:41:22 +01:00
snipe 2a69bf903e Fixed parenthases 2026-05-26 10:41:04 +01:00
snipe 23c93473c8 Moved password visibility toggle to snipeit.js 2026-05-26 10:41:03 +01:00
snipe 266f04b04c Fixed #19042 - use markdown for demo settings 2026-05-26 10:40:46 +01:00
snipe 9f64a90a45 Added newline 2026-05-26 10:40:46 +01:00
snipe baacf171f4 More pint compliance 2026-05-26 10:40:46 +01:00
snipe 109e7fff68 Bumped hash and improved the version console command 2026-05-26 10:40:46 +01:00
snipe 816868cfc8 Don’t show the serial field if the license does not have one 2026-05-26 10:40:46 +01:00
snipe c21b44aded Bumped hash and added pre-version 2026-05-26 10:40:46 +01:00
snipe 0565ec22cb Fixed #19057 - update last login on google auth 2026-05-26 10:40:46 +01:00
snipe 17fc52a237 Added to assets license tab as well 2026-05-26 10:40:46 +01:00
snipe f535b8ffd2 Bulk checkin license seats 2026-05-26 10:40:45 +01:00
snipe 221e495974 Show number of selected, use checkboxEnabledFormatter on simple toolbars 2026-05-26 10:40:45 +01:00
snipe 8f06902230 Use intended() for redirect back to where you were 2026-05-26 10:40:45 +01:00
snipe ff95416a90 Added bulk checkin controller method 2026-05-26 10:40:45 +01:00
snipe b1491b524d Added strings (to do: combine these maybe?) 2026-05-26 10:40:45 +01:00
snipe 703c5ca4ed Added checkin option to bulk asset menu 2026-05-26 10:40:45 +01:00
snipe ce6c7146ea Added blade 2026-05-26 10:40:45 +01:00
snipe e1e614ebc8 Added route 2026-05-26 10:40:45 +01:00
snipe 7918653413 Created test 2026-05-26 10:40:45 +01:00
snipe a23bc89607 Graceful redirect if the user is not allowed 2026-05-26 10:40:45 +01:00
snipe 6f25f80260 Added test 2026-05-26 10:40:45 +01:00
snipe 6da5f2e19b Fixed FD-55585 - check canceled_by_admin more closely 2026-05-26 10:40:45 +01:00
snipe 518351eba1 Fixed FD-54447 - superuser on user bulk edit check for groups 2026-05-26 10:40:45 +01:00
snipe ce0ce8688b Fixed #19052 - PUT next_audit_date does not produce audit log entry 2026-05-26 10:40:26 +01:00
snipe 43be1e8364 Fixed FD-55580 - added selectlist gate and tests 2026-05-26 10:40:26 +01:00
snipe 6e749d34a4 Dev assets 2026-05-26 10:40:25 +01:00
snipe 6e55d78c19 Fixed tests 2026-05-26 10:40:02 +01:00
snipe 884dc926fe Fixed typo 2026-05-26 10:40:02 +01:00
snipe a383033ffa Chekc auth before assigning S3 temporary link 2026-05-26 10:40:02 +01:00
snipe 67fa473281 Pint 2026-05-26 10:40:02 +01:00
snipe 28b3e34a84 Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-26 10:40:01 +01:00
snipe 72383fdbd7 Fixed RB-4158 - handle numeric values better 2026-05-26 10:39:47 +01:00
Joël Pittet 44f9101d93 Remove direct symfony crawler dev dependencies 2026-05-26 10:39:47 +01:00
snipe 9cab197651 Fixed RB-4138 - json validation on wonky params 2026-05-26 10:39:47 +01:00
snipe db4fcff1f3 Fixed RB-4136 - array to string conversion when people throw random crap at the API 2026-05-26 10:39:47 +01:00
snipe ea820ce99a Fixed rollbar for labels 2026-05-26 10:39:47 +01:00
snipe d21ff001bf Fixed RB-4131 depreciation name error 2026-05-26 10:39:47 +01:00
snipe 69ddde697a Merge pull request #19061 from netresearch/ext-exif-required
Declare ext-exif as a required PHP extension
2026-05-26 10:04:41 +01:00
snipe 3f72d0afd8 Allow query string or parameter for byserial 2026-05-26 10:03:38 +01:00
snipe 1d209155f2 Add @CybotTM as a contributor 2026-05-26 10:03:38 +01:00
snipe 20b2d22991 Merge pull request #19064 from netresearch/upstream-queue-connection-rename
Fix dead QUEUE_DRIVER env var name in templates and test config
2026-05-26 10:02:19 +01:00
Sebastian Mendel e12ac03dd8 Add exif to Dockerfile.fpm-alpine extension list
Matches Dockerfile.alpine which already lists php84-exif explicitly.

---
Disclosure: drafted with a coding agent's help.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
2026-05-25 21:26:37 +02:00
Sebastian Mendel 9c73b26cd1 Declare ext-exif as a required PHP extension
ImageUploadRequest::__construct() unconditionally calls Image::make(...)
->orientate() on every uploaded image (asset photos, user avatars,
company logos, etc.). Intervention\Image\Commands\ExifCommand throws
NotSupportedException when ext-exif is unavailable; ImageUploadRequest
catches NotReadableException but not NotSupportedException, so the
exception surfaces to the user as an unhandled 500 for any image
upload that carries an EXIF Orientation tag (i.e. virtually every
smartphone photo).

Add ext-exif to the require block so composer install fails fast
instead of letting the gap surface as a runtime 500.

---
Disclosure: drafted with a coding agent's help while investigating
which PHP extensions a containerized Snipe-IT deployment needs but
the package manifest doesn't declare.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
2026-05-25 21:26:37 +02:00
Sebastian Mendel cabc842f52 Fix dead QUEUE_DRIVER env var name in templates and test config
`config/queue.php` reads `env('QUEUE_CONNECTION', 'sync')` since the
Laravel Shift in v6.0.0 (commit cc3c59bf97), but seven .env templates
and phpunit.xml still set `QUEUE_DRIVER` — the old Laravel <5.7 name
that the framework no longer reads. The default is `sync` anyway so
the gap is silent; but anyone copying these templates and trying to
enable an async driver (redis, database, beanstalkd, sqs) finds their
setting silently ignored.

Rename across:
- .env.example
- .env.docker
- .env.dev.docker
- .env.dusk.example
- docker/docker-secrets.env
- docker/docker.env
- phpunit.xml (XML <env> tag)

No code change. Default value `sync` preserved everywhere.

---
Disclosure: drafted with a coding agent's help.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
2026-05-25 21:26:17 +02:00
snipe d099cbd8e5 Merge pull request #19067 from chrisnox/patch-1
Update README.md
2026-05-25 15:03:24 +01:00
snipe cfa8069953 Merge remote-tracking branch 'origin/develop' 2026-05-25 13:35:12 +01:00
snipe 45df8ea55e Include table prefixes on OAuth Clients 2026-05-25 13:34:57 +01:00
chrisnox 33846b0d61 Update README.md 2026-05-25 01:35:25 +02:00
chrisnox b7df1dcefb Update README.md 2026-05-25 01:35:25 +02:00
snipe 3b0278bd3a Nullsafe on requesting user 2026-05-23 02:11:36 +01:00
snipe b3be2baf40 Merge remote-tracking branch 'origin/develop' 2026-05-23 01:54:06 +01:00
snipe 3cff19f9ca Account for deleted adminuser in journal note for assets 2026-05-23 01:51:13 +01:00
snipe 4380a46d1c Fixed flaky test 2026-05-23 01:42:49 +01:00
Godfrey M f4b9138a3f forgot a comma 2026-05-22 10:41:30 -07:00
Godfrey M f5dbf27592 adds variations for lithuanian few and many translation choices 2026-05-22 10:39:52 -07:00
snipe 069912d051 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-05-22 13:06:41 +01:00
snipe 6a1c3e29d0 Updated dev assets 2026-05-22 13:05:41 +01:00
snipe 9fc37cf6b9 Fixed parenthases 2026-05-22 13:03:20 +01:00
snipe b37adb8c49 Moved password visibility toggle to snipeit.js 2026-05-22 13:00:18 +01:00
snipe 86245ad4ae Merge remote-tracking branch 'origin/develop' 2026-05-22 12:44:37 +01:00
snipe e3afe3b74d Fixed #19042 - use markdown for demo settings 2026-05-22 12:44:26 +01:00
snipe c8bafdad79 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2026-05-22 12:28:56 +01:00
snipe ee3ebe32e2 Added newline 2026-05-22 12:28:14 +01:00
snipe 3060fd305b More pint compliance 2026-05-22 12:27:09 +01:00
snipe 72666cdd47 Bumped hash and improved the version console command 2026-05-22 12:25:36 +01:00
snipe 4fbd6b2f15 Don’t show the serial field if the license does not have one 2026-05-22 12:14:52 +01:00
snipe 10ee84cb26 Bumped hash and added pre-version 2026-05-22 12:05:57 +01:00
snipe c94fce2367 Merge remote-tracking branch 'origin/develop' 2026-05-22 12:00:57 +01:00
snipe 432e625186 Fixed #19057 - update last login on google auth 2026-05-22 12:00:47 +01:00
snipe 653b1327cb Merge remote-tracking branch 'origin/develop' 2026-05-22 11:56:32 +01:00
snipe d011ad3dde Merge pull request #19058 from grokability/bulk-seat-checkin-toolbar
🎥 Bulk checkin license seats
2026-05-22 11:56:19 +01:00
snipe 54d01409dc Added to assets license tab as well 2026-05-22 11:45:53 +01:00
snipe d5ce5a82de Bulk checkin license seats 2026-05-22 11:30:22 +01:00
snipe 849b217300 Merge remote-tracking branch 'origin/develop' 2026-05-22 10:44:13 +01:00
snipe b224cc636c Show number of selected, use checkboxEnabledFormatter on simple toolbars 2026-05-22 10:44:00 +01:00
snipe 371f096e54 Merge remote-tracking branch 'origin/develop' 2026-05-22 09:31:44 +01:00
snipe 5efb21eb0b Merge pull request #19056 from grokability/bulk-checkin-assets-from-ui
Bulk checkin assets from UI
2026-05-22 09:31:29 +01:00
snipe ec24da12a1 Use intended() for redirect back to where you were 2026-05-21 22:28:14 +01:00
snipe 6aa8d8e772 Added bulk checkin controller method 2026-05-21 22:04:47 +01:00
snipe 424ed48d06 Added strings (to do: combine these maybe?) 2026-05-21 22:04:33 +01:00
snipe 3c44ce8682 Added checkin option to bulk asset menu 2026-05-21 22:04:00 +01:00
snipe 948dadc333 Added blade 2026-05-21 22:03:36 +01:00
snipe 0ff2fb5cff Added route 2026-05-21 22:03:19 +01:00
snipe c0773772f4 Created test 2026-05-21 22:03:11 +01:00
snipe 3c1b18919a Graceful redirect if the user is not allowed 2026-05-21 21:12:35 +01:00
snipe 72a11113e7 Merge remote-tracking branch 'origin/develop' 2026-05-21 20:20:17 +01:00
snipe 978c8f81a5 Added test 2026-05-21 20:15:50 +01:00
snipe ac2162113d Fixed FD-55585 - check canceled_by_admin more closely 2026-05-21 20:10:26 +01:00
snipe b0635f24db Merge remote-tracking branch 'origin/develop' 2026-05-21 16:12:50 +01:00
snipe 34b4cf12e2 Fixed FD-54447 - superuser on user bulk edit check for groups 2026-05-21 16:12:19 +01:00
snipe fec0a1b2b5 Fixed #19052 - PUT next_audit_date does not produce audit log entry 2026-05-21 16:11:08 +01:00
snipe 96088c416e Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-05-21 15:26:47 +01:00
snipe c8f3e833e5 Prod assets 2026-05-21 15:26:15 +01:00
snipe 4f943d4a7a Fixed FD-55580 - added selectlist gate and tests 2026-05-21 15:25:09 +01:00
snipe 37361ef52f Dev assets 2026-05-21 15:09:15 +01:00
snipe 5307a44fab Merge remote-tracking branch 'origin/develop' 2026-05-21 15:06:36 +01:00
snipe d97f579761 Fixed tests 2026-05-21 15:06:19 +01:00
snipe afc287b607 Fixed typo 2026-05-21 15:06:19 +01:00
snipe ded6515cbc Chekc auth before assigning S3 temporary link 2026-05-21 15:06:19 +01:00
snipe 1af9b42d82 Pint 2026-05-21 15:06:19 +01:00
snipe 403f9c848b Disallow ldap_import and activated in bulk editing users if user doesn’t have permission 2026-05-21 15:06:19 +01:00
snipe 480d252173 Fixed RB-4158 - handle numeric values better 2026-05-21 15:06:19 +01:00
snipe d329e5f862 Merge pull request #19053 from ubc-cpsc/fix/update-symfony-dev-dependencies
Remove direct symfony dom-crawler and css-selector dev dependencies
2026-05-21 13:55:26 +01:00
Joël Pittet d9bc110868 Remove direct symfony crawler dev dependencies 2026-05-20 18:59:45 -07:00
snipe e7c80b89eb Scope assets, locations, etc to the target, not the admin 2026-05-20 19:10:51 +01:00
snipe 50ba979840 Nicer formatting on user edit page when you cannot edit auth fields 2026-05-20 18:52:40 +01:00
snipe 6fd834e4d2 Tweaked light-label a little more 2026-05-20 18:48:17 +01:00
snipe 2d6eb5d80a Merge remote-tracking branch 'origin/develop' 2026-05-20 18:08:38 +01:00
snipe f74fedb226 Fixed RB-4138 - json validation on wonky params 2026-05-20 18:08:28 +01:00
snipe 90e2c105cd Merge remote-tracking branch 'origin/develop' 2026-05-20 18:05:03 +01:00
snipe 5976e93de2 Fixed RB-4136 - array to string conversion when people throw random crap at the API 2026-05-20 18:04:43 +01:00
snipe 34101c148f Fixed rollbar for labels 2026-05-20 18:02:34 +01:00
snipe 048a46b317 Fixed RB-4131 depreciation name error 2026-05-20 16:20:13 +01:00
snipe 6ae09e15fb Updated tests and transformers 2026-05-20 16:17:02 +01:00
snipe f03b27ec88 Updated validator to accept single company_id or array 2026-05-20 15:08:53 +01:00
snipe cc1e0d82dd Tweaked label CSS 2026-05-20 15:08:13 +01:00
snipe f233bd2d01 New link formatter for BS tables 2026-05-20 15:07:11 +01:00
snipe 7a8b22df26 Updated users select2 to use new data-dash 2026-05-20 15:07:00 +01:00
snipe 17df4a08a7 Updated JS to add the array endpoint for company_ids (plural) 2026-05-20 15:04:02 +01:00
snipe c377b41198 Updated controllers 2026-05-20 14:58:18 +01:00
Godfrey M 0c59ca70cf adds 3rd pluralization to unaccepted_profile_warning 2026-05-19 15:35:14 -07:00
snipe e9e9dfeeab Load companies to avoid n+1 2026-05-19 14:40:39 +01:00
snipe f8c084cde7 This is hacky - might need to revisit 2026-05-19 14:40:20 +01:00
snipe 8f7fa6c0f5 Use new label for view-assets (not sure if I like this yet) 2026-05-19 14:39:53 +01:00
snipe f381362130 Tweaked company select for multiple if FMCS is enabled 2026-05-19 14:39:27 +01:00
snipe bef4a50720 Use multi-select in bulk user edit 2026-05-19 14:39:04 +01:00
snipe 2a93de675f Handle pipe delimited companyes in user importer 2026-05-19 14:38:52 +01:00
snipe e5f41f8f17 Use more common companies string 2026-05-19 14:38:28 +01:00
snipe b9da8ee55c Use multi-select for create user modal 2026-05-19 14:37:26 +01:00
snipe bf525f7213 Tweaked label + style for table labels (say that 100 times fast) 2026-05-19 14:37:08 +01:00
snipe c9ef163142 Added trans_choice option for company/companies 2026-05-19 14:36:36 +01:00
snipe feb3bd58cf Fixed wrong reference in fallback 2026-05-19 14:31:17 +01:00
snipe f9288e450b Update seeder 2026-05-19 14:24:24 +01:00
snipe 541128dd7a Updated tranformers 2026-05-19 14:23:44 +01:00
snipe 23b9c881ad Updated presenter 2026-05-19 14:16:45 +01:00
snipe cacd6f7e9b Add pipe separator to import more than one company for a user 2026-05-19 13:26:38 +01:00
snipe 4db4314f18 Added getCurrentUserCompanyIds (plural) to Company model 2026-05-19 13:26:06 +01:00
snipe 51aa66a77d Changed formatting just a bit 2026-05-19 13:24:49 +01:00
snipe aa0b491080 Added tests 2026-05-19 13:04:16 +01:00
snipe c01c9201ee Updated to use multiple select on users edit/create 2026-05-19 13:04:05 +01:00
snipe 0ad1a5b6ba Changed size of divs 2026-05-19 13:02:57 +01:00
snipe 95909d552a Show the list of companies if the infoPanelObj has more than one 2026-05-19 11:22:24 +01:00
snipe a159c3b84e Scary scary migration
We don’t actually drop the company_id field here, but later code will stop using it on the users table. This migration creates and populates the pivot table
2026-05-19 11:16:36 +01:00
snipe 875b0bbdec Merge remote-tracking branch 'origin/develop' 2026-05-19 08:38:14 +01:00
snipe be5b74af90 Fixed RB-21535 - use withTrashed for maintenances on Activity Report 2026-05-19 08:38:03 +01:00
snipe be1f1bd1c5 Merge remote-tracking branch 'origin/develop' 2026-05-19 08:09:13 +01:00
snipe 5dcc8efcca Check for IDs in bulk actions 2026-05-19 08:08:59 +01:00
snipe c9be696c84 Merge remote-tracking branch 'origin/develop' 2026-05-18 20:14:54 +01:00
snipe 8748ddffd8 Merge pull request #19039 from grokability/add-rp-to-maintenances
🖼️ Add custom maintenance types, responsible party and assigned to to maintenances
2026-05-18 20:14:20 +01:00
snipe e19a9b23e5 Merge pull request #19043 from marcusmoore/fixes/18624-license-checkout-button-url
Fixed #18624: Remove trailing slashes in license urls
2026-05-18 20:13:34 +01:00
Marcus Moore 5752fe68f0 Remove trailing slash in urls 2026-05-18 12:03:50 -07:00
snipe 187f160b21 Merge remote-tracking branch 'origin/develop' 2026-05-18 16:31:34 +01:00
snipe a6bbf0edf0 Used lower PHP requirement in composer lock 2026-05-18 16:31:22 +01:00
snipe 8908b67b3d Merge remote-tracking branch 'origin/develop' 2026-05-18 16:26:27 +01:00
snipe 4a0797d59f Fixed RB-21533 - Undefined variable $indirectItemsCount on bulk print, added test 2026-05-18 16:26:15 +01:00
snipe 07f1f247de Merge pull request #19041 from grokability/dependabot/github_actions/develop/github/codeql-action-4
Bump github/codeql-action from 3 to 4
2026-05-18 16:18:55 +01:00
snipe 4373f761c7 Merge remote-tracking branch 'origin/develop' 2026-05-18 16:18:04 +01:00
snipe 559491d31a Updated composer 2026-05-18 16:17:52 +01:00
snipe 1f51155c92 Updated string for clarity (notes vs journal notes) 2026-05-18 16:15:23 +01:00
snipe 58f7370935 Updated test with correct hash 2026-05-18 16:13:36 +01:00
snipe 043292ff15 Finishing touches 2026-05-18 16:13:13 +01:00
snipe a04bf04900 Mark type as required 2026-05-18 16:11:16 +01:00
snipe 9408f4005c Updated migration 2026-05-18 16:06:37 +01:00
snipe f9567af55a Added/updated tests 2026-05-18 16:01:27 +01:00
snipe 62a0c3764e Pass URL param to the index 2026-05-18 15:45:59 +01:00
snipe 66cab56c47 Added notes 2026-05-18 15:45:42 +01:00
snipe dfa8590a65 Added type to breadcrumbs 2026-05-18 15:42:52 +01:00
dependabot[bot] ee10cc970f Bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-18 14:36:24 +00:00
snipe 96a42d0f33 Added a few more scopes 2026-05-18 15:32:00 +01:00
snipe 57b257057a Moved scopes 2026-05-18 15:12:18 +01:00
snipe c45040818d Move the previous query scopes into the builder 2026-05-18 15:12:08 +01:00
snipe fe2d599099 Reorder bs table buttons 2026-05-18 15:00:21 +01:00
snipe 1d2ba0a8c1 Added builder for scopes 2026-05-18 14:59:11 +01:00
snipe 63454f8c63 Respect the view encrypted custom fields permission 2026-05-18 14:18:58 +01:00
snipe 8e9bd5dbb1 Merge remote-tracking branch 'origin/develop' 2026-05-18 13:54:48 +01:00
snipe 87d6328fb8 One more test tweak 2026-05-18 13:54:30 +01:00
snipe 5020aec71a Added action_type to tests 2026-05-18 13:51:04 +01:00
snipe 39ff553b3e Fixed encrypted custom fields escaping 2026-05-18 13:49:51 +01:00
snipe aea3877718 Updated gate 2026-05-18 13:39:33 +01:00
snipe dbaa900444 Fixed redirect on assets 2026-05-18 13:29:32 +01:00
snipe 751541a54d Merge remote-tracking branch 'origin/develop' 2026-05-18 13:12:22 +01:00
snipe 26382eb0a1 Better handle manufacturer in info panel 2026-05-18 13:12:13 +01:00
snipe 3972799e56 Merge remote-tracking branch 'origin/develop' 2026-05-18 12:47:05 +01:00
snipe 50baed175f Removed elibyy/tcpdf-laravel - we call it directly now
- The wrapper package is no longer a dependency
- PDF generation (labels, checkout acceptance) continues to work via the raw TCPDF class
2026-05-18 12:46:26 +01:00
snipe d870b3625b This is hacky - need to figure out what’s the root problem 2026-05-18 12:42:53 +01:00
snipe ae2e51c66c Use CarbonInterval for token expiration 2026-05-18 12:41:52 +01:00
snipe db2afd0dc7 Merge remote-tracking branch 'origin/develop' 2026-05-18 12:33:42 +01:00
snipe 826bbe37c9 Fixed #19035 - Added helptext and parsing back into manufacturer 2026-05-18 12:33:21 +01:00
snipe 27a637a7a4 Added assets-only user to demo 2026-05-18 12:18:49 +01:00
snipe 460daf71b6 Merge remote-tracking branch 'origin/develop' 2026-05-18 12:04:12 +01:00
snipe 56d5f17dde Fixed #19036 - added table prefix to migration 2026-05-18 12:03:31 +01:00
snipe 3074bae47c Merge remote-tracking branch 'origin/develop' 2026-05-18 11:56:26 +01:00
snipe b9c7bcf035 Check for null in SCIM 2026-05-18 11:56:14 +01:00
snipe 071c46a91e Fixed copy button 2026-05-18 11:52:05 +01:00
snipe 49138f2cb1 Fixed link 2026-05-18 11:49:27 +01:00
snipe fd46794350 Added copy JS 2026-05-18 11:29:32 +01:00
snipe 9305c3e845 Moved strings 2026-05-18 11:28:47 +01:00
snipe 058da6bfef Added maintenance type strings 2026-05-18 11:09:48 +01:00
snipe a65ae59810 Changed phrasing 2026-05-18 11:09:26 +01:00
snipe 1967b3b7a7 Stubbed index and edit for maintenance types 2026-05-18 11:08:48 +01:00
snipe 30dbf1698b Added modal to create new maintenance type 2026-05-18 11:08:11 +01:00
snipe 8e1ad53a31 Switch to maintenance type table for maintenance type dropdown partial 2026-05-18 11:07:58 +01:00
snipe a5272968de Added hardware maintenance complete route 2026-05-18 11:07:14 +01:00
snipe 94e14e5ee9 Added tests 2026-05-18 11:06:54 +01:00
snipe db46e16530 Pint 2026-05-18 11:06:41 +01:00
snipe 0630ef9f89 Added routes 2026-05-18 11:06:21 +01:00
snipe 0f80950a91 Merge remote-tracking branch 'origin/develop' 2026-05-15 01:56:34 +01:00
snipe aae07bd3a7 Null guard for null created_at date 2026-05-15 01:56:22 +01:00
snipe 2620b60048 Merge remote-tracking branch 'origin/develop' 2026-05-15 00:43:51 +01:00
snipe 1cff2d67aa Added extra guard on user permission 2026-05-15 00:43:18 +01:00
snipe 80418d0b16 Fixed error formatting 2026-05-15 00:43:18 +01:00
snipe 14c5cff429 Added CheckinAndDeleteItems command 2026-05-15 00:43:18 +01:00
snipe 0ea6eb13c2 Merge pull request #19032 from grokability/optimize-incorrect-checkout-acceptances-command
Optimize incorrect checkout acceptances command
2026-05-14 23:58:19 +01:00
snipe 86cc20034f Added test 2026-05-14 23:11:03 +01:00
snipe 57f17e80a2 First pass 2026-05-14 23:03:59 +01:00
snipe 81b1cdc6e9 Merge remote-tracking branch 'origin/develop' 2026-05-14 16:58:04 +01:00
snipe 12c3629c89 Added empty option to allow clear 2026-05-14 16:57:32 +01:00
snipe 0304933c53 Merge remote-tracking branch 'origin/develop' 2026-05-14 16:46:42 +01:00
snipe 0a02c0b81a fixed test 2026-05-14 16:40:44 +01:00
snipe f0d84f5350 Merge remote-tracking branch 'origin/develop' 2026-05-14 16:34:42 +01:00
snipe fdcc3f1968 Clearer messaging on acceptance 2026-05-14 16:03:24 +01:00
snipe 663bab1f9d Merge pull request #19030 from grokability/purchase-cost-fix
Fixed #19029 - switch back to text for purchase cost
2026-05-14 15:56:25 +01:00
snipe 8b1e312292 Normalize purchase_cost 2026-05-14 15:33:42 +01:00
snipe 9004211a59 Added text string 2026-05-14 15:04:48 +01:00
snipe 053eb91457 Update bulk asset controller 2026-05-14 15:03:55 +01:00
snipe 3810513224 Updated HTML fields back to text from number 2026-05-14 14:30:09 +01:00
snipe e50e0f0e34 Updated tests 2026-05-14 14:29:51 +01:00
snipe cdf73f9c89 Merge pull request #19028 from grokability/move-and-rename-trait
Move and rename CheckInOutRequest to CheckInOutTrait
2026-05-14 13:13:50 +01:00
snipe bc808cbe46 Pint 2026-05-14 12:50:31 +01:00
snipe fdc65fb1b2 Moved and renamed CheckInOutRequest 2026-05-14 12:50:23 +01:00
snipe 1ad562f8b9 Merge remote-tracking branch 'origin/develop' 2026-05-14 12:38:37 +01:00
snipe 3db9a15dd3 Merge pull request #19027 from grokability/add-fields-to-user-export
Fixed #18659 - added more data to user export
2026-05-14 12:32:24 +01:00
snipe 42bf43d68d Fixed #18659 - added more data to user export 2026-05-14 12:24:08 +01:00
snipe 4548ed8a45 Fixed flappy test 2026-05-14 11:45:20 +01:00
snipe a5cea247f1 Merge remote-tracking branch 'origin/develop' 2026-05-14 11:35:54 +01:00
snipe 407e2d0246 Merge pull request #19026 from grokability/scim-typo
Fixed SCIMConfig typo "string_starts_with"
2026-05-14 11:12:52 +01:00
snipe 2af7367480 Pint 2026-05-14 11:00:58 +01:00
snipe 29b9a78f54 Fixed typo “string_starts_with” 2026-05-14 11:00:25 +01:00
snipe 571bc39495 Merge remote-tracking branch 'origin/develop' 2026-05-14 10:40:52 +01:00
snipe 382a164b9d Updated composer.lock 2026-05-14 10:40:41 +01:00
snipe 19f70656ee Move API singletons from SettingServiceProvider into middleware 2026-05-13 22:20:46 +01:00
snipe 9216a7550f Merge pull request #19019 from grokability/adding-normal-pagination-to-api-responses
Added page number support in API, added `per_page`, `total_pages`, and `current_page` to API response
2026-05-13 22:16:40 +01:00
snipe 4f9ba7c6cc Updated to use fullUrlWithQuery 2026-05-13 22:08:27 +01:00
snipe afb7c69ac3 Merge pull request #19021 from marcusmoore/fixes/21081-missing-asset-in-maintenance
Fixed asset maintenances page not rendering with missing asset
2026-05-13 22:00:24 +01:00
snipe 8ea78fae21 Merge remote-tracking branch 'origin/develop' 2026-05-13 21:59:26 +01:00
snipe 5f232c0584 Merge pull request #19024 from grokability/api-disallow-own-priv-changes
Tighten permission changes and UI, fixed #18831
2026-05-13 21:59:15 +01:00
snipe ed931d497a Hide admin/superadmin sections if the user is not an admin/superadmin 2026-05-13 21:45:56 +01:00
snipe 59278c3f70 Missed a spot 2026-05-13 21:39:46 +01:00
snipe 179d031bb2 Fixed #18831 - better spacing for buttons 2026-05-13 21:32:36 +01:00
snipe dc1410aa70 Tweaked logic around messaging 2026-05-13 21:27:25 +01:00
snipe 0f595a8854 Updated preserve permissions action 2026-05-13 21:06:04 +01:00
snipe 70e1dcf1b4 Disallow self-editing of privs on user model 2026-05-13 20:06:51 +01:00
snipe 780e3e1cd9 Merge pull request #19023 from marcusmoore/fixes/users-export
Fixed duplicate headers in users csv export
2026-05-13 19:41:55 +01:00
Marcus Moore 339c93ebbf Add documentation for assertion 2026-05-13 11:27:26 -07:00
Marcus Moore b4bb1556be Add assertions 2026-05-13 11:26:04 -07:00
Marcus Moore ba96aa5a61 Write assertion implementation 2026-05-13 11:25:52 -07:00
snipe 2171556ec4 Merge pull request #19022 from marcusmoore/fixes/disable-debugbar-for-unaccepted-assets-report
Disabled debugbar on acceptance report
2026-05-13 19:18:53 +01:00
Marcus Moore 2d33368063 WIP: better assertions 2026-05-13 11:10:45 -07:00
Marcus Moore 93a2f74f9e Disable debugbar on acceptance report 2026-05-13 10:46:58 -07:00
Marcus Moore ee61084ac8 Ensure maintenance has asset before attempting to render 2026-05-13 10:11:50 -07:00
snipe 8d8a1889cd Drop the limit from the next/prev links unless they were specifically sent in the URL parameters 2026-05-13 17:17:14 +01:00
snipe f275cb6928 Pint 2026-05-13 17:10:41 +01:00
snipe db8de1f794 Codacy fixes 2026-05-13 17:10:34 +01:00
snipe d901e821cc Include next and previous urls in the payload 2026-05-13 16:55:55 +01:00
snipe 34a533b2d6 Added page number support in API, added per_page, total_pages, and current_page 2026-05-13 16:48:39 +01:00
snipe ed6b3c04ab Merge remote-tracking branch 'origin/develop' 2026-05-13 12:18:25 +01:00
snipe d3d37c70ab Merge pull request #19017 from grokability/FD-52058-importer-updated-at-timestamp
Fixed importer `created_at` timestamp getting weird on large imports
2026-05-13 12:18:01 +01:00
snipe 475e674fc6 Bumped laravel version in README 2026-05-13 12:17:44 +01:00
snipe 01436d0532 Import the model in test 2026-05-13 12:06:39 +01:00
snipe 96bf7d0c2b Fixed FD-52058 - Importer using wrong created_at date 2026-05-13 12:06:13 +01:00
snipe 529973aa77 Updated EULA PDF filename to include username 2026-05-13 10:32:17 +01:00
snipe a4ca0a592f Merge remote-tracking branch 'origin/develop' 2026-05-13 10:20:00 +01:00
snipe f4cd090ac6 Merge pull request #19012 from marcusmoore/fixes/activity-report-link
Fixed anchor tag on report index page
2026-05-13 02:41:35 +01:00
Marcus Moore 6d5e68274d Only write headers once 2026-05-12 16:36:26 -07:00
Marcus Moore 3e002cb940 Implement test and remove trailing comma in group column 2026-05-12 16:33:53 -07:00
Marcus Moore b7ea9a959c Scaffold some tests 2026-05-12 16:25:53 -07:00
Marcus Moore dc3a16c437 Update test macros 2026-05-12 16:25:00 -07:00
Marcus Moore 608af84253 Fix anchor tag 2026-05-12 15:13:29 -07:00
snipe 90c8689596 Prod assets 2026-05-12 19:43:34 +01:00
snipe 161d7e1c2b Dev assets 2026-05-12 19:42:20 +01:00
snipe 8627032c4f Bumped version to 8.5.0 2026-05-12 19:41:10 +01:00
snipe 5bead4fbcc Pint :( 2026-05-12 19:30:54 +01:00
snipe ef44ba5f97 Updated languages 2026-05-12 19:29:57 +01:00
snipe 2dc0ec9e7e Bumped php_max_major_minor for new 8.5 support 2026-05-12 19:27:50 +01:00
snipe afd435e895 Bumped php max requirement 2026-05-12 15:23:15 +01:00
snipe 80d1bf6a7a Better manufacturer check again :( 2026-05-12 15:12:38 +01:00
snipe 737f3ef3db Skip lookup URL if manufacturer was deleted 2026-05-12 15:07:55 +01:00
snipe d179f47274 Merge pull request #19007 from uberbrady/reintroduce_scim_logging
Change branch of home-forked SCIM server to re-introduce logging
2026-05-12 14:51:11 +01:00
snipe 1832d95371 Merge pull request #19009 from grokability/bulk-delete-licenses
🎥 Added bulk deletion of licenses
2026-05-12 13:55:37 +01:00
snipe a614f986f0 Added test for the fix I made in the prior commit 2026-05-12 13:07:16 +01:00
snipe f398a59d26 Fixed bug on API delete 2026-05-12 13:05:15 +01:00
snipe c8bd104268 Added comment for clarity 2026-05-12 13:00:51 +01:00
snipe 7f01bd4c56 Merge pull request #19008 from uberbrady/more_exception_handling_in_scim
Widen exception scope in emails; similar treatment for phones
2026-05-12 12:57:06 +01:00
Brady Wetherington 6c3c7fdf49 Widen exception scope in emails; similar treatment for phones 2026-05-12 12:43:53 +01:00
snipe bdc8fc8d4a Eager load license seat relations to avoid n+1 2026-05-12 12:41:45 +01:00
snipe 41be127489 Added bulk license action 2026-05-12 12:41:30 +01:00
snipe fdfae9593d Use isDeletable for delete ability status 2026-05-12 12:41:08 +01:00
snipe 6a21eb53c9 Fixed return type 2026-05-12 12:40:29 +01:00
snipe efde2b4672 Added checknbox to presneter 2026-05-12 12:40:08 +01:00
snipe daaa26cbf4 Added new text strings 2026-05-12 12:34:40 +01:00
snipe 3e7441562c Added bulk action menu 2026-05-12 12:34:31 +01:00
snipe 7b53fa5245 Added bulk delete route 2026-05-12 12:34:16 +01:00
snipe d35d46f5b4 Added tests 2026-05-12 12:34:03 +01:00
Brady Wetherington f4772a9cad Change branch of home-forked SCIM server to re-introduce logging 2026-05-12 12:26:37 +01:00
snipe 4c1bb7e0ac Merge remote-tracking branch 'origin/master' into develop 2026-05-11 19:45:01 +01:00
snipe 762ea9b4db One more try I guess 2026-05-11 19:44:41 +01:00
snipe b16970a61e Merge pull request #18629 from Godmartinz/update-print-invtentory-view-with-assigned2assets
Update print inventory view with indirect assignments table
2026-05-11 18:27:25 +01:00
snipe dadb9bd81e Merge remote-tracking branch 'origin/develop' 2026-05-11 16:12:03 +01:00
snipe 13dc7de660 Add enter to submit advanced search modal 2026-05-11 16:11:51 +01:00
snipe 003ea36e18 Merge remote-tracking branch 'origin/develop' 2026-05-11 16:04:10 +01:00
snipe f4bd2a68c9 Fix for compound is:not_null 2026-05-11 16:03:59 +01:00
snipe be4e75d4f7 Merge remote-tracking branch 'origin/develop' 2026-05-11 15:25:56 +01:00
snipe 538c21ce1e Merge pull request #19002 from grokability/fixed-crash-on-checkout-outside-of-company-id
Fixed crash on checkout outside of company via API
2026-05-11 15:25:27 +01:00
snipe 626cd6cb2e Fixed #18989 - better wrapping for auth self.profile checks 2026-05-11 15:25:03 +01:00
snipe 2a56f6573d Wrap the checkout in a transaction and add tests 2026-05-11 15:07:25 +01:00
snipe 6ee2dc1cd6 Merge pull request #18998 from uberbrady/fix_scim_error_email
Don't 500 on malformed emails input
2026-05-11 14:59:56 +01:00
snipe 3fcde8bd16 Prevent crash when trying to check out a component from another company if FMCS is on 2026-05-11 14:43:54 +01:00
snipe e2ff7a7bc7 Merge pull request #19000 from grokability/reports-index
🎥 Added reports index
2026-05-11 14:37:14 +01:00
snipe c7efd16517 Fixed progressbar color 2026-05-11 14:25:25 +01:00
snipe f2907f04d9 Added nicer border 2026-05-11 14:19:10 +01:00
snipe 7d98c267d5 More formatting tweaks 2026-05-11 14:13:16 +01:00
snipe 5bc6330c13 Messed with the boxes 2026-05-11 14:05:11 +01:00
snipe 1706ed597d Updated text 2026-05-11 14:05:03 +01:00
snipe 6e9ba28ef7 Tightened up query string 2026-05-11 13:26:35 +01:00
snipe 554d1a44de More shifting 2026-05-11 13:21:33 +01:00
snipe c0a8f4c1a4 Include withrashed() 2026-05-11 13:19:49 +01:00
snipe 08be9aac6d Added users chart 2026-05-11 13:08:23 +01:00
Brady Wetherington a51b17fb53 Don't 500 on malformed emails input 2026-05-11 13:07:16 +01:00
snipe 66d5618d60 Fixed links in summary box 2026-05-11 12:59:53 +01:00
snipe e16c2384fd Fixed some dark/light mode stuff 2026-05-11 12:55:25 +01:00
snipe b3323f08a0 More b0xen 2026-05-11 12:29:58 +01:00
snipe 7e63c2ef92 CSS is hard :( 2026-05-11 12:25:38 +01:00
snipe 7f65b6d598 Shifting stuff around again 2026-05-11 12:25:32 +01:00
snipe 8fb8f0a4d2 Edited queries in ReportsController 2026-05-11 12:24:05 +01:00
snipe 637dbc8d2a New strings 2026-05-11 12:23:47 +01:00
snipe 978990fdff Added progressbar 2026-05-11 12:23:41 +01:00
snipe 52a058e511 Breaking everything.. whee 2026-05-11 12:16:15 +01:00
snipe 64bea202c5 Switched layout, added chart 2026-05-11 12:01:45 +01:00
snipe 37f60993ca Added charts with date range picker 2026-05-11 11:45:34 +01:00
snipe 32717c67c7 Added reports index to sidenav 2026-05-11 11:45:20 +01:00
snipe 3681e3f025 Removed extranneous div 2026-05-11 11:45:08 +01:00
snipe 1d0f055349 Added new strings 2026-05-11 11:44:58 +01:00
snipe fb3024ca9c Added controller methods for reports 2026-05-11 11:44:52 +01:00
snipe 005c0ea9f6 Pint 2026-05-11 11:44:37 +01:00
snipe 7c3f1f3a84 Added routes 2026-05-11 11:44:29 +01:00
snipe 900e5209d9 Added claude.md :( 2026-05-11 10:21:30 +01:00
snipe 4fbf416d16 Merge remote-tracking branch 'origin/develop' 2026-05-11 09:56:31 +01:00
snipe 7b7d2c87fb Added League\Csv\EscapeFormula for a few more reports 2026-05-11 09:54:55 +01:00
snipe 6debb3a65d Added is_not: as search modifier 2026-05-11 09:46:05 +01:00
snipe 315ba49a1d Larger tag size 2026-05-11 09:43:42 +01:00
snipe ff57855038 Added EthicalCheck
Giving this a test drive
2026-05-08 17:10:40 +01:00
snipe da6e837578 Merge pull request #18991 from uberbrady/better_scim_errors
Fixed #18987 - fix SCIM error on mismapped fields
2026-05-08 14:25:02 +01:00
snipe a2d8f89162 Merge remote-tracking branch 'origin/develop' 2026-05-08 14:21:20 +01:00
snipe e36d65e695 Use carbon instead 2026-05-08 14:21:07 +01:00
snipe 34abf14cbe Merge remote-tracking branch 'origin/develop' 2026-05-08 14:12:29 +01:00
snipe dda7a4f22f Format dates in custom report 2026-05-08 14:12:15 +01:00
Brady Wetherington 283a885196 Get rid of 'setCode' and just use the constructor parameter instead 2026-05-08 13:15:37 +01:00
snipe d44aa3f16e Merge remote-tracking branch 'origin/develop' 2026-05-07 12:42:15 +01:00
snipe 575e825579 Typo 2026-05-07 12:42:04 +01:00
snipe dc8cbf4786 Stricter FMCS enforcement in API 2026-05-07 12:41:46 +01:00
snipe 5f81a48d8b Merge pull request #18986 from grokability/#18905-asset-location-on-checkin
Fixed #18905 - update location of child assets if parent asset is checked in
2026-05-07 12:32:44 +01:00
snipe c22e4c00a5 Fixed #18905 - update location of child assets if parent asset is checked in 2026-05-07 12:20:25 +01:00
snipe afb37981bf Merge remote-tracking branch 'origin/develop' 2026-05-07 12:07:46 +01:00
snipe 9b5ead39d3 Merge pull request #18985 from grokability/#18959-slack-notification-location
Fixed #18959 - refresh data on checkout notification
2026-05-07 12:06:19 +01:00
snipe 158e66f9c6 Fixed #18959 - refresh data on checkout notification 2026-05-07 11:59:01 +01:00
snipe bd8e944e2f Merge pull request #18967 from marcusmoore/fixes/test-namespace
Fixed namespace for test class
2026-05-07 11:13:31 +01:00
snipe 2b6518427a Merge remote-tracking branch 'origin/develop' 2026-05-07 11:11:16 +01:00
snipe 06d95b679b Merge pull request #18983 from grokability/add-option-to-export-only-assigned-or-unassigned
Allow custom report to filter on assigned/unassigned
2026-05-07 11:11:01 +01:00
snipe ff75b9eed8 Merge pull request #18982 from marcusmoore/consolidate-test-macros
Improved test macros for streamed content
2026-05-07 11:02:28 +01:00
snipe 17a88fcb80 Allow custom report to filter on assigned/unassigned 2026-05-07 11:00:43 +01:00
snipe 185e0073b3 Merge remote-tracking branch 'origin/develop' 2026-05-07 10:40:10 +01:00
snipe eca34de593 Added null-safe operator for components and consumables 2026-05-07 10:39:57 +01:00
snipe d0794ba71c Merge remote-tracking branch 'origin/develop' 2026-05-07 10:37:15 +01:00
snipe 40e89756bf Extend new operators to custom fields 2026-05-07 10:36:59 +01:00
Marcus Moore 55e46b2d15 Improve macro 2026-05-06 12:08:18 -07:00
Marcus Moore 02383aad7b Fix assertSeeTextInStreamedResponse and assertDontSeeTextInStreamedResponse macros
These were previously only checking the first column and not all of the data.
2026-05-06 11:46:28 -07:00
Marcus Moore e75f54cc1c Move helper macros to CustomTestMacros 2026-05-06 11:40:37 -07:00
snipe 1b42e2e138 Merge remote-tracking branch 'origin/develop' 2026-05-06 17:50:59 +01:00
snipe 3668c24d02 Pint again 2026-05-06 17:50:45 +01:00
snipe a84533b4f4 Quick tweak to advanced search aliases 2026-05-06 17:50:33 +01:00
snipe b4efabe82e Merge remote-tracking branch 'origin/develop' 2026-05-06 16:38:06 +01:00
snipe cbe750cc9e Merge pull request #18980 from uberbrady/reduce_scim_error_level
Throw 4xx SCIMExceptions when SCIM clients send bad data
2026-05-06 16:09:53 +01:00
snipe a77dedf3d7 Merge pull request #18979 from uberbrady/improve_saml_nonces
Add new unique constraint and improved nonce-checking logic for SAML
2026-05-06 15:26:39 +01:00
Brady Wetherington b6ce823cc2 Make sure to throw 400-series SCIMExceptions when SCIM clients send bad data 2026-05-06 15:24:58 +01:00
snipe f7e8ce2ade Merge pull request #18969 from grokability/advanced-search-improvements
🎥 Advanced search improvements
2026-05-06 13:02:07 +01:00
snipe 62e5b71dc1 Added loads of comments - this is gnarly stuff 2026-05-06 12:40:40 +01:00
snipe 3d04324595 Added searchableRelationAliases to user model 2026-05-06 12:39:31 +01:00
snipe 468cf73b97 Updated help text 2026-05-06 12:38:15 +01:00
snipe 5b90f9fb87 Switched to templates for readability (still gross, but whatever) 2026-05-06 12:37:57 +01:00
snipe 9131dbf09b Added more filter options 2026-05-06 12:03:55 +01:00
snipe 9b37e95b58 Merge remote-tracking branch 'origin/develop' 2026-05-05 22:00:13 +01:00
snipe a425234365 Fixed typo, added context (“worm”? Really?) 2026-05-05 22:00:02 +01:00
snipe a92d8eeaab Merge remote-tracking branch 'origin/develop' 2026-05-05 20:37:03 +01:00
snipe cd4e268c72 Added/updated tests 2026-05-05 20:36:39 +01:00
snipe b94945a461 Fixed RB-4121 2026-05-05 20:36:31 +01:00
Brady Wetherington 5b0a779c07 Add new unique constraint and improved nonce-checking logic 2026-05-05 15:23:07 +01:00
snipe e8dbb12ccc Merge remote-tracking branch 'origin/develop' 2026-05-05 13:22:59 +01:00
snipe d099bf2983 Merge pull request #18970 from uberbrady/fix_case_sensitive_classname
Change capitalization on SCIMUser; Linux filenames are case-sensitive
2026-05-05 13:22:28 +01:00
Brady Wetherington f7add0e4dd Change capitalization on SCIMUser; Linux filenames are case-sensitive 2026-05-05 13:19:59 +01:00
snipe 1e1cc897ad Added search help 2026-05-05 12:53:30 +01:00
snipe 04e2c59aa9 Typo 2026-05-05 12:40:56 +01:00
snipe 03bd3517be Added ablity to use “not:” or “!” to exclude results 2026-05-05 12:40:42 +01:00
snipe eeba5bc8fd Cleanup 2026-05-05 12:30:25 +01:00
snipe 1f54180c9c Removed highlighting in advanced search 2026-05-05 12:20:36 +01:00
snipe 8497a27c81 Added tags 2026-05-05 11:45:43 +01:00
snipe 80afa470ee Fixed issue where the button classes would get overwritten when closed and the modal re-opened 2026-05-05 11:39:45 +01:00
snipe 10c750e1a2 Added localstorage to handle remembering and/or 2026-05-05 11:33:56 +01:00
snipe 3aa175b36d Added and/or operator 2026-05-05 11:32:08 +01:00
snipe 8a2cd19ea6 Merge remote-tracking branch 'origin/develop' 2026-05-05 10:58:55 +01:00
snipe e76036965b Same for assets 2026-05-05 10:58:43 +01:00
snipe 2bb86a2ec1 Fixed RB-20854 - only allow scalars for users/hardware query strings 2026-05-05 10:52:51 +01:00
Marcus Moore a89c8c6e5b Fix namespace 2026-05-04 13:47:58 -07:00
Marcus Moore 1bdf205ca6 Run pint on test 2026-05-04 13:47:47 -07:00
snipe afdf86ad0d Merge remote-tracking branch 'origin/develop' 2026-05-04 21:47:15 +01:00
snipe ccf801137a Fixed typo 2026-05-04 21:46:47 +01:00
snipe ef746a173e Fixed RB-4120 - Column 'location_id' in where clause is ambiguous 2026-05-04 21:46:40 +01:00
snipe a5dae3f222 Merge remote-tracking branch 'origin/develop' 2026-05-04 20:55:35 +01:00
snipe e3552f4e36 Merge pull request #18966 from uberbrady/scim_php_82_fixes
Switch to PHPv8.2-compatible way of invoking a constructor and a method
2026-05-04 20:41:34 +01:00
snipe 75d9357488 Removed files notes field - confusing and kinda redundant 2026-05-04 20:34:12 +01:00
Brady Wetherington 26c028cf37 Switch to PHPv8.2-compatible way of invoking a constructor and a method 2026-05-04 20:34:01 +01:00
snipe 10c483967f Merge pull request #18965 from grokability/#18952-upload-files-directly-from-create/edit-screen-for-maintenances
🎥 Fixed #18952 - allow non-image files to be uploaded on create/edit maintenances
2026-05-04 20:33:16 +01:00
snipe 07b33e8189 Fixed #18952 - allow non-image files to be uploaded on create/edit maintenances 2026-05-04 20:15:56 +01:00
snipe 97765c08b1 Merge remote-tracking branch 'origin/develop' 2026-05-04 19:58:48 +01:00
snipe fc3ea78005 Fixed #18780 - limit height for tall images in info-panel 2026-05-04 19:58:37 +01:00
snipe 6ad92556a1 Merge remote-tracking branch 'origin/develop' 2026-05-04 19:47:36 +01:00
snipe bd4150af5a Merge pull request #18964 from grokability/fixes-for-maintenance-permissions
Fixed #18951 - maintenance permissions
2026-05-04 19:47:15 +01:00
snipe e2465ca2a7 Merge remote-tracking branch 'origin/develop' 2026-05-04 19:47:03 +01:00
snipe 1c6c93da35 Fixed typo 2026-05-04 19:30:21 +01:00
snipe 0daec32ddd Added dedicated maintenance permission (related right now just to assets) 2026-05-04 19:30:11 +01:00
snipe e466ed9e06 Merge pull request #18184 from uberbrady/use_new_laravel_scim_server
Use new laravel SCIM server
2026-05-04 18:49:44 +01:00
Brady Wetherington 4445b0317f Re-generated lockfile hash with minimal changes 2026-05-04 18:43:20 +01:00
Brady Wetherington beaea6c3bf Merge branch 'develop' into use_new_laravel_scim_server 2026-05-04 18:39:48 +01:00
snipe f5644928a8 Prod assets 2026-05-04 13:24:50 +01:00
snipe a279c44aa5 Pint 2026-05-04 13:23:49 +01:00
snipe f1f96e574c Bumped hash 2026-05-04 13:23:14 +01:00
snipe 1879001ef3 Merge remote-tracking branch 'origin/master' into develop 2026-05-04 13:21:34 +01:00
snipe 5014b1c459 Fixed #18955 - added manufacturer to view-assigned view 2026-05-04 13:21:12 +01:00
snipe 903459cf7e Merge remote-tracking branch 'origin/master' into develop 2026-05-04 13:12:54 +01:00
snipe 7c04661cfa Merge pull request #18963 from grokability/_add-custom-fields-to-eula-pdf
Add custom fields to eula pdf
2026-05-04 13:07:56 +01:00
snipe 76d3194c96 Shifted layout 2026-05-04 12:57:26 +01:00
snipe b63aee2851 Added custom fields to EULA PDFs 2026-05-04 12:51:43 +01:00
snipe f57d2608c5 Fixed #18956 - hide well if no matching graphs are present 2026-05-04 12:20:25 +01:00
snipe 34331525b1 Merge remote-tracking branch 'origin/master' into develop 2026-05-04 12:17:28 +01:00
snipe 8d1f4427ae Merge pull request #18910 from grokability/audit-visibility-fix
Fixed #18896 - Audit visibility fix
2026-05-04 12:14:05 +01:00
snipe 7f89f8284f Merge pull request #18961 from grokability/add-visibility-icons
🖼️ Added visibility icons in custom fields forms
2026-05-04 12:12:56 +01:00
snipe 3b2ac2bc3c Fixed classname 2026-05-04 12:06:42 +01:00
snipe 73e88be8f3 Small cleanup 2026-05-04 12:05:48 +01:00
snipe f5d092f497 Added aria label for accessibility 2026-05-04 11:56:53 +01:00
snipe 8edbad92cb Added visual icons to show where the custom fields will be visible 2026-05-04 11:55:55 +01:00
snipe b0e13a1352 Merge pull request #18946 from marcusmoore/8.5-actions
Added PHP 8.5 to Action tests
2026-04-30 10:03:48 +01:00
snipe 5c75648cd7 Merge remote-tracking branch 'origin/master' into develop 2026-04-28 19:38:44 +01:00
snipe 1872c6eed9 Merge pull request #18950 from grokability/show-hide-password
🎥 Added password toggle JS/HTML
2026-04-28 10:42:21 +01:00
snipe 53199b9737 Added password toggle JS/HTML 2026-04-28 10:35:36 +01:00
snipe 73861c6a04 Merge pull request #18948 from marcusmoore/fixes/index-history-test
Fixed test name
2026-04-27 22:58:34 +01:00
Marcus Moore e2969dd3e2 Fix filename 2026-04-27 13:59:40 -07:00
snipe 0b1b99697e Merge pull request #18947 from spencerrlongg/mobile-client-endpoint
Mobile OAuth Client Endpoint
2026-04-27 20:05:47 +01:00
snipe 07202a8061 Merge pull request #18937 from uberbrady/fix_saml_intended_url
Fix redirecting users to their intended URL's when logging in via SAML
2026-04-27 19:54:09 +01:00
spencerrlongg 189454096b route for mobile client authentication 2026-04-27 13:52:55 -05:00
Marcus Moore 55ee5df852 Merge branch 'develop' into 8.5-actions 2026-04-27 11:52:29 -07:00
snipe f6466b9154 Merge pull request #18945 from marcusmoore/deps/phpspec/prophecy
Bumped phpspec/prophecy to allow installing on PHP 8.5
2026-04-27 19:51:24 +01:00
Marcus Moore 8e5a64dca9 Add php 8.5 to testing workflows 2026-04-27 11:48:26 -07:00
Marcus Moore b894147514 Bump phpspec/prophecy to v1.26.1 2026-04-27 11:27:41 -07:00
snipe d55c2c269f Merge remote-tracking branch 'origin/master' into develop 2026-04-27 19:05:50 +01:00
Brady Wetherington c7afcf0bef Fix returning to intended URL on 2-factor success (or enrollment success) 2026-04-27 14:59:32 +01:00
Brady Wetherington c79f5b8b74 Merge branch 'develop' into use_new_laravel_scim_server 2026-04-27 14:15:27 +01:00
snipe c5296fd76d Fixed selected attribute on multiselect (normal, not select2) for groups 2026-04-27 13:49:11 +01:00
snipe 3cb3284b26 Merge pull request #18942 from grokability/#18939-blank-tag-after-submit
Fixed #18939 - blank audit field in scanner audit screen
2026-04-27 13:22:12 +01:00
snipe d5d0d00ecc Fixed #18939 - blank audit field in scanner audit screen 2026-04-27 13:20:08 +01:00
Brady Wetherington dc6b45cbcb Fix redirecting users to their intended URL's when logging in via SAML 2026-04-23 15:29:28 +01:00
snipe 5db9d67e65 Merge pull request #18936 from grokability/info-panel-button-blade
Refactor show/hide info button into blade component
2026-04-23 14:26:19 +01:00
snipe f64dfa7f92 Refactor show/hide info button into blade component 2026-04-23 14:18:19 +01:00
snipe 06584d17a6 Merge pull request #18874 from marcusmoore/fixes/fd-54740-user-avatar-via-api-master
[FD-54740] Fixed managing user avatar via API
2026-04-23 13:02:36 +01:00
snipe 73bbe5062d Merge remote-tracking branch 'origin/master' into develop 2026-04-22 17:37:29 +01:00
snipe 75cb1041ec Merge pull request #18932 from grokability/small-tweak-to-info-element-status
🎥 Small tweak to info element status
2026-04-22 17:37:15 +01:00
snipe b61ed66d9d Updated logic 2026-04-22 17:25:48 +01:00
snipe 48ebd7faf5 Refine checkin checkout button display 2026-04-22 17:25:26 +01:00
snipe d6de3baa6e Hide button if orphaned 2026-04-22 17:21:33 +01:00
snipe 1be44a4c05 Pint 2026-04-22 17:18:07 +01:00
snipe f17f34f730 Added routes and logging 2026-04-22 17:17:58 +01:00
snipe da5bb6126a Add a warning well if the asset’s checkout is bonked 2026-04-22 17:09:58 +01:00
snipe a5d04d2e65 Added tests 2026-04-22 17:09:34 +01:00
snipe 22d07214fe Sort of fixed #18918 - prevent showing more permissions if user is admin or superadmin 2026-04-22 15:50:27 +01:00
snipe 8d4523d250 Merge pull request #18930 from grokability/#18920-sort-by-eula-in-categories
Added #18920 - sort by EULA in categories
2026-04-22 15:30:55 +01:00
snipe 37a3d694d4 Pint 2026-04-22 15:24:52 +01:00
snipe d21ccdfcbf Added #18920 - sorting by EULA in category view 2026-04-22 15:24:45 +01:00
snipe 11eaf7ce7b Merge remote-tracking branch 'origin/master' into develop 2026-04-22 15:01:22 +01:00
snipe 4eba97d388 Added Armenian as a possible language 2026-04-22 15:01:11 +01:00
snipe 590e97a99f Merge remote-tracking branch 'origin/master' into develop 2026-04-22 14:58:25 +01:00
snipe 613137551a Pint 2026-04-22 14:58:03 +01:00
snipe 23f941c810 Updated language strings 2026-04-22 14:57:16 +01:00
snipe 4c09f3a229 Merge remote-tracking branch 'origin/master' into develop 2026-04-22 14:38:39 +01:00
snipe e7312801ac Fixed division by zero in new label engine 2026-04-22 14:24:11 +01:00
snipe cd69a7ea53 Merge pull request #18927 from grokability/enforce-basenames-on-filenames
Enforce basenames on filenames
2026-04-22 13:42:09 +01:00
snipe 13ffdda12e Piiiint 2026-04-22 13:35:24 +01:00
snipe 372e74aad3 Adds basename to places where we pass a filename 2026-04-22 13:35:16 +01:00
snipe 2a32f7d372 Merge pull request #18926 from grokability/#18172-correctly-decrypt-encrypted-custom-fields-in-custom-asset-report
Fixed #18172 - Encrypted custom fields not correctly decrypted in custom asset report
2026-04-22 12:56:11 +01:00
snipe a2d34cca76 Pint 2026-04-22 12:49:55 +01:00
snipe c513ed5fc3 Fixed #18172 - correctly dencrypt custom fields in custom asset report 2026-04-22 12:49:48 +01:00
snipe 34cd5dcf7c Add @Husky-Devel as a contributor 2026-04-22 12:24:19 +01:00
snipe 260ca085bb Merge pull request #18908 from Husky-Devel/patch-1
Update snipeit.sh script to add support for CentOS/Alma/Redhat 10.x
2026-04-22 12:22:59 +01:00
snipe 7b00074b9e Merge pull request #18915 from Godmartinz/fix-api-label-with-old-engine
Adds translation and better error messaging for API labels
2026-04-22 12:22:33 +01:00
snipe 16e981d99d Merge pull request #18916 from marcusmoore/fixes/fd-54943-acceptance-email
Fixed display of email setting on category show page
2026-04-22 12:21:47 +01:00
snipe 16eb899ba7 Merge pull request #18924 from grokability/#18367-add-option-to-audit-by-serial-in-quickscan
Fixed #18367 - Added option to audit by serial in quickscan audit
2026-04-22 12:21:13 +01:00
snipe 3367f8e5c7 Edited audit method to allow searching by serial 2026-04-22 12:04:27 +01:00
snipe ad635ab95c Updated text 2026-04-22 12:04:11 +01:00
snipe b94e7fd8a0 Added select2 2026-04-22 12:04:04 +01:00
snipe 683fbd7953 Moved nav option 2026-04-22 12:00:41 +01:00
snipe 246ec9e20b Added tests 2026-04-22 11:57:58 +01:00
snipe 81d669d62a Pint 2026-04-22 09:05:01 +01:00
snipe 9ff951d379 Added redundent migration for delete_at 2026-04-22 09:04:53 +01:00
Marcus Moore e327303b3c Fix display of alert_on_response 2026-04-20 16:18:23 -07:00
snipe 21d030db26 Merge pull request #18914 from Godmartinz/rb20958
Fix RB-20958 company display name in custom reports
2026-04-20 20:31:57 +01:00
Godfrey M 444b58504c rename translation 2026-04-20 11:27:56 -07:00
Godfrey M c1e2f4ad75 update api label exception messages to translations 2026-04-20 11:10:41 -07:00
Godfrey M ec6778e770 adds ternary to user company display in custom reports 2026-04-20 10:09:44 -07:00
snipe 1c5d81cb04 Parse through carbon to make suyre the dates match properly 2026-04-20 15:54:45 +01:00
snipe 10e6c93a95 Merge remote-tracking branch 'origin/master' into develop 2026-04-20 15:40:55 +01:00
snipe d37f43daba Merge pull request #18912 from grokability/small-info-panel-tweaks
Small info panel tweaks
2026-04-20 15:40:39 +01:00
snipe dbabd1bab3 Removed stupid space from phpstorm 2026-04-20 15:34:25 +01:00
snipe 6b5398139a Pull date out of the progress bar
This was squishing weird on smaller screens
2026-04-20 15:32:24 +01:00
snipe 0ec45a4fd0 Add text to dates, added class if almost depreciated 2026-04-20 15:31:16 +01:00
snipe b99fd237f3 Use refactored methods 2026-04-20 15:30:55 +01:00
snipe 5d7123eb05 Added tests 2026-04-20 15:30:25 +01:00
snipe 7eb6ebb60d Refactor the percent logic out of the blade 2026-04-20 15:30:16 +01:00
snipe 0060207816 Merge remote-tracking branch 'origin/master' into develop 2026-04-20 14:19:38 +01:00
snipe 5bc273686e Use support_url in manufacturer blade component 2026-04-20 14:18:58 +01:00
snipe 2f6420e05f Pint 2026-04-20 13:57:50 +01:00
snipe c01699b6e4 Skip checking for company_id on models table 2026-04-20 13:57:45 +01:00
snipe 6c6199add8 Narrowed test 2026-04-20 13:40:49 +01:00
snipe 42cd5e0017 Pint :( 2026-04-20 13:30:22 +01:00
snipe baee6a37ea Backfill audit company ID (if one is present) 2026-04-20 13:30:15 +01:00
Peter Gallwas 90b3685808 Add support for CentOS/Alma/Redhat 10.x
Based off the 9.x code add 10.x support, tested on Rocky 10.1
2026-04-20 18:47:03 +12:00
snipe 37a37318aa Merge pull request #18901 from grokability/display-effective-permissions
Display effective permissions
2026-04-17 12:50:58 +01:00
snipe 74e831c4f0 Oh, Pint 2026-04-17 12:36:56 +01:00
snipe be36390b0f Display effective permissions on user view 2026-04-17 12:36:43 +01:00
snipe e9a628066f Merge pull request #18889 from fvollmer/ldap-deletion
Added #14662: Allow (soft) deletion via ldap sync
2026-04-17 12:14:29 +01:00
ArturoSirvent 8f46b5254e Fix backup disk driver configuration for S3 support
- Fix the backup disk in config/filesystems.php to use a dedicated BACKUP_FILESYSTEM_DRIVER env var instead of PRIVATE_FILESYSTEM_DISK
- Add AWS credential fields to the backup disk config so S3 backups work
- Use BACKUP_FILESYSTEM_ROOT with safe default (storage_path('app')) for local driver
- Document BACKUP_FILESYSTEM_DRIVER and BACKUP_FILESYSTEM_ROOT in .env.example

Fixes #14057
2026-04-17 12:10:03 +01:00
snipe cf44119bc6 Merge pull request #18710 from ArturoSirvent/fix/backup-disk-s3-driver
Fix backup disk driver configuration for S3 support
2026-04-17 12:09:34 +01:00
snipe a15e9d737c Merge pull request #18882 from Godmartinz/purge-old-eula-option-for-deleted-users
adds #18868 options to Eula Purge Command
2026-04-17 12:08:20 +01:00
snipe 08f6f5cf71 Merge remote-tracking branch 'origin/master' into develop 2026-04-17 12:04:50 +01:00
snipe faa2adbde2 Pint 2026-04-17 12:04:31 +01:00
snipe 7fae60d5c3 Log requestable check on checkin/checkout 2026-04-17 12:04:21 +01:00
snipe 4f9ce07304 Merge remote-tracking branch 'origin/master' into develop 2026-04-17 11:58:04 +01:00
snipe 3cad34821e Merge pull request #18900 from grokability/#7418-toggle-requestable
Fixed #7418 - Ability to toggle requestable on checkin/checkout
2026-04-17 11:57:46 +01:00
snipe 1e4353f0db Added controller logic and form request constraints 2026-04-17 11:40:37 +01:00
snipe 7520a1b2a3 Allow the user to leave the requestability unchanged in bulk checkout 2026-04-17 11:38:45 +01:00
snipe cdd91e498a Updated test 2026-04-17 11:37:58 +01:00
snipe 2daf0458a7 Added checkboxes and JS to checkin/checkout blades 2026-04-17 11:35:10 +01:00
snipe 6299fc09bf Added tests 2026-04-17 11:33:12 +01:00
snipe 2327cc6866 Merge pull request #18895 from grokability/resend-acceptance-on-user-page
Resend acceptance on user page
2026-04-16 20:01:50 +01:00
snipe b235df0bbf Fixed div 2026-04-16 19:57:25 +01:00
snipe 6d56ab9b63 Re-added import 2026-04-16 19:51:50 +01:00
snipe ce5de8fe06 Allow admin to resend unaccepted assets 2026-04-16 15:50:11 +01:00
snipe ce3f80246e Pint 2026-04-16 15:49:32 +01:00
snipe 046ef82c65 Added gates for 2FA reset API endpoint 2026-04-16 15:49:25 +01:00
snipe 0f347e8453 Use translation for unauthorized 2026-04-16 15:28:36 +01:00
snipe 1cb0ca84ab Add wrapping for address 2026-04-16 14:52:03 +01:00
snipe 7625646c11 Remove wrapping from wells 2026-04-16 14:51:42 +01:00
snipe 743c598b83 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-04-16 14:13:02 +01:00
snipe 324530fb8c Updated language 2026-04-16 14:12:07 +01:00
snipe 68acf7b90a Merge pull request #18884 from grokability/#8414-sign-in-place
Added #8414 - acceptance sign in place
2026-04-16 14:11:11 +01:00
snipe 9c610f51af Updated language, nicer form 2026-04-16 13:37:31 +01:00
snipe 40ec0627c4 Check for global acceptance requirement as well 2026-04-16 13:14:21 +01:00
snipe 645e66b30c Updated language 2026-04-16 13:07:32 +01:00
snipe 2311d56836 Only show the sign-in-place box if the category requires it 2026-04-16 13:06:18 +01:00
snipe 1f3481c54b Use breadcrumb action in route 2026-04-16 12:51:57 +01:00
snipe 07fa51aa4c Lots of tests 2026-04-16 12:51:38 +01:00
snipe 0866469cc0 Added checkout date and admin to acceptance form 2026-04-16 12:51:22 +01:00
snipe 3d9bb29b1b Updated string 2026-04-16 12:50:59 +01:00
snipe 5a67bcaf17 Pint doing pint things 2026-04-16 12:50:52 +01:00
snipe 01b18513f1 Safe redirect if request is weird 2026-04-16 12:49:02 +01:00
snipe d92ec582fa Check for “stale” acceptance 2026-04-16 12:47:30 +01:00
snipe 205eb7fd37 Moved breadcrumbs into action to get the logic out of the route 2026-04-16 12:35:31 +01:00
snipe 0798e62417 Normalize the box header - it looked kinda weird before 2026-04-16 11:31:12 +01:00
snipe 83adcc61bc More cleanup 2026-04-16 11:22:39 +01:00
snipe 788e07947f Nicer styling 2026-04-16 11:14:35 +01:00
snipe f7717571ea Merge remote-tracking branch 'origin/master' into develop 2026-04-16 10:01:04 +01:00
snipe 83fec75bc8 Avoid crashing if assignedto isn’t valid 2026-04-16 10:00:45 +01:00
snipe 53c240f13f Pint 2026-04-15 21:29:32 +01:00
snipe f142eb7a44 Moved back in time migration 2026-04-15 21:29:26 +01:00
Felix Vollmer fe84d35ce4 Added #14662: Allow (soft) deletion via ldap sync 2026-04-15 17:14:53 +02:00
Godfrey M 5c5414c960 remove comments, reorder command options 2026-04-14 17:57:06 -07:00
Godfrey M 2eeb1f588a rename tests 2026-04-14 16:13:18 -07:00
Godfrey M 9f69eacf71 tweak to acceptance factory, adds purge eula command tests 2026-04-14 16:11:32 -07:00
snipe 495382c42f Merge pull request #18885 from grokability/fix-soft-deleted-companies-in-migrations
Fix soft deleted companies in migrations
2026-04-14 23:19:33 +01:00
snipe 029634707b Oh, Pint 2026-04-14 22:50:32 +01:00
snipe fd5736fac4 Belt and suspenders 2026-04-14 22:50:21 +01:00
snipe f3ed2d9dd8 Derp. Run if the column DOES exist 2026-04-14 22:38:44 +01:00
snipe 676cd66e4b Make the temp datetime nullable 2026-04-14 22:31:00 +01:00
snipe 17c73c4017 Pint :( 2026-04-14 22:30:26 +01:00
snipe 5983a4530f Fix back in time migrations for very old restores or upgrades 2026-04-14 22:30:05 +01:00
snipe 1cd8395b23 Piiiint 2026-04-14 21:44:08 +01:00
snipe ea4374a855 Oops. Forgot to commit accessories :D 2026-04-14 21:44:00 +01:00
snipe 061b913413 Better naming for session variable 2026-04-14 20:54:42 +01:00
Godfrey M b2fda13ac3 adds option for only deleted users and company id for eula purging 2026-04-14 11:58:54 -07:00
snipe e79af0163a Oh, Pint 2026-04-14 19:49:18 +01:00
snipe 91e41049bd Skip the initial checkout email to the recipient if sign_in_place was checked 2026-04-14 19:49:05 +01:00
snipe 18f67bcce5 Store the sign in place in the session so it’s remembered 2026-04-14 12:20:51 +01:00
snipe 264347e323 Added redirects 2026-04-14 12:16:46 +01:00
snipe 18d9f7dbf1 Updated JS assets 2026-04-14 12:13:59 +01:00
snipe 702af91c84 Added tests 2026-04-14 12:13:02 +01:00
snipe e9db3b3861 Added sign-in-place language keys 2026-04-14 12:12:54 +01:00
snipe 896922fde5 Added acceptance checkbox to checkout blades 2026-04-14 12:09:42 +01:00
snipe 7c2bb69bc9 Nicer width for field 2026-04-14 12:02:43 +01:00
snipe d2921346a2 Fixed datepicker width 2026-04-14 11:07:59 +01:00
snipe cc06b2f0eb Merge pull request #18878 from grokability/fixes-n+1-on-history
Fixes n+1 on history
2026-04-14 11:06:44 +01:00
snipe d98c7bddba Added test to prevent n+1 regression 2026-04-14 10:25:55 +01:00
snipe fe308ef2e4 Use query clone to prevent n+1 2026-04-14 10:25:37 +01:00
snipe 9b43835e2d Added forHistory scope in ActionLog, use it in Loggable 2026-04-14 10:23:36 +01:00
snipe 88d34a5b92 Merge remote-tracking branch 'origin/master' into develop 2026-04-14 09:27:28 +01:00
snipe 019f0af282 Fixed typo 2026-04-14 09:13:45 +01:00
Marcus Moore c6619a621c Move comment 2026-04-13 16:42:47 -07:00
Marcus Moore 565e3de183 Allow updating user avatar via API 2026-04-13 16:41:21 -07:00
snipe b91dd15f96 Merge remote-tracking branch 'origin/master' into develop 2026-04-13 16:19:51 +01:00
snipe 1a852cdacf Merge pull request #18872 from grokability/location-breadcrumbs
Fixes #9037 - Added breadcrumbs to top breadcrumb trail
2026-04-13 16:19:34 +01:00
snipe 4ea527d980 Added breadcrumb to info-panel 2026-04-13 16:16:33 +01:00
snipe 392af4f127 Fixes #9037 - Added breadcrumbs to top breadcrumb trail 2026-04-13 16:09:10 +01:00
snipe 6e8e72f281 Merge remote-tracking branch 'origin/master' into develop 2026-04-13 15:52:11 +01:00
snipe 1c198500c6 Merge pull request #18871 from grokability/#18869-throw-error-if-no-MAIL_REPLYTO_ADDR-is-set
Fixed #18869 - skip mail test if no `MAIL_REPLYTO_ADDR` is given
2026-04-13 15:20:45 +01:00
snipe 8620f25c0e Fixed #18869 - skip mail test if no MAIL_REPLYTO_ADDR is given 2026-04-13 15:17:23 +01:00
snipe 1311ce48d3 Merge remote-tracking branch 'origin/master' into develop 2026-04-13 15:01:01 +01:00
snipe 8a59809937 Merge pull request #18870 from grokability/#18736-add-cumulative-cost-of-an-asset-with-maintenances
#18736 add cumulative cost of an asset with maintenances
2026-04-13 15:00:38 +01:00
snipe bac8299ea6 Added accessor for component qty 2026-04-13 14:51:48 +01:00
snipe 500dcdd582 Re-jigger the order 2026-04-13 14:51:24 +01:00
snipe cbae494c54 Fixed totals 2026-04-13 14:08:23 +01:00
snipe 09bec66406 Meh 2026-04-13 13:55:05 +01:00
snipe 2b2291dc7e Pint 2026-04-13 13:48:21 +01:00
snipe 1357b45e24 Added content to blade, refactoring some relationships 2026-04-13 13:48:14 +01:00
snipe 4a0dbba3ec Dev assets 2026-04-13 11:59:47 +01:00
snipe fcd0360135 Merge remote-tracking branch 'origin/master' into develop 2026-04-13 11:57:54 +01:00
snipe 6935cf1dde Merge pull request #18867 from grokability/fixed-#18856-duplicate-icons
Fixed #18856 - clicking and canceling would result in multiple icons in modal
2026-04-13 11:57:36 +01:00
snipe cf384373df Fixed #18856 - clicking and canceling would result in multiple icons in modal 2026-04-13 11:50:41 +01:00
snipe 48c4f34af3 Fixed #18863 - backfill status vs status_type for older integrations 2026-04-13 11:08:14 +01:00
snipe 7b800152ee Merge pull request #18866 from grokability/adds-validation-check-console-command
Adds validation check console command - helps with #18851
2026-04-13 10:45:49 +01:00
snipe f289691e22 Merge pull request #18865 from Joly0/patch-1
Add artisan command to clear compiled views (for docker startup.sh)
2026-04-13 10:45:25 +01:00
snipe 50421494c5 Pint 2026-04-13 10:33:55 +01:00
snipe 33b8861ae3 Adds conosole command for listing invalid assets 2026-04-13 10:33:49 +01:00
Joly0 31f90d20f8 Add artisan command to clear compiled views
After the recent update to 8.4.1 this command was mandatory, but wasnt applied to docker environment, therefore (atleast for my company) views were broken (empty licenses for example). Had to manually exec into the container and execute this command.

Adding it to the startup script should bring no real downsides, but should fix this for all others and all future version of snipe-it that have the same requirement for clearing compiled views
2026-04-13 09:49:51 +02:00
snipe a94ba474f3 Updated version in confog for develop 2026-04-11 11:05:10 +01:00
snipe a81ab0ea0f Merge remote-tracking branch 'origin/master' into develop 2026-04-11 11:04:29 +01:00
snipe 87e65893d3 Updated tests with new text 2026-04-11 10:48:37 +01:00
snipe 405540aea2 Clarified text 2026-04-11 10:38:42 +01:00
snipe ccfebee5f1 Not sure why the timestamps wouldn’t handle this for us, but… 2026-04-11 10:34:03 +01:00
snipe 1d9469a3df Fix action_date on action_logs on bulk checkin and delete 2026-04-11 10:32:04 +01:00
snipe 5417bf3445 Merge pull request #18860 from uberbrady/fix_migrations
Move migration to fire after deleted_at column added to companies
2026-04-09 21:22:58 +01:00
snipe 51ea1327cf Merge pull request #18861 from grokability/log-authed-user-header
Log authed user ID header
2026-04-09 20:16:12 +01:00
Brady Wetherington 8113ddb2d5 Re-Add the old migration as an 'empty migration' just for safety 2026-04-09 20:10:02 +01:00
snipe a88ad35b68 Added token name and ID 2026-04-09 19:35:09 +01:00
snipe 6e60f59265 Changed the name because reasons 2026-04-09 19:24:11 +01:00
snipe a866bfafcd Oh ffs pint 2026-04-09 19:23:29 +01:00
snipe 97d1677568 Check for bearer token in header 2026-04-09 19:23:21 +01:00
snipe f4562db0c0 Pint 2026-04-09 19:19:56 +01:00
snipe a616da3e5c Moved to an API-only header 2026-04-09 19:19:50 +01:00
snipe a895566b02 Pint fixes 2026-04-09 19:09:32 +01:00
snipe 5d75765aae Optionally log the user’s ID in the header 2026-04-09 19:09:21 +01:00
snipe 3bc34fcd5e Added nice icons for revoked/not revoked status 2026-04-09 18:46:18 +01:00
snipe 99c3ac56e9 Fixed typo 2026-04-09 18:32:50 +01:00
Brady Wetherington 95c7d5eeff Move migration to fire _after_ the deleted_at column is added to companies 2026-04-09 18:19:28 +01:00
snipe 371f0b82f6 This is superadmin, do not scope to just the authed user 2026-04-09 18:06:27 +01:00
snipe 114b5d3db0 Updated text 2026-04-09 18:01:44 +01:00
snipe 9ab0f60b41 Merge pull request #18858 from grokability/_api-token-rework
Api token rework
2026-04-09 17:42:09 +01:00
snipe 33b8226ebe A little more cleanup 2026-04-09 17:36:32 +01:00
snipe e062062cb3 Added livewire component for persoinal access tokens for admin 2026-04-09 17:24:51 +01:00
snipe 5f713862fb Updated tests 2026-04-09 17:24:20 +01:00
snipe fe013b5ea0 A bit more polish 2026-04-09 17:20:16 +01:00
snipe 57df2dc2cf Removed extra column 2026-04-09 16:21:39 +01:00
snipe c86fa4c521 Moved tabs 2026-04-09 16:00:49 +01:00
snipe c90acf53d5 One more quick fix for consumables qty percent 2026-04-09 15:14:10 +01:00
snipe fece4d2fdc Handle 0 qty for consumables 2026-04-09 15:10:58 +01:00
snipe f49837e5fe Fix division by zero? 2026-04-09 15:08:46 +01:00
snipe e6ead7c6fa Added tests 2026-04-09 14:52:30 +01:00
snipe 3e84af83d8 Added translations to OAuthClients livewire 2026-04-09 14:52:22 +01:00
snipe aff375c799 Added OAuth table button - I don’t know if this really works properly? 2026-04-09 14:52:01 +01:00
snipe 6ada1a646f Tabbed UI 2026-04-09 14:51:33 +01:00
snipe 42bfd24a8f Expanded OAuth language 2026-04-09 14:49:33 +01:00
snipe c7c6b41dab Added revoke to user model 2026-04-09 14:49:12 +01:00
snipe 449e6b5f5c Added revoke controllers 2026-04-09 14:48:50 +01:00
snipe bbe0c7409f Added TokenRevoked action 2026-04-09 14:48:22 +01:00
snipe 41bb9c378b Added keywords for translation 2026-04-09 14:48:03 +01:00
snipe 9a82b890d4 Translation 2026-04-09 14:47:52 +01:00
snipe 2d2180c9e8 Added revoke/unrevoke routes 2026-04-09 14:26:11 +01:00
snipe 798a590c2a Pint gonna pint 2026-04-09 14:03:37 +01:00
snipe 8a08878062 Added language strings 2026-04-09 14:03:18 +01:00
snipe fde6ff1571 Pint 2026-04-09 12:16:46 +01:00
snipe 8c9a48b38a Fixed custom field search nesting 2026-04-09 12:16:40 +01:00
snipe fff89ee94c Merge pull request #18852 from marcusmoore/fixes/rb-20840-bulk-asset-checkout
Fixed potential exception in bulk asset checkout
2026-04-09 11:28:42 +01:00
Marcus Moore 2745552915 Update asset factory 2026-04-08 14:05:26 -07:00
Marcus Moore 2f400a2b17 Handle target being assigned to a non-user model 2026-04-08 13:40:37 -07:00
Marcus Moore de5256b8f5 Use correct relationship 2026-04-08 13:36:22 -07:00
Marcus Moore 344ae053cf Add failing test 2026-04-08 13:35:11 -07:00
snipe 45fffd74b7 Merge pull request #18846 from grokability/strikethroug-if-component-is-deleted
Strikethrough if component is deleted
2026-04-08 12:47:49 +01:00
snipe a0cf0751de Pint 2026-04-08 12:39:38 +01:00
snipe 7485cb81aa Show strikethrough and unlink if item is deleted 2026-04-08 12:39:29 +01:00
snipe 7faa9a6fdf Fixed #18816 - updated language in acceptance email 2026-04-08 11:24:54 +01:00
snipe f6f7063419 Fixed #18844 - use correct component for bulk editing models on category detail view 2026-04-08 11:17:48 +01:00
snipe 1300fff94c Null safe operator for assets transformer 2026-04-08 11:11:55 +01:00
snipe 5ef9798c68 Pint 2026-04-08 10:09:56 +01:00
snipe db48c18766 Fixed #18840 - added print inventory button back to locations 2026-04-08 10:09:49 +01:00
snipe 880261500b Piiiiiint 2026-04-07 19:14:08 +01:00
snipe e02c257df6 Bumper version 2026-04-07 19:13:58 +01:00
snipe d6b48a2818 Merge pull request #18835 from uberbrady/improve_restore_port_numbers
Fixed #18786 - add port number option to the restore command
2026-04-07 15:48:20 +01:00
Brady Wetherington f8c7eee17b Add port number option to the restore command 2026-04-07 15:40:44 +01:00
snipe 5898205480 Merge pull request #18834 from grokability/asset-components-display-fix
Asset components display fix
2026-04-07 15:32:16 +01:00
snipe c8d2118c74 Merge pull request #18833 from uberbrady/new_indices_for_locations_query
Add new indexes to improve some Location queries
2026-04-07 15:31:32 +01:00
snipe 50676288a1 Pint 2026-04-07 15:29:15 +01:00
snipe db2269092a Moved limit 2026-04-07 15:29:06 +01:00
Brady Wetherington ddaa75a6dd Add new indexes to improve some Location queries 2026-04-07 15:23:31 +01:00
snipe b3f56900e5 Added created_by to sortable fields 2026-04-07 14:46:23 +01:00
snipe f1820b739f Use sum 2026-04-07 14:45:52 +01:00
snipe 56957e28f9 Standardized transformer 2026-04-07 14:45:42 +01:00
snipe 3c32721791 Use ComponentsAssignment model 2026-04-07 14:44:56 +01:00
snipe 2632433cc6 Load location and company on asset load 2026-04-07 14:44:09 +01:00
snipe 16ea577099 Include created_by in pivot 2026-04-07 12:20:25 +01:00
snipe 182e06173d Merge pull request #18730 from marcusmoore/laravel-12-take-2
Upgraded to Laravel 12
2026-04-06 13:03:39 +01:00
snipe f6b4600f8a Added checkout_class alias 2026-04-06 11:24:01 +01:00
snipe 7456c9dce5 Check that $image is not empty 2026-04-06 10:58:12 +01:00
snipe f9e16e16d1 Avoid searching by human readable custom field name to avoid collisions with normal attributes 2026-04-06 10:45:10 +01:00
snipe b42094a1be Merge remote-tracking branch 'origin/develop' 2026-04-06 10:17:38 +01:00
snipe 4c343afec7 Pint 2026-04-06 10:17:29 +01:00
snipe 40b3007676 Removed duplicated custom field search 2026-04-06 10:17:23 +01:00
snipe 48395d162a Merge remote-tracking branch 'origin/develop' 2026-04-06 09:54:45 +01:00
snipe 50aaa54c27 Check status_type for list_all 2026-04-06 09:52:43 +01:00
snipe 47737b082b Missed one in the nav 2026-04-06 09:51:50 +01:00
snipe c4a3c71448 Merge remote-tracking branch 'origin/develop' 2026-04-06 09:49:41 +01:00
snipe 9939849e40 pint 2026-04-06 09:49:33 +01:00
snipe d690989b58 Use status_type instead of status for filtering 2026-04-06 09:49:24 +01:00
snipe d9deb0f30c Merge remote-tracking branch 'origin/develop' 2026-04-06 08:49:05 +01:00
snipe 53ce14dddf Switched to AND operator 2026-04-06 08:48:56 +01:00
snipe 1d0be6261b Merge pull request #18823 from grokability/small-permission-tweaks
Added actions for normalizing permissions input
2026-04-06 08:46:03 +01:00
snipe 108c6eda1d Oh, pint 2026-04-06 08:06:28 +01:00
snipe 6e33bfaf8f Don’t check for filled on groups in user save 2026-04-06 08:06:20 +01:00
snipe a7bc9f0ae9 Use fill() for more compact code 2026-04-05 13:03:37 +01:00
snipe 927e0a4e7b Just set the field directly, since it’s a UI edit 2026-04-05 13:03:02 +01:00
snipe 75b2ac9d33 Aaaaand pint 2026-04-05 13:02:22 +01:00
snipe b0d7ae6f04 Removed redundent display_name setting, since it’s already fillable 2026-04-05 13:02:13 +01:00
snipe c764605d07 Implement the new actions in the controllers 2026-04-05 12:40:34 +01:00
snipe 205cf3cf28 MOAR tests 2026-04-05 12:38:02 +01:00
snipe ea274f0df0 Added tests 2026-04-05 12:37:53 +01:00
snipe 31541c4a56 Sigh. Pint 2026-04-05 12:35:19 +01:00
snipe 2a601ae483 Switched to use actions for normalizing payload 2026-04-05 12:35:09 +01:00
snipe 3fe8600a70 Normalize permissions array 2026-04-05 11:55:08 +01:00
snipe dbd7df2b85 Merge remote-tracking branch 'origin/develop' 2026-04-04 17:09:05 +01:00
snipe 717deb544e Merge pull request #18822 from grokability/fixed-history-api-pagination
Fixed #18821- history api pagination
2026-04-04 17:08:26 +01:00
snipe 51446a5fe0 Pint 2026-04-04 16:59:30 +01:00
snipe 4c4ec3eacc Fixed #18821 - pagination on history 2026-04-04 16:59:23 +01:00
snipe 71b72eae10 Merge remote-tracking branch 'origin/develop' 2026-04-03 15:40:30 +01:00
snipe 01eb585e59 Fixed light-dark button in nav dropdown 2026-04-03 15:40:16 +01:00
snipe 2343841aa1 Merge remote-tracking branch 'origin/develop' 2026-04-03 13:57:31 +01:00
snipe b2790d98d0 Removed codacy badge (for now) 2026-04-03 13:57:20 +01:00
snipe b14e925158 Merge remote-tracking branch 'origin/develop' 2026-04-03 13:46:03 +01:00
snipe 18ef770a85 Fixed RB, added withTrashed() 2026-04-03 13:45:53 +01:00
snipe ee831c9361 Merge remote-tracking branch 'origin/develop' 2026-04-03 13:07:47 +01:00
snipe e446dc1cba Fixed [RB-4105] - check for item’s existance before applying withTrashed() 2026-04-03 13:07:37 +01:00
snipe af283c7e01 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2026-04-03 12:28:30 +01:00
snipe 4703a8b021 Pint 2026-04-03 12:28:00 +01:00
snipe eb3a608e80 Bumped to pre version 2026-04-03 12:27:50 +01:00
snipe 6fbd189553 Pint 2026-04-03 12:26:49 +01:00
snipe 753e2790ac Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-04-03 12:26:28 +01:00
snipe 2c2de8719b Exclude encrypted custom fields in search 2026-04-03 12:25:09 +01:00
snipe 1e884bf627 Update the alias 2026-04-03 12:19:49 +01:00
snipe 7a001c81ea Merge pull request #18809 from grokability/rename-assetstatus
Rename assetstatus to status (variation of #18808)
2026-04-03 11:38:45 +01:00
snipe 9e82f3ffd9 Merge pull request #18814 from Godmartinz/add-example-logo-to-label-preview
Adds #18663 generic example logo for label preview
2026-04-03 11:37:06 +01:00
snipe e1dc605657 Merge pull request #18820 from grokability/search-one-more-stab
Adds to #18778, fixes for advanced search
2026-04-03 11:36:26 +01:00
snipe bca93b57ec Pint fixes 2026-04-03 11:08:35 +01:00
snipe d929c87bbd Final fixes, tests 2026-04-03 11:08:16 +01:00
snipe 72eb4d6d4d Merge remote-tracking branch 'origin/develop' 2026-04-03 09:52:19 +01:00
snipe 0ccdeed318 Merge pull request #18817 from Godmartinz/notification-language-fix
Fixes #18811  locale for Requestable notifications
2026-04-03 09:41:06 +01:00
snipe 5d6fc9f516 Merge pull request #18818 from marcusmoore/fixes/18798-create-asset-with-scoped-locations
Fixed #18798: creating assets with location for non-super-admins with FMCS
2026-04-03 09:40:31 +01:00
snipe 7f0435e3d6 Merge pull request #18815 from marcusmoore/fixes/18810-acceptance-url-in-mail
Fixed #18810: Display acceptance url in checkout asset email
2026-04-03 09:36:40 +01:00
Marcus Moore 85d7ba73aa Set company_id in request for non-super-admins when fmcs enabled 2026-04-02 15:50:13 -07:00
Godfrey M c6a3afa555 revert change, but still add locale 2026-04-02 15:31:25 -07:00
Godfrey M 6cc8ec63be Correct way to append locale 2026-04-02 15:29:57 -07:00
Godfrey M cf7cb8069b get locale from settings before sending requestable message 2026-04-02 15:22:59 -07:00
Marcus Moore e70519c9c2 Fix test assertion 2026-04-02 13:40:16 -07:00
Marcus Moore 6617cc3e7e Add missing endif 2026-04-02 11:47:27 -07:00
Marcus Moore 3426a427d8 Add more details to failure 2026-04-02 11:30:02 -07:00
Marcus Moore 2e67787d75 Add failing test 2026-04-02 11:28:42 -07:00
snipe 70a30a96fa Try to resolve polymorism for checkout 2026-04-02 19:23:45 +01:00
Godfrey M 8832596aa0 Merge branch 'develop' into add-example-logo-to-label-preview 2026-04-02 11:08:11 -07:00
snipe 0cd013191a Merge pull request #18805 from Godmartinz/fix-company-disabled-css-bug
Fixes #18715 Fixes disabled CSS rules for select2
2026-04-02 19:07:00 +01:00
Marcus Moore 8f70b299cf Merge branch 'develop' into fixes/18798-create-asset-with-scoped-locations 2026-04-02 11:06:42 -07:00
Godfrey M 2c87a469e3 adds generic example logo if no logo present" 2026-04-02 10:55:56 -07:00
snipe 5ca2ec5534 Merge remote-tracking branch 'origin/develop' 2026-04-02 18:12:10 +01:00
snipe 46caf9d9ec Removed phpmd.xml 2026-04-02 18:11:58 +01:00
snipe 7ac0842bc2 Merge remote-tracking branch 'origin/develop' 2026-04-02 17:45:59 +01:00
snipe de1674d001 Removed the display none from bulk asset checkout 2026-04-02 17:45:48 +01:00
Godfrey M 37c30a3079 remove unnecessary css 2026-04-02 09:41:45 -07:00
snipe ce825d1df2 Merge remote-tracking branch 'origin/develop' 2026-04-02 17:39:24 +01:00
snipe b5c01ab820 Fixed #18812 - light/dark on signature page 2026-04-02 17:39:15 +01:00
snipe 8de674c837 Merge remote-tracking branch 'origin/develop' 2026-04-02 17:21:06 +01:00
snipe d289ac7f05 Pint 2026-04-02 11:26:33 +01:00
snipe 7ec60bc6f2 Same as #18808 but renamed assetstatus to status 2026-04-02 11:26:23 +01:00
snipe eb78474d1e Make order number clickable if asset 2026-04-02 10:32:21 +01:00
snipe 6dc5a4a27e Merge remote-tracking branch 'origin/develop' 2026-04-02 09:59:56 +01:00
snipe 10c8045351 Check for file view permissions 2026-04-02 09:59:46 +01:00
snipe 03b6a54fe8 Merge remote-tracking branch 'origin/develop' 2026-04-02 09:36:35 +01:00
snipe 1140795ab8 Fixed #18734 - open markdown link in new window 2026-04-02 09:36:24 +01:00
snipe 0441c07266 Merge remote-tracking branch 'origin/develop' 2026-04-02 09:17:11 +01:00
snipe 64f346a5f0 Aaaand pint 2026-04-02 09:12:03 +01:00
snipe 0ac63a8ac6 Codacy tweaks 2026-04-02 09:11:50 +01:00
snipe f5a3d751da Merge remote-tracking branch 'origin/develop' 2026-04-01 23:32:56 +01:00
snipe 985e7d0c7c Merge pull request #18806 from marcusmoore/fixes/rb-4103manufacturer-url
Fixed RB-4103: Allow more models to access dynamic url presenter method
2026-04-01 23:32:09 +01:00
snipe 97a024b3ec Merge remote-tracking branch 'origin/develop' 2026-04-01 23:29:09 +01:00
snipe c501999676 Merge pull request #18807 from grokability/adds-model-number-to-info-panel-if-asset
Added model number on info-panel if the object is an asset
2026-04-01 23:28:22 +01:00
snipe 80e7cf0b46 Added model number on info-panel if the object is an asset 2026-04-01 23:21:30 +01:00
Marcus Moore b7d2bea3ea Fix dynamic url 2026-04-01 15:15:31 -07:00
Marcus Moore 2acb38a6a5 Move dynamic method to base presenter and adjust for other model types 2026-04-01 15:05:42 -07:00
Godfrey M 8ea7242c38 remove input[type=*]:disabled 2026-04-01 14:45:23 -07:00
Godfrey M 616a93cb52 removed override changes 2026-04-01 14:33:28 -07:00
Godfrey M 7170ea0303 adjust disabled look for select 2 2026-04-01 14:28:32 -07:00
snipe 10eb14776b Merge remote-tracking branch 'origin/develop' 2026-04-01 22:09:03 +01:00
snipe a7b43d1879 Merge pull request #18800 from Godmartinz/acceptance-double-send-bug
Fix #18595 checkout acceptance url bug
2026-04-01 22:08:03 +01:00
snipe 439f3c9c91 Merge remote-tracking branch 'origin/develop' 2026-04-01 21:49:49 +01:00
snipe e2b8368f40 Removed dupe category in info panel 2026-04-01 21:49:38 +01:00
Godfrey M 1243f690c4 changed disabled=true to disabled, adjust css" 2026-04-01 13:48:56 -07:00
snipe e2c8d41a58 Merge pull request #18803 from marcusmoore/fixes/18802-support-url
Fixed #18802: Display dynamic support url for manufacturers properly
2026-04-01 21:46:34 +01:00
snipe 591bba71d5 Pint 2026-04-01 21:46:23 +01:00
snipe 7aef0f78b0 Fixed weird component linking 2026-04-01 21:46:13 +01:00
Marcus Moore b6dc0e2a08 Display dynamic support url properly 2026-04-01 13:37:06 -07:00
Godfrey M 1ed7dd0e1e fix markdown to send messages with Eulas 2026-04-01 13:17:02 -07:00
snipe 5ecfa0b8d8 Merge remote-tracking branch 'origin/develop' 2026-04-01 20:41:09 +01:00
snipe 3578580956 Fix variable 2026-04-01 20:41:00 +01:00
snipe 67457d324c Merge remote-tracking branch 'origin/develop' 2026-04-01 16:25:54 +01:00
snipe 8b4e4aff27 Merge pull request #18801 from grokability/small-improvements-to-activity-report
Small improvements to activity report
2026-04-01 16:25:40 +01:00
snipe eb11c4640b Pint :-/ 2026-04-01 16:16:36 +01:00
snipe 5806fced78 Add optional hide for history 2026-04-01 16:16:25 +01:00
snipe ee0e036354 Removed unused routes 2026-04-01 15:00:16 +01:00
snipe af0ec10e78 Addd notes tab 2026-04-01 15:00:01 +01:00
snipe ccbd73259b Fixed license tabs 2026-04-01 14:58:33 +01:00
snipe 1a44a11b62 Added journal permission 2026-04-01 14:51:57 +01:00
snipe 8502a2291b Allow non-report users to view assets, etc if they have permission 2026-04-01 14:51:42 +01:00
snipe 67ccb5e6d9 Make a generic formatter for class names 2026-04-01 14:51:10 +01:00
snipe 520a70d2ea Added tests 2026-04-01 14:50:56 +01:00
snipe 3dee30c48e Changed button color 2026-04-01 14:50:47 +01:00
snipe f314e12685 Merge remote-tracking branch 'origin/develop' 2026-04-01 10:13:50 +01:00
snipe e3b53c8fa2 Use newer files permission 2026-04-01 10:13:39 +01:00
snipe 4bb5020e0a Added assets obj to asset tab check 2026-04-01 10:13:32 +01:00
snipe 4f1fa95cf9 Check for valid category beofre chekcing for tag color 2026-04-01 10:01:17 +01:00
snipe baeeb8e609 Use shorter auth check 2026-04-01 09:56:41 +01:00
snipe f109ca6f1f Merge remote-tracking branch 'origin/develop' 2026-04-01 09:14:20 +01:00
Marcus Moore 1714d62762 Add failing test 2026-03-31 17:20:40 -07:00
Godfrey M f19ac4d5bb send checkout mail without link or acceptance reference 2026-03-31 16:38:35 -07:00
snipe c6dbccb463 Merge pull request #18799 from marcusmoore/fixes/54576-component-link
Fixed #18797: Fix link to components in asset view
2026-03-31 23:42:24 +01:00
Marcus Moore 80ca2a6d21 Fix link to component 2026-03-31 15:36:24 -07:00
snipe 90c1c8cddd Merge remote-tracking branch 'origin/develop' 2026-03-31 15:28:14 +01:00
snipe 0b6593bdc8 Merge pull request #18783 from ubc-cpsc/fix/aws-sdk-php-PKSA-4t1p-xpk2-nsss
Fixes PKSA-4t1p-xpk2-nsss for aws/aws-sdk-php
2026-03-31 15:26:24 +01:00
snipe 6e8c0e5a14 Merge pull request #18758 from Godmartinz/extends-field-value-if-no-label
Fixes FD-54467 TZe_24mm_E Field value to extend full width
2026-03-31 15:25:53 +01:00
snipe 78c300ea1b Merge pull request #18788 from Godmartinz/fix-bulk-edit-breadcrumb
Fixes bulk edit breadcrumb translation
2026-03-31 15:25:28 +01:00
snipe a3fb492e37 Merge pull request #18790 from spencerrlongg/bug/rm-dead-license-route-rb
Removes Unused License Route
2026-03-31 15:24:21 +01:00
snipe 667f50497c Merge pull request #18791 from spencerrlongg/bug/better-error-reporting-in-custom-rules
Better Error Reporting in Custom Rules
2026-03-31 15:23:53 +01:00
snipe cb93eda4e2 Merge pull request #18792 from spencerrlongg/bug/nest-error-callback-errors-properly
Wrap importer errors in array properly
2026-03-31 15:23:15 +01:00
snipe 613b536f97 Merge remote-tracking branch 'origin/develop' 2026-03-31 13:58:59 +01:00
snipe 1ffaa077e6 Use maintenance buttons on asset view 2026-03-31 13:58:49 +01:00
snipe dbc850550f Merge remote-tracking branch 'origin/develop' 2026-03-31 13:14:30 +01:00
snipe 1efe65e6ba Pint :( 2026-03-31 13:13:43 +01:00
snipe 6a39db7e47 Fixed history return 2026-03-31 13:13:35 +01:00
snipe 43841b8b3c Fixed return type 2026-03-31 10:12:24 +01:00
spencerrlongg c33ab9c924 wrap in array properly 2026-03-30 20:13:52 -05:00
spencerrlongg 135118de65 rm ->getMessage(), report full exception 2026-03-30 19:53:26 -05:00
spencerrlongg b42b9e354f rm dead route for freecheckout endpoint 2026-03-30 19:28:47 -05:00
snipe b59b51b2aa Merge remote-tracking branch 'origin/develop' 2026-03-30 20:17:53 +01:00
snipe 7677b3916d Removed parens 2026-03-30 20:17:43 +01:00
snipe b4debacd1a Merge remote-tracking branch 'origin/develop' 2026-03-30 20:06:48 +01:00
Godfrey M d91c26e718 fix bulk edit breadcrumb translation 2026-03-30 10:38:30 -07:00
snipe 8e64083f06 Removed “in active” class 2026-03-30 14:52:57 +01:00
snipe 56580f117a Fixed audit view tab on assets 2026-03-30 14:52:43 +01:00
snipe 29e994dfd0 Added manufacturer and category relationships 2026-03-30 13:05:57 +01:00
snipe b833daf943 Merge remote-tracking branch 'origin/develop' 2026-03-30 12:15:35 +01:00
snipe 537e09a0a6 Fixed #18779 - added audits tab back in 2026-03-30 12:13:56 +01:00
Joël Pittet f53f55b283 Fixes PKSA-4t1p-xpk2-nsss for aws/aws-sdk-php 2026-03-29 10:03:02 -07:00
snipe 943903d8d6 Merge remote-tracking branch 'origin/develop' 2026-03-28 10:36:48 +00:00
snipe 523920d6d6 Pint 2026-03-28 10:36:37 +00:00
snipe e39a242a76 Ignnore counts 2026-03-28 10:36:29 +00:00
snipe e3b57b0c2f Merge remote-tracking branch 'origin/develop' 2026-03-27 21:10:15 +00:00
snipe 125a9e4031 Merge pull request #18778 from grokability/advanced-search-for-licenses
Advanced search for licenses
2026-03-27 21:09:59 +00:00
snipe 9576871ff9 Pint. Sigh. 2026-03-27 21:02:37 +00:00
snipe 968724f369 Mark test as incomplete in SQLite 2026-03-27 21:02:26 +00:00
snipe 4444a63b92 Added created_at and searchableCounts 2026-03-27 20:39:27 +00:00
snipe 9924112d08 Use Filter request on categories API 2026-03-27 20:38:16 +00:00
snipe 368796c40e Added created_at to category search 2026-03-27 20:37:48 +00:00
snipe b9f6b2bbb8 Made user counts searchable 2026-03-27 20:36:45 +00:00
snipe 86afa9d201 Added advanced search to categories 2026-03-27 20:36:27 +00:00
snipe 294d320aa0 Added test 2026-03-27 20:18:13 +00:00
snipe bdd44061f3 Added ability to support aliased count/sum fields in search 2026-03-27 20:18:05 +00:00
snipe 8545d2d703 Made % remaining sortable 2026-03-27 19:21:55 +00:00
snipe 61f3180d74 Small fixes to Searchable trait 2026-03-27 19:21:41 +00:00
snipe 9efcb09836 Moved adminuser into SnipeModel 2026-03-27 19:21:27 +00:00
snipe 80b7ebd508 Moved adminuser method to the SnipeModel 2026-03-27 19:20:54 +00:00
snipe 4545cf8989 Removed broken(?) use statement 2026-03-27 19:20:11 +00:00
snipe 4dc5e8bbdb Use filter check 2026-03-27 19:19:48 +00:00
snipe 0261776778 Added FilterRequest and added refactorerd search check 2026-03-27 19:19:25 +00:00
snipe 1dfce30a32 Broke out the use statements for readaibility 2026-03-27 19:17:55 +00:00
snipe d7f44fdda4 Added license filter tests 2026-03-27 18:34:54 +00:00
snipe 8facdcd55c Added advanced search back to licenses 2026-03-27 18:34:36 +00:00
snipe 582b8858bc Pint 2026-03-27 18:34:15 +00:00
snipe 6d4264bc58 Refactor Searchable Trait to allow for filters 2026-03-27 18:34:05 +00:00
snipe 340433f418 Merge remote-tracking branch 'origin/develop' 2026-03-27 16:14:39 +00:00
snipe 107576eb01 Merge pull request #18777 from grokability/small-s3-fixes
Fixed #18573 - download URLs for S3, actually force the download
2026-03-27 15:53:48 +00:00
snipe ede406c904 Fixed #18573 - Removed extra slash in files controllers 2026-03-27 15:44:27 +00:00
snipe 3b875ce6ec Actually force the download in S3 2026-03-27 15:43:28 +00:00
snipe c89e14ae52 Removed unused showOrDownloadFile() method 2026-03-27 15:21:49 +00:00
snipe cff2fc0f16 Fixed typo 2026-03-27 13:39:39 +00:00
snipe e8b637b900 Allow qty parameter in partial 2026-03-27 12:59:24 +00:00
snipe 84bb484761 Merge remote-tracking branch 'origin/develop' 2026-03-26 17:50:06 +00:00
snipe 25c8fdd5d6 Fixed typo 2026-03-26 17:49:27 +00:00
snipe 6beaea8be9 Merge remote-tracking branch 'origin/develop' 2026-03-26 17:41:14 +00:00
snipe 7952bdefa8 Pint formatting 2026-03-26 17:40:56 +00:00
snipe 280d16637a Added file-specific policies 2026-03-26 17:40:49 +00:00
snipe cc397f6846 Merge remote-tracking branch 'origin/develop' 2026-03-26 16:27:40 +00:00
snipe bec443ce97 Tweaked checkin/checkout button statuses 2026-03-26 16:27:04 +00:00
snipe 8417007eb8 Fixed #18725 - scope by assetsForShow() 2026-03-26 16:26:33 +00:00
snipe 3db77f05e9 Merge remote-tracking branch 'origin/develop' 2026-03-26 16:05:51 +00:00
snipe 3c1eb27ce1 Merge pull request #18770 from grokability/#18767-added-uploads-for-companies
#18767 added uploads for companies
2026-03-26 16:05:20 +00:00
snipe 614a2cd5de Pint cleanup 2026-03-26 16:02:24 +00:00
snipe 616d0f00f9 Added #18767 - uploads for companies and departments 2026-03-26 16:02:07 +00:00
snipe ef22fb256b Fixed #18768 - people tab on locations 2026-03-26 14:52:43 +00:00
snipe 6e0dbc94d7 Merge remote-tracking branch 'origin/develop' 2026-03-26 13:01:33 +00:00
snipe 328a724920 Fixed #18764 - check for model category in info-panel 2026-03-26 13:01:23 +00:00
snipe f9e620a77f Merge remote-tracking branch 'origin/develop' 2026-03-26 12:57:18 +00:00
snipe 334f27424e Fixed #18765 - viewKeys hiding serial for non-licenses 2026-03-26 12:57:06 +00:00
snipe 45b7df15c3 Merge remote-tracking branch 'origin/develop' 2026-03-26 12:14:34 +00:00
snipe 316f1be3d0 Fixed typo and spacing 2026-03-26 12:14:20 +00:00
snipe a500dd4e9e Add generic history method and component blade for loggables 2026-03-26 12:13:59 +00:00
snipe 4fc35e30c4 Change permissions for maintenances tab 2026-03-26 11:21:31 +00:00
snipe 920676fbd7 Merge remote-tracking branch 'origin/develop' 2026-03-25 14:46:12 +00:00
snipe c2c90dd614 Fixed history count 2026-03-25 14:45:53 +00:00
snipe c69b83da3f Make user tab more flexible 2026-03-25 14:45:53 +00:00
snipe 3d43de0763 Added icons 2026-03-25 14:45:53 +00:00
snipe 413b571ce8 Merge pull request #18737 from guyguy333/public-s3-proxy
Add S3 proxy option
2026-03-25 14:35:56 +00:00
snipe e777d3a54c Merge pull request #18762 from vmikhnevych/debian13installer
Added #18761: Debian 13 support in snipeit.sh installer script
2026-03-25 14:32:17 +00:00
snipe 1981c7daef Merge remote-tracking branch 'origin/develop' 2026-03-25 14:10:22 +00:00
snipe 6a802f9c3c Added padding to pane 2026-03-25 14:09:19 +00:00
snipe f64912e461 Nicer padding in infopanel 2026-03-25 13:57:35 +00:00
snipe 6e3567f0bf Fixed weird BS tables search text local storage issue 2026-03-25 13:56:57 +00:00
snipe 9406b600f9 Formatting 2026-03-25 12:10:07 +00:00
snipe 1398b4cbd6 Small cleanup on the views, added comments to detail view blades 2026-03-25 12:09:56 +00:00
snipe bde097a827 Merge remote-tracking branch 'origin/develop' 2026-03-25 10:39:28 +00:00
snipe a4ad7a0baf Small tweaks to locations API 2026-03-25 10:39:12 +00:00
snipe a3927f25ce Use shorter buttons for opening in maps 2026-03-25 09:52:32 +00:00
snipe d5d8084f95 Remove unused translations 2026-03-25 09:52:19 +00:00
snipe b48fe19617 Added apple and google icon types 2026-03-25 09:51:56 +00:00
snipe f802ea4d38 Fixed tests 2026-03-25 09:20:51 +00:00
vmikhnevych 8107588576 Added #18761: Debian 13 support in snipeit.sh installer script 2026-03-25 10:01:08 +02:00
snipe 531dce4305 Merge remote-tracking branch 'origin/develop' 2026-03-24 23:12:13 +00:00
snipe 44e81dfb8a Fixed typo 2026-03-24 23:11:58 +00:00
snipe b4753e369c Fixed #18732 - use newer datepicker and wire up the today button for today’s date 2026-03-24 23:10:11 +00:00
snipe 7a5842712b Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/build/overrides.css
#	public/css/build/overrides.css.map
#	public/css/dist/all.css
#	public/mix-manifest.json
2026-03-24 21:41:59 +00:00
snipe b479cdf358 Allow zero or null for accessory qty 2026-03-24 21:40:27 +00:00
snipe 222277de9a Used correct phone string for mobile 2026-03-24 21:38:10 +00:00
snipe e285ee2931 Small fixes in formatting 2026-03-24 21:33:46 +00:00
Godfrey M c4b20a16ce use full width if no field label present on TZe_24mm_E 2026-03-24 10:30:58 -07:00
snipe ae7d967227 Merge pull request #18754 from grokability/modernize-user-view
Modernize user view
2026-03-24 13:30:39 +00:00
snipe 2135efe8a9 Small fixes 2026-03-24 13:25:47 +00:00
snipe 00c617b2b8 Fixed typo 2026-03-24 13:06:09 +00:00
snipe 8dd105a31a Added missing path info 2026-03-24 12:51:18 +00:00
snipe 66aeaaefdb More tab tweaks 2026-03-24 12:48:23 +00:00
snipe eb68789327 Added cost well 2026-03-24 12:41:56 +00:00
snipe d73ab0daa0 Tweaked styles 2026-03-24 12:41:43 +00:00
snipe bce9a91408 Responsive tabs 2026-03-24 12:41:32 +00:00
snipe 43808b00ad Tweaked styles 2026-03-24 12:41:16 +00:00
snipe 17e8ef8e30 Added role to tab nav 2026-03-24 12:40:19 +00:00
snipe d02278930d Pass an alignment to the dl 2026-03-24 12:39:16 +00:00
snipe c2597a788b Hide the info panel toggle on smaller devices 2026-03-24 12:38:59 +00:00
snipe 227afd3965 Changed icon 2026-03-24 12:36:19 +00:00
snipe fc97b68503 Added API key count 2026-03-24 10:41:11 +00:00
snipe d83ec4ea05 Merge pull request #18755 from marcusmoore/fixes/18495-bulk-audit-date
Fixed #18495: properly handle null audit date during bulk audit
2026-03-23 23:13:27 +00:00
Marcus Moore 420bf9162d Populate test cases 2026-03-23 15:54:45 -07:00
Marcus Moore 8b1ec3d54b Improve test names 2026-03-23 15:39:56 -07:00
Marcus Moore ea3d970743 Add a couple sanity tests 2026-03-23 15:39:43 -07:00
Marcus Moore a0c905de33 Handle null next_audit_date 2026-03-23 15:38:57 -07:00
Marcus Moore 3517e040c4 Organization 2026-03-23 14:22:17 -07:00
Marcus Moore cf1fb87b63 Improve assertions 2026-03-23 14:16:59 -07:00
Marcus Moore b2389fb67c Scaffold test cases 2026-03-23 14:16:55 -07:00
Marcus Moore f9f57fb161 Merge branch 'develop' into fixes/18495-bulk-audit-date
# Conflicts:
#	tests/Feature/Assets/Api/AuditAssetTest.php
#	tests/Feature/Assets/Ui/AuditAssetTest.php
#	tests/Feature/Assets/Ui/CloneAssetTest.php
#	tests/Support/Settings.php
2026-03-23 11:49:34 -07:00
Marcus Moore a9f7d42d77 Formatting 2026-03-23 10:51:54 -07:00
Marcus Moore 537861c232 Add auditing group tag to tests 2026-03-23 10:50:12 -07:00
Marcus Moore 6eaea0b73f Merge branch 'develop' into laravel-12-take-2 2026-03-23 10:29:49 -07:00
Marcus Moore ee7dddf836 Update league/commonmark 2026-03-23 10:29:44 -07:00
snipe 4c493efb24 Bulk edit not working on locations now? 2026-03-23 15:00:03 +00:00
snipe 323d308c73 Overhaul user view 2026-03-23 14:59:52 +00:00
snipe 07ddc0e574 Fixed typo 2026-03-23 14:59:41 +00:00
snipe d159f6a3db More copy to clipboard 2026-03-23 14:59:15 +00:00
snipe 1bcfe94818 More icon stuff 2026-03-23 14:58:57 +00:00
snipe f7db8ef03d Fixed typo 2026-03-23 14:58:51 +00:00
snipe 1b2a46d7a0 Made name optional 2026-03-23 14:58:42 +00:00
snipe 0ff2a971a4 Moved new styles into default layout 2026-03-23 14:05:08 +00:00
snipe dce076157b Added new tabs 2026-03-23 14:04:44 +00:00
snipe 7cc0aa336b Added more copy links 2026-03-23 14:04:37 +00:00
snipe 5b193f7a7a Added helper function 2026-03-23 14:04:06 +00:00
snipe e290c70732 Added helper function 2026-03-23 14:03:54 +00:00
snipe a73e68fa1a Added icons 2026-03-23 14:03:45 +00:00
snipe b0578757d2 Merge pull request #18749 from grokability/added-percent-bars
Added percent bars to accessories, etc list views
2026-03-23 10:57:17 +00:00
snipe bf8082f0b9 Formatted tests via pint 2026-03-23 10:48:53 +00:00
snipe 04bebca323 Added unit tests 2026-03-23 10:47:16 +00:00
snipe 0fe753b7da Added % bars to accessories, licenses, etc 2026-03-23 10:41:48 +00:00
snipe 24c3c01851 Merge remote-tracking branch 'origin/develop' 2026-03-23 09:46:13 +00:00
snipe a6a211f386 Check for manufacturer model 2026-03-23 09:46:04 +00:00
snipe 603aa39e3f Merge remote-tracking branch 'origin/develop' 2026-03-23 09:41:07 +00:00
snipe 66607069fe Merge pull request #18740 from grokability/modern-ui-for-assets-view
Modern UI for assets view
2026-03-23 09:40:46 +00:00
snipe 54badc5545 Merge pull request #18748 from grokability/copilot/sub-pr-18740-another-one
[WIP] [WIP] Address feedback on Modern UI for assets view PR
2026-03-23 09:37:05 +00:00
snipe 64c07aa7b6 Merge pull request #18747 from grokability/copilot/sub-pr-18740-again
[WIP] [WIP] Address feedback on Modern UI for assets view PR
2026-03-23 09:36:34 +00:00
copilot-swe-agent[bot] 9d40df179d Guard last_checkout against null before calling diffForHumans
Co-authored-by: snipe <197404+snipe@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grokability/snipe-it/sessions/dfb459ae-6819-47c9-8db5-67d70a8e9e2d
2026-03-23 09:35:35 +00:00
copilot-swe-agent[bot] af5e87970e fix: remove duplicate @elseif condition in currency prefix display
Co-authored-by: snipe <197404+snipe@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grokability/snipe-it/sessions/191de9a3-2211-4805-b0f8-27dc485af039
2026-03-23 09:35:35 +00:00
copilot-swe-agent[bot] e9d7189e16 Initial plan 2026-03-23 09:34:43 +00:00
copilot-swe-agent[bot] 1cc15c3931 Initial plan 2026-03-23 09:34:35 +00:00
snipe dfb4cae5ed Merge pull request #18746 from grokability/copilot/sub-pr-18740-again
[WIP] [WIP] Address feedback on Modern UI for assets view PR
2026-03-23 09:32:21 +00:00
copilot-swe-agent[bot] c4c8750b26 Fix showCheckoutButton/showCheckinButton to call availability methods
Co-authored-by: snipe <197404+snipe@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grokability/snipe-it/sessions/2cd4613d-eb6f-499d-8df3-4463e731a501
2026-03-23 09:31:07 +00:00
copilot-swe-agent[bot] aa25a68af8 Initial plan 2026-03-23 09:29:20 +00:00
snipe ad5c5e27bd Merge pull request #18745 from grokability/copilot/sub-pr-18740
Fix progress bar percentages: real 0–100 values with null guards
2026-03-23 09:27:27 +00:00
snipe 141e28d627 Deleted example blade component 2026-03-23 09:25:31 +00:00
snipe d0b28b6e65 Fixed ternary 2026-03-23 09:24:48 +00:00
copilot-swe-agent[bot] 068e6c0e92 Fix progress bar percentages: compute real 0-100 values with null guards and clamping
Co-authored-by: snipe <197404+snipe@users.noreply.github.com>
Agent-Logs-Url: https://github.com/grokability/snipe-it/sessions/bb7b5cc7-2a85-425c-be61-555bbaddc99c
2026-03-23 09:23:20 +00:00
copilot-swe-agent[bot] 95a342fc25 Initial plan 2026-03-23 09:19:49 +00:00
snipe b21efb91b5 Update app/Models/SnipeModel.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 09:15:30 +00:00
snipe d363793c56 Update resources/lang/en-US/general.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 09:15:11 +00:00
snipe 7e687e91c2 Update resources/views/blade/button/label.blade.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 09:13:41 +00:00
snipe 255c7e323f Update resources/views/blade/button/note.blade.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-23 09:13:25 +00:00
snipe d3fd535605 Merge remote-tracking branch 'origin/develop' 2026-03-23 08:59:36 +00:00
snipe 5992525d8e Merge pull request #18744 from grokability/added-percent-remaining-and-add-asset-button
Added % remaining and create asset button to models view and list
2026-03-23 08:59:23 +00:00
snipe 03b0e24289 Added % remaining and create asset button to models view and list 2026-03-23 08:54:13 +00:00
snipe f7f58ba12d Merge remote-tracking branch 'origin/develop' 2026-03-21 10:59:37 +00:00
snipe 595b5c865f Merge pull request #18742 from grokability/added-armenian-updated-languages
Added Armenian updated languages
2026-03-21 10:59:20 +00:00
snipe 2b2a015f51 Updated language strings 2026-03-21 10:57:56 +00:00
snipe 8160ebf854 Added Amenian 2026-03-21 10:57:28 +00:00
snipe dc27169129 Added Armenian as a language option 2026-03-21 10:47:03 +00:00
snipe 8d7cf50089 Merge remote-tracking branch 'origin/develop' 2026-03-21 10:20:26 +00:00
snipe 8498b9b6bd Use route model binding for department 2026-03-21 10:20:18 +00:00
snipe aead8f6c56 Merge remote-tracking branch 'origin/develop' 2026-03-21 10:03:19 +00:00
snipe d58fda626e Import company model 2026-03-21 10:02:18 +00:00
snipe 0f753ae5b5 Merge pull request #18739 from ubc-cpsc/fix/commonmark-PKSA-21fb-n1x5-5nf7
Fix CVE-2026-33347 and CVE-2026-30838 in league/commonmark
2026-03-21 09:51:01 +00:00
snipe 3371ac9552 Use calendar icon 2026-03-20 19:18:08 +00:00
snipe 1351df90f9 Link to manager in user profile if they have one and can see the user’s profile 2026-03-20 19:17:52 +00:00
snipe 02b6a928b4 Moved calendar stuff together in icon helper 2026-03-20 19:16:58 +00:00
snipe a1c72d8972 Added presenter 2026-03-20 18:23:17 +00:00
snipe 62596c875e New strings 2026-03-20 18:23:10 +00:00
snipe 282388fb33 New transformers 2026-03-20 18:23:04 +00:00
snipe afbd31ca01 Only allow audit if not deleted 2026-03-20 18:22:53 +00:00
snipe f1d32b8cae Show the field but with no data if no value 2026-03-20 18:22:39 +00:00
snipe fa7033f4e3 Hide buttons on print 2026-03-20 18:22:21 +00:00
snipe 46bcc7ede8 Added manufacturer to side panel 2026-03-20 18:22:13 +00:00
snipe 2adc10ed6e Make sure the object exists (only needed when models are invalid/broken 2026-03-20 18:22:01 +00:00
snipe ab8a88350f Added additional parameters for licenses table 2026-03-20 18:21:36 +00:00
snipe e1809f1c19 Only allow notes, labels if not deleted 2026-03-20 18:21:05 +00:00
snipe b8cc9ac788 Added checkin button 2026-03-20 18:20:46 +00:00
snipe 40c2a49e98 Progressbar and other work 2026-03-20 18:20:36 +00:00
snipe 1894f55474 Commented out a weird test 2026-03-20 18:19:52 +00:00
snipe 18a4c88ead RMB on licenses for assets API call 2026-03-20 18:19:42 +00:00
snipe 210fd6399a Helper methods to determine if the asset or thing can be checked in 2026-03-20 18:19:17 +00:00
Joël Pittet b91882f5dd Fix commonmark security update 2026-03-20 10:26:26 -07:00
snipe 6af827f595 Fixed weird copy icon on layout 2026-03-20 15:48:30 +00:00
snipe 200d92186c More updates to hardware view 2026-03-20 13:27:12 +00:00
snipe cc971dba4c Added info-panel components 2026-03-20 13:27:04 +00:00
snipe 35c0b3b8b1 Changed location for info-panel 2026-03-20 13:26:39 +00:00
snipe cf637f8f65 Added last note to language 2026-03-20 10:28:23 +00:00
snipe c86226c13b Made status component a bit more generic 2026-03-20 10:28:13 +00:00
snipe eaed40966a Added model to info-panel 2026-03-20 10:27:59 +00:00
snipe 5083207477 Updated model files tab component with correct hash 2026-03-20 10:27:50 +00:00
snipe 5f57402903 Added progressbar component 2026-03-20 10:27:29 +00:00
snipe 4c9ffe4eb9 Fixed suppliers tab component 2026-03-20 10:27:06 +00:00
snipe f705a2e24d Made (very messy) custom fields component 2026-03-20 10:25:47 +00:00
snipe 61a8567cc3 Updated copy to clipboard component 2026-03-20 10:25:30 +00:00
snipe 8e33a644cf Removed unused code 2026-03-20 10:25:01 +00:00
Marcus Moore e2e4743994 Attempt to handle docker build fail 2026-03-19 13:56:44 -07:00
Marcus Moore 7b1a5aea19 Revert "Allow installation when MAIL_FROM_ADDR is not set"
This reverts commit 602e13dab7.
2026-03-19 13:37:44 -07:00
Marcus Moore 602e13dab7 Allow installation when MAIL_FROM_ADDR is not set 2026-03-19 13:31:38 -07:00
Marcus Moore 64117b92b0 Revert "Add default address for docker"
This reverts commit 17c89a3f2b.
2026-03-19 13:19:23 -07:00
Marcus Moore 17c89a3f2b Add default address for docker 2026-03-19 12:07:24 -07:00
Guillaume Delbergue 1482abc8b9 feat: add PUBLIC_S3_PROXY option to serve public uploads through the app
When PUBLIC_S3_PROXY=true, public uploads (images, logos, avatars) are
served through a proxy controller instead of directly from S3. This
allows using a single fully private S3 bucket for all storage, with no
public ACLs or direct S3 URLs exposed to the browser.

The proxy streams files from the configured public disk with proper
cache headers (ETag, Last-Modified, Cache-Control). Disabled by default
for full backward compatibility.
2026-03-19 19:41:05 +01:00
Brady Wetherington 9d33a2c524 Merge branch 'develop' into use_new_laravel_scim_server 2026-03-19 17:41:18 +00:00
snipe af31dfd19c Formatting 2026-03-19 17:13:47 +00:00
snipe 53c090fd6c First stab 2026-03-19 17:13:24 +00:00
snipe 1aef412b13 Merge pull request #18735 from marcusmoore/fixes/54250-assigned-to-in-expiring-assets
Fixed FD-54250: Display assigned entity in expiring assets mail
2026-03-19 16:55:09 +00:00
Marcus Moore f9956cf617 Display assigned to in expiring assets mail 2026-03-19 09:30:47 -07:00
Guillaume Delbergue bc7473d863 feat: use Storage::disk('public')->url() instead of hardcoded upload URLs
Several presenters, models, transformers, and Blade views were building
upload URLs by concatenating config('app.url') with hardcoded '/uploads/'
paths. This only works with local storage and breaks when using S3 or
any non-local public disk. Replaced with Storage::disk('public')->url()
which respects the configured filesystem driver.

Made-with: Cursor
2026-03-19 13:52:36 +01:00
Marcus Moore a470ba76df Remove assertion
Log::setEventDispatcher(Event::fake()) no longer works...
2026-03-18 14:04:17 -07:00
snipe 84c42999e4 Merge remote-tracking branch 'origin/develop' 2026-03-18 20:04:59 +00:00
snipe 5f1566d6ab Fixed path for translations 2026-03-18 19:59:25 +00:00
snipe 87c5e3e01e Fixed path for non-deletable path info 2026-03-18 19:59:10 +00:00
snipe 27a554bebd Merge pull request #18728 from grokability/modernize-views
Modernize views
2026-03-18 19:57:36 +00:00
Marcus Moore 3ce017fa68 Upgrade to Laravel 12
Co-authored-by: Brady Wetherington <bwetherington@grokability.com>
2026-03-18 12:36:16 -07:00
Marcus Moore d446da2243 Update telescope 2026-03-18 12:23:46 -07:00
Marcus Moore cdb4416421 Update collision 2026-03-18 12:21:38 -07:00
Marcus Moore a1de8aa20c Bump phpunit to v11 2026-03-18 12:20:57 -07:00
Marcus Moore adfad90f7c Bump laravel-backup to v9
Co-authored-by: Brady Wetherington <bwetherington@grokability.com>
2026-03-18 12:17:46 -07:00
Marcus Moore 22703806cd Bump larastan to v3 2026-03-18 12:11:20 -07:00
Marcus Moore 22a63fc2ee Bump scim server 2026-03-18 12:10:33 -07:00
snipe eec2773c88 Changed history icon 2026-03-18 17:01:10 +00:00
snipe c1c3c6724f Use history tab icon 2026-03-18 17:00:59 +00:00
snipe 0223304ec7 Moved files table header into component 2026-03-18 16:35:47 +00:00
snipe 08f9879ada Added details and models tab nav 2026-03-18 16:31:59 +00:00
snipe 29559485e2 Removed erroneous content slot 2026-03-18 16:17:52 +00:00
snipe 6e100177da Nicer UI for groups 2026-03-18 15:57:18 +00:00
snipe d36e17eaae Check for deletability in groups 2026-03-18 15:57:11 +00:00
snipe 51e60d2d6b Fixed name in companies 2026-03-18 15:28:32 +00:00
snipe 995276643c Updated suppliers view to use more specific components 2026-03-18 15:20:02 +00:00
snipe a3c792619d Updated company to use specific blade components 2026-03-18 15:19:29 +00:00
snipe 946161a514 Updated icon 2026-03-18 15:18:51 +00:00
snipe 075be02f96 Added maintenance tab element 2026-03-18 15:18:46 +00:00
snipe 3664bbf423 Changed to use table_header slot 2026-03-18 15:17:19 +00:00
snipe 820b41927d Updated icon 2026-03-18 15:16:31 +00:00
snipe 7ff5927409 Removed active class - this is handled via JS now 2026-03-18 15:15:47 +00:00
snipe f93b40f402 Smaller header for tables 2026-03-18 14:40:16 +00:00
snipe 7d226a6dca Set default API routes in table components 2026-03-18 14:16:29 +00:00
snipe 7b2edd0762 Use table components 2026-03-18 13:20:36 +00:00
snipe 5dc0401f23 Use correct bulk edit component 2026-03-18 13:18:19 +00:00
snipe b5164e4c92 Remove sticky header from maintenance report 2026-03-18 13:17:15 +00:00
snipe e1a06fa188 Switch to users table component 2026-03-18 13:16:57 +00:00
snipe b2ec69ce7f Make table blades more flexible 2026-03-18 13:16:15 +00:00
snipe a9706f6d5e Added users table component 2026-03-18 12:48:54 +00:00
snipe cee2b77fbc Moved filestable into table component directory 2026-03-18 12:48:34 +00:00
snipe 3425599461 Moved filestable into table blade directory 2026-03-18 12:47:46 +00:00
snipe 104123495d Use generic name translation 2026-03-18 12:44:32 +00:00
snipe c2735fce90 Added sumformatter 2026-03-18 12:44:22 +00:00
snipe d4ff9dce24 Added sumformatter 2026-03-18 12:44:11 +00:00
snipe 5c8a62d9b7 Added wrap-prevention on tag colors 2026-03-18 12:21:20 +00:00
snipe 87fa71c599 Use table component for maintenance index 2026-03-18 08:11:02 +00:00
snipe 0b08b8007b Use table component for maintenances 2026-03-18 08:10:40 +00:00
snipe 3e93684451 Added sumformatter to maintenances 2026-03-18 08:09:59 +00:00
Godfrey M 8747ff32dd Merge branch 'develop' into update-print-invtentory-view-with-assigned2assets
# Conflicts:
#	app/Http/Controllers/ProfileController.php
#	app/Http/Controllers/Users/UsersController.php
2026-03-17 16:11:16 -07:00
snipe 218190d989 Merge remote-tracking branch 'origin/develop' 2026-03-17 14:01:35 +00:00
snipe 0a4ec84875 Use has instead of filled for email, username, etc 2026-03-17 13:58:59 +00:00
snipe 33402f5e0c Merge remote-tracking branch 'origin/develop' 2026-03-17 13:29:13 +00:00
snipe d0e57cfab6 Added null operator in the case of a bad status label on asset audit 2026-03-17 13:27:46 +00:00
snipe 0ebd103e21 Merge remote-tracking branch 'origin/develop' 2026-03-17 13:11:20 +00:00
snipe 95ba562021 Remove int from asset_maintenance_time 2026-03-17 13:11:10 +00:00
snipe 67f5fb72c3 Merge remote-tracking branch 'origin/develop' 2026-03-17 12:22:34 +00:00
snipe 62cadfdc8c Removed permissions on report view 2026-03-17 12:22:26 +00:00
snipe 27e8995cce Merge pull request #18722 from grokability/improve-maintenance-report
Improved asset maintenance report
2026-03-17 12:21:24 +00:00
snipe e2406e33d8 Improved asset maintenance report 2026-03-17 12:16:31 +00:00
snipe da2dd79765 Merge pull request #18720 from marcusmoore/pint-tests
Apply pint to tests directory
2026-03-17 10:32:40 +00:00
snipe 4568180e85 Merge remote-tracking branch 'origin/develop' 2026-03-17 09:07:00 +00:00
Marcus Moore cc8f59d9e0 Add pint commits 2026-03-16 17:41:25 -07:00
Marcus Moore 446f5f3cef Run pint on tests 2026-03-16 17:40:57 -07:00
Marcus Moore d84eb43278 Snake case FMCS and permission methods in tests 2026-03-16 17:36:35 -07:00
snipe bb72dab877 Merge pull request #18719 from marcusmoore/ignore-revs
Add .git-blame-ignore-revs file
2026-03-16 23:41:08 +00:00
Marcus Moore b06762ea4f Fix commits 2026-03-16 15:31:41 -07:00
Marcus Moore 33d75cdd2d Fix commit 2026-03-16 15:25:52 -07:00
Marcus Moore 3372b7a647 Fix comments 2026-03-16 15:25:03 -07:00
Marcus Moore 4e0d34b826 Create and add styling commits to .git-blame-ignore-revs 2026-03-16 15:24:16 -07:00
snipe 324c937cc4 Merge remote-tracking branch 'origin/develop' 2026-03-16 21:06:38 +00:00
snipe 908d04e98a Merge pull request #18718 from grokability/added-blade-component-for-status
Added status component box
2026-03-16 21:06:24 +00:00
snipe 79fd541498 Removed if/else 2026-03-16 20:57:18 +00:00
snipe 8c360a26e5 Added status component box 2026-03-16 20:49:15 +00:00
snipe 93ae07cc89 Merge remote-tracking branch 'origin/develop' 2026-03-16 20:08:56 +00:00
snipe 713a726bde Merge pull request #18717 from grokability/#18574-add-checked-out-to-to-maintenances
Fixed #18574 - adds checked out field to maintenances
2026-03-16 20:05:26 +00:00
snipe 100f1683be Added checkout info to view 2026-03-16 19:59:09 +00:00
snipe ed201b24d6 Fixed #18574 - adds checked out field to maintenances 2026-03-16 19:54:04 +00:00
snipe 0b7ebcaeb0 Merge pull request #18543 from Godmartinz/changing-recipient-header-to-cc
Fix CC Mail header for checkouts and check-ins
2026-03-16 10:41:28 +00:00
snipe 52a9993b0d Merge remote-tracking branch 'origin/develop' 2026-03-16 10:36:13 +00:00
snipe 4e733fab02 Merge pull request #18714 from grokability/#17348-show-deleted-assets-for-deleted-models
Fixed #17348 - show deleted assets for deleted models
2026-03-16 10:35:59 +00:00
snipe 3257c6e709 Updated restore button to be inline 2026-03-16 10:30:48 +00:00
snipe ece4ed4caf Added optional deleted_at constraint 2026-03-16 10:30:36 +00:00
snipe fa04891ddb Added tooltip for clone and edit 2026-03-16 10:24:25 +00:00
ArturoSirvent 6145c6cc5a Fix backup disk driver configuration for S3 support
- Fix the backup disk in config/filesystems.php to use a dedicated BACKUP_FILESYSTEM_DRIVER env var instead of PRIVATE_FILESYSTEM_DISK
- Add AWS credential fields to the backup disk config so S3 backups work
- Use BACKUP_FILESYSTEM_ROOT with safe default (storage_path('app')) for local driver
- Document BACKUP_FILESYSTEM_DRIVER and BACKUP_FILESYSTEM_ROOT in .env.example

Fixes #14057
2026-03-14 23:24:58 +01:00
snipe dffff07436 Removed codacy config 2026-03-13 18:29:21 +00:00
snipe 97854ad02d Bumped hash 2026-03-13 18:27:23 +00:00
snipe 500d6e1f2d Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2026-03-13 18:25:48 +00:00
snipe f69e2c671b Merge pull request #18709 from grokability/pint-resources
Applied pint to languages and resources
2026-03-13 18:22:55 +00:00
snipe 84fdb5d6c1 Applied pint to languages and resources 2026-03-13 18:17:51 +00:00
snipe dc58ddce59 Merge pull request #18708 from grokability/pint-database
Apply pint to database directory
2026-03-13 18:14:02 +00:00
snipe b5a46a370f Apply pint to database directory 2026-03-13 18:12:37 +00:00
snipe 199bdb219f Merge pull request #18707 from grokability/pint-config
Apply pint to config directory
2026-03-13 18:11:02 +00:00
snipe c1a93e3ac8 Apply pint to config directory 2026-03-13 18:08:12 +00:00
snipe f334b8caa3 Merge pull request #18706 from grokability/pint-providers
Apply pint to Providers directory
2026-03-13 18:03:57 +00:00
snipe 8b658a19b9 Apply pint to Providers directory 2026-03-13 17:56:51 +00:00
snipe 59dd9970d0 Merge pull request #18705 from grokability/pint-presenters
Apply pint to Presenters directory
2026-03-13 17:53:04 +00:00
snipe 55d46cbefe Apply pint to Presenters directory 2026-03-13 17:43:54 +00:00
snipe e37ce27773 Merge pull request #18704 from grokability/pint-policies-and-observers
Apply pint to Observers and Policy directories
2026-03-13 17:42:57 +00:00
snipe b2c0a21230 Apply pint to Observers and Policy directories 2026-03-13 17:41:08 +00:00
snipe 00704aea73 Merge pull request #18703 from grokability/pint-notifications
Apply pint to Notifications directory
2026-03-13 17:39:24 +00:00
snipe 31043d1f5c Apply pint to Notifications directory 2026-03-13 17:37:47 +00:00
snipe 33b68c11db Merge pull request #18702 from grokability/pint-mail
Apply pint to Mail directory
2026-03-13 17:32:33 +00:00
snipe de607e7d83 Apply pint to Mail directory 2026-03-13 17:26:56 +00:00
snipe ab7ff30a73 Merge pull request #18701 from grokability/pint-livewire
Applied pint to Livewire directory
2026-03-13 17:25:21 +00:00
snipe 53f2ef2ca1 Applied pint to Livewire directory 2026-03-13 17:19:19 +00:00
snipe 25f2e560f1 Merge pull request #18700 from grokability/pint-jobs-listeners
Apply pint to Jobs and Listeners directory
2026-03-13 17:18:21 +00:00
snipe 317b1a462e Apply pint to Jobs and Listeners directory 2026-03-13 17:13:08 +00:00
snipe bf97734533 Merge pull request #18699 from grokability/pint-importer
Apply pint to Importer directory
2026-03-13 17:11:35 +00:00
snipe 3e831bf9b3 Apply pint to Importer directory 2026-03-13 17:10:06 +00:00
snipe b4400b38a9 Merge pull request #18698 from grokability/pint-traits-and-transformers
Applied pint to Traits and Transformers
2026-03-13 17:07:54 +00:00
snipe a613380811 Applied pint to Traits and Transformers 2026-03-13 17:02:28 +00:00
snipe 7f30fe1a95 Merge pull request #18697 from grokability/pint-requests
Apply pint to Requests directory
2026-03-13 17:00:47 +00:00
snipe 93168326da Apply pint to Requests directory 2026-03-13 16:56:26 +00:00
snipe 70c672eb52 Merge pull request #18696 from grokability/pint-middleware
Apply pint to Middleware directory
2026-03-13 16:54:17 +00:00
snipe ec6caf9b59 Apply pint to Middleware directory 2026-03-13 16:53:11 +00:00
snipe 1f1d41ecfd Merge pull request #18695 from grokability/pint-controllers
Apply pint to non-API controllers
2026-03-13 16:50:28 +00:00
snipe 9bc92f57c8 Apply pint to non-API controllers 2026-03-13 16:45:30 +00:00
snipe bbe6475eb2 Merge pull request #18694 from grokability/pint-api-controllers
Apply pint to API controllers
2026-03-13 16:43:33 +00:00
snipe 1e5d426e70 Apply pint to API controllers 2026-03-13 16:38:23 +00:00
snipe ccf6856143 Apply pint to Helpers 2026-03-13 16:37:19 +00:00
snipe 175d8306b8 Merge pull request #18693 from grokability/pint-exceptions
Apply pint to Exceptions directory
2026-03-13 16:35:43 +00:00
snipe 2e7046a810 Apply pint to Exceptions directory 2026-03-13 16:32:11 +00:00
snipe c03c913ce7 Merge pull request #18692 from grokability/pint-enums
Apply pint to enums and events
2026-03-13 16:30:52 +00:00
snipe f7b82ad1ff Apply pint to enums and events 2026-03-13 16:25:59 +00:00
snipe 118ddfce94 Merge pull request #18691 from grokability/pint-console
Apply pint to Console directory
2026-03-13 16:24:39 +00:00
snipe 8bce38b918 Apply pint to Console directory 2026-03-13 16:20:24 +00:00
snipe d31ba20dd5 Merge pull request #18690 from grokability/pint-actions
Use pint on actions directory
2026-03-13 16:19:11 +00:00
snipe a3c7410c35 Apply pint to actions directory 2026-03-13 16:04:34 +00:00
snipe 624e6839c3 Merge pull request #18689 from grokability/pint-models
Use pint on models directory
2026-03-13 16:02:51 +00:00
snipe 9623fa4d87 Use pint on models directory 2026-03-13 15:55:28 +00:00
snipe c196637922 Install pint dev dependency 2026-03-13 14:52:13 +00:00
snipe 67284e2e6d Updated badge in readme 2026-03-13 11:17:36 +00:00
snipe f6ee500e6c Merge pull request #18684 from marcusmoore/copilot-updates
Updated copilot instructions
2026-03-13 11:16:41 +00:00
snipe b76d909619 Merge pull request #18685 from marcusmoore/test-improvements
Improved asset tests
2026-03-13 11:16:29 +00:00
snipe faf9cecc10 Merge pull request #18688 from grokability/normalize-requests-with-class-reference
Use Blah::class instead of new Blah in form requests
2026-03-13 11:09:42 +00:00
snipe 1246de2644 Use Blah::class instead of new Blah in form requests 2026-03-13 11:02:05 +00:00
snipe 0c72109ad8 Revert RMB for more consistent UX 2026-03-13 09:34:26 +00:00
Marcus Moore 5aad15256c Improve tests around assets 2026-03-12 16:15:27 -07:00
Marcus Moore 69f7778067 Revise copilot instructions 2026-03-12 15:56:37 -07:00
snipe 5d6b9890ca Import eloquent model 2026-03-12 18:44:45 +00:00
snipe 20382ea5bf Merge remote-tracking branch 'origin/develop' 2026-03-12 14:54:28 +00:00
snipe 0d257d956f Undo json encode 2026-03-12 14:54:18 +00:00
snipe f853d25d4f Merge remote-tracking branch 'origin/develop' 2026-03-12 14:46:48 +00:00
snipe 4c05f26940 Merge pull request #18681 from grokability/redirect-fixes
Use intended() for redirect options
2026-03-12 14:44:38 +00:00
snipe ce18ff669c Added admin check 2026-03-12 14:42:36 +00:00
snipe a3b5346773 Ignore the sqlite database in git 2026-03-12 14:24:59 +00:00
snipe 3c96491295 Remove unused route 2026-03-12 14:24:46 +00:00
snipe 53abf8cdcc Load count with RMB controller 2026-03-12 14:10:43 +00:00
snipe e376492128 Use intended() for redirect options 2026-03-12 13:57:50 +00:00
snipe 2658b9b064 Fixed variable in trans_choice for deployable check 2026-03-12 13:47:23 +00:00
snipe 46e7e12cb2 Merge remote-tracking branch 'origin/develop' 2026-03-12 13:41:06 +00:00
snipe f412b56caa Fixed #18678 - small UI tweaks 2026-03-12 13:40:47 +00:00
snipe 9c63b40a5a Merge pull request #18680 from grokability/copilot
Added copilot instructions file
2026-03-12 13:21:38 +00:00
snipe 40843f93dc Added copilot instructions file 2026-03-12 13:20:37 +00:00
snipe 9165f59dcc Normalized requiered colors 2026-03-12 12:23:20 +00:00
snipe 92ff333778 Force foreground color for label form-control 2026-03-12 12:13:59 +00:00
snipe 63e62cde1b Moved gates higher, switch to RMB for accessories 2026-03-12 12:13:38 +00:00
snipe c5081ce3e5 Added colors to setting seeder 2026-03-12 11:47:04 +00:00
snipe 67d2a5d094 Use better maintenance name 2026-03-12 11:44:40 +00:00
snipe a170da5c01 Merge pull request #18679 from grokability/normalize-breadcrumb-text
Normalize breadcrumb text
2026-03-12 11:42:27 +00:00
snipe 9652cb312a Normalize breadcrumb text 2026-03-12 11:34:38 +00:00
snipe e4d7e08902 Merge pull request #18672 from marcusmoore/remove-laravel-collective-dep
Fixed #17199: Remove Laravel Collective HTML dependency
2026-03-11 19:53:25 +00:00
snipe ce3a7bb687 Merge remote-tracking branch 'origin/develop' 2026-03-11 17:57:10 +00:00
snipe 428095b71b Fixed #18670 - set nav link color override in ResetDemo console command 2026-03-11 17:56:58 +00:00
Marcus Moore 411ffb12ca Merge branch 'develop' into remove-laravel-collective-dep 2026-03-11 10:41:06 -07:00
snipe 3b93193da1 Merge pull request #18667 from marcusmoore/migrate-link-methods
Fixed #18666: Migrate Laravel Collective helper methods
2026-03-11 10:14:31 +00:00
snipe 17584e4799 Merge remote-tracking branch 'origin/develop' 2026-03-11 09:33:14 +00:00
snipe 224a813f25 Fixed #18668 - changed button type 2026-03-11 09:33:03 +00:00
Marcus Moore 7d079f74a1 Uninstall laravelcollective/html 2026-03-10 16:52:42 -07:00
Marcus Moore 4ca53e6f70 Remove Collective provider and aliases 2026-03-10 16:45:48 -07:00
Marcus Moore 70d1ffe294 Remove MacroServiceProvider and macros.php 2026-03-10 16:39:30 -07:00
Marcus Moore 335e1a7e18 Merge branch 'develop' into migrate-link-methods 2026-03-10 16:35:23 -07:00
Marcus Moore 287481a44e Fix model reference 2026-03-10 13:38:14 -07:00
Marcus Moore 2dd09f9702 Remove unused method 2026-03-10 13:35:25 -07:00
snipe 1503f90394 Merge remote-tracking branch 'origin/develop' 2026-03-10 20:26:06 +00:00
snipe 9317d6551d Fixed #18653 - “select company” to “company” in user edit 🙄 2026-03-10 20:25:53 +00:00
snipe d2834fcdb9 Merge remote-tracking branch 'origin/develop' 2026-03-10 20:13:10 +00:00
snipe ed3d30e343 Merge pull request #18657 from marcusmoore/form-macros
Fixed #17200 and #17201: Remove alt_barcode_types and barcode_types macros
2026-03-10 20:11:01 +00:00
Marcus Moore ca5a25f703 Replace remaining calls to link_to_route in Presenters 2026-03-10 13:06:46 -07:00
Godfrey M 4ddd2f1cf8 change indirect Asset name 2026-03-10 12:49:37 -07:00
Godfrey M 11c8fd4d4c update scope for directLicense.category" 2026-03-10 12:41:19 -07:00
Godfrey M ab04f3de93 use inventory scope, add quantity to print blade 2026-03-10 12:35:34 -07:00
Marcus Moore 692a9ebebf Replace call to link_to_route 2026-03-10 11:58:27 -07:00
Marcus Moore bf314a0f84 Replace call to link_to_route 2026-03-10 11:54:29 -07:00
Marcus Moore c8c2bb6709 Remove unused serialUrl method from LicensePresenter 2026-03-10 11:31:07 -07:00
Godfrey M 4c16796256 reduce query count to 52 2026-03-10 10:59:59 -07:00
Marcus Moore 3fc8b976fc Merge branch 'develop' into form-macros
# Conflicts:
#	resources/macros/macros.php
2026-03-10 10:12:31 -07:00
Godfrey M 516771d948 update profile Controller print inventory 2026-03-10 09:50:00 -07:00
snipe 6b9dc97fa1 Merge pull request #18665 from grokability/#18662-fix-seat-search
Fixed #18662 wire up search box in assigned license seats
2026-03-10 16:10:37 +00:00
snipe 69d7d6aae2 Fixed #18661 - return true/false in JSON 2026-03-10 15:43:13 +00:00
snipe 4f3a30261e Fixed #18661 - return true/false in JSON 2026-03-10 15:42:35 +00:00
snipe e7c478318c Fixed donked route 2026-03-10 15:39:29 +00:00
snipe e75860c6ee Fixed #18662 wire up search box in assigned license seats 2026-03-10 15:31:54 +00:00
snipe 982766dd77 Merge remote-tracking branch 'origin/develop' 2026-03-10 11:40:14 +00:00
snipe d0dbd1e561 Link parent company 2026-03-10 11:40:03 +00:00
snipe 81cbad52f7 Merge remote-tracking branch 'origin/develop' 2026-03-10 10:25:21 +00:00
snipe e7eb4f0e80 More display_name 2026-03-10 10:25:01 +00:00
snipe f1ef1bc38a Merge remote-tracking branch 'origin/develop' 2026-03-10 10:22:57 +00:00
snipe 676a995889 Use update check for files controller api 2026-03-10 10:22:39 +00:00
snipe b696642993 Merge remote-tracking branch 'origin/develop' 2026-03-10 10:14:47 +00:00
snipe a44fe14de1 Use display_name in more places 2026-03-10 10:14:27 +00:00
snipe e7bb7d3656 Merge remote-tracking branch 'origin/develop' 2026-03-10 09:54:08 +00:00
snipe 0015dbcd1d Merge pull request #18656 from marcusmoore/form-macro-username-select
Fixed #17208: Replace username_format macro
2026-03-10 09:42:15 +00:00
snipe fc5e7cccbc Merge pull request #18652 from grokability/dependabot/github_actions/develop/docker/login-action-4
Bump docker/login-action from 3 to 4
2026-03-10 09:41:54 +00:00
dependabot[bot] 8987f3f951 Bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 09:30:14 +00:00
snipe ba671a8f1f Merge pull request #18651 from grokability/dependabot/github_actions/develop/docker/build-push-action-7
Bump docker/build-push-action from 6 to 7
2026-03-10 09:29:32 +00:00
snipe fbe871f8d1 Merge pull request #18650 from grokability/dependabot/github_actions/develop/docker/metadata-action-6
Bump docker/metadata-action from 5 to 6
2026-03-10 09:29:10 +00:00
snipe 116b2d1229 Merge pull request #18649 from grokability/dependabot/github_actions/develop/docker/setup-buildx-action-4
Bump docker/setup-buildx-action from 3 to 4
2026-03-10 09:28:03 +00:00
snipe 20fd870b59 Merge pull request #18658 from marcusmoore/form-macro-countries
Fixed #17202: Replaced countries form macro
2026-03-10 09:27:05 +00:00
snipe 5c46990195 Check for user on enable_sounds 2026-03-10 09:20:35 +00:00
snipe fab57020f2 Prevent browser errors since input field is display none 2026-03-10 09:16:24 +00:00
snipe b37074f473 Null check on status (RB-4087) 2026-03-10 09:03:57 +00:00
snipe 24e2e81a28 Use component table in suppliers 2026-03-10 09:00:29 +00:00
Marcus Moore ccabc1fbcc Remove countries macro 2026-03-09 17:37:58 -07:00
Marcus Moore f847f83cb8 Replace macro in location modal 2026-03-09 17:36:26 -07:00
Marcus Moore e0771827aa Replace country in address partial 2026-03-09 17:34:57 -07:00
Marcus Moore fa6adaa155 Migrate countries macro on user page 2026-03-09 17:22:43 -07:00
Marcus Moore f3504ce6fc Remove barcode_types macro 2026-03-09 16:36:54 -07:00
Marcus Moore a075ca904b Remove alt_barcode_types macro 2026-03-09 16:36:26 -07:00
Marcus Moore e3fb6fabf8 Remove username_format maco 2026-03-09 16:30:12 -07:00
Marcus Moore 6f89af790e Migrate username format to blade component 2026-03-09 16:29:55 -07:00
snipe 28f493d84d Escape pivot notes 2026-03-09 09:06:58 +00:00
dependabot[bot] a87e862148 Bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 08:42:34 +00:00
dependabot[bot] 6e264bfee0 Bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 08:42:27 +00:00
dependabot[bot] 1ecf862f2d Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 08:42:22 +00:00
snipe 338fc88095 Merge pull request #18647 from grokability/revert-18601-chore/security-upgrade-passport13-socialite-jwt7
Revert "Upgrade Passport to v13 and move php-jwt to v7 to remediate JWT advisory"
2026-03-08 12:32:31 +00:00
snipe 0a724cc49a Revert "Upgrade Passport to v13 and move php-jwt to v7 to remediate JWT advisory" 2026-03-08 12:29:56 +00:00
snipe a2efcf1ca9 Merge pull request #18601 from ubc-cpsc/chore/security-upgrade-passport13-socialite-jwt7
Upgrade Passport to v13 and move php-jwt to v7 to remediate JWT advisory
2026-03-08 11:51:15 +00:00
snipe ffc9e882d7 Merge remote-tracking branch 'origin/develop' 2026-03-08 11:37:38 +00:00
snipe c9d73e85e1 Fixed RB-4083 2026-03-08 11:37:19 +00:00
Joël Pittet a956676745 Move Passport 13 key permission normalization to upgrade.php to cover existing installs with incorrect permissions 2026-03-07 22:22:46 -08:00
Joël Pittet 5800d08202 normalize key permissions 2026-03-07 21:59:07 -08:00
Joël Pittet b8958bad72 Test failure fixes from 'Key Files Permissions Validation' from https://github.com/laravel/passport/blob/13.x/UPGRADE.md#key-files-permissions-validation 2026-03-07 21:59:00 -08:00
Joël Pittet 0508d7558e OAuth Client Table Changes (Optional) from https://github.com/laravel/passport/blob/13.x/UPGRADE.md#oauth-client-table-changes-optional 2026-03-07 21:59:00 -08:00
Joël Pittet 98c3192a13 Bump laravel/socialite to latest patch release, upgrade laravel/passport to 13 which is compatible with Laravel 11, and security release for firebase/php-jwt 2026-03-07 21:59:00 -08:00
snipe 6e7ff15e78 Merge remote-tracking branch 'origin/develop' 2026-03-07 20:50:31 +00:00
snipe b886e11670 Fixed user API tests 2026-03-07 20:50:18 +00:00
snipe b0c45c7179 Merge remote-tracking branch 'origin/develop' 2026-03-07 11:05:48 +00:00
snipe 92bb1df82e Removed error log in test 2026-03-07 11:05:33 +00:00
snipe 1c4549dd8e Added word break on history 2026-03-07 11:04:25 +00:00
snipe 83e61ec8cd Unset admin if auth user is not admin 2026-03-07 10:45:57 +00:00
snipe 7ea549df4a Added .journal to gitignore 2026-03-06 21:57:23 +00:00
snipe 0fabc5d88d Merge remote-tracking branch 'origin/develop' 2026-03-06 21:55:59 +00:00
snipe af1c55cd7e Small code re-org for clarity 2026-03-06 21:55:46 +00:00
snipe 7822c0bc3e Merge pull request #18644 from uberbrady/fix_location_observer
Re-add Location Observer with null-safe companyable check
2026-03-06 21:47:58 +00:00
Brady Wetherington 2b7ed1f7fa Re-add Location Observer with null-safe companyable check 2026-03-06 21:43:19 +00:00
snipe 33ae9f1d5b Merge remote-tracking branch 'origin/develop' 2026-03-06 20:15:11 +00:00
snipe 45ddaf1b72 Temp comment out location observer 2026-03-06 20:14:56 +00:00
snipe f27aae5e31 Merge remote-tracking branch 'origin/develop' 2026-03-06 14:03:50 +00:00
snipe 7595c922fa Fixed #18043 - added location logging 2026-03-06 14:03:37 +00:00
snipe ff6a6407f5 Merge remote-tracking branch 'origin/develop' 2026-03-06 13:40:16 +00:00
snipe 4d4513d936 Fixed #18642 - view-assets mobile 2026-03-06 13:40:01 +00:00
snipe e378c99923 Layout tweakas 2026-03-06 13:29:38 +00:00
snipe 32a6c8edbe Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-03-06 10:48:34 +00:00
snipe 078c870970 Merge pull request #18162 from Godmartinz/status_bulk_select_fix
Adds #17685 better warning for bulk status change to undeployable type
2026-03-06 09:58:41 +01:00
snipe 4a91d37423 Merge pull request #17666 from akemidx/xxdays-since-last-update
Feature: Added xx days since last update to Custom Report
2026-03-06 09:54:32 +01:00
snipe 96befb2aef Merge branch 'develop' into xxdays-since-last-update 2026-03-06 09:54:01 +01:00
snipe 925452e106 Merge pull request #18248 from iryadifarhan/fix/depreciation-report-displays-incorrect-monthly-depreciation-value
Fixes inaccurate monthly depreciation value displayed at depreciation report when using a floor value
2026-03-06 09:40:39 +01:00
snipe 1678330f0c Merge pull request #18426 from akemidx/global-report-templates
Fixed: Added global report templates
2026-03-06 09:30:15 +01:00
snipe 58cf3fc2ea Dev assets 2026-03-06 08:17:48 +00:00
snipe 13ce17ffc6 Merge pull request #18494 from marcusmoore/livewire4
Upgraded Livewire to v4
2026-03-06 09:16:25 +01:00
snipe 70e020ee0c Merge pull request #18637 from marcusmoore/test-updates
Fixed some minor issues in tests
2026-03-06 09:16:00 +01:00
snipe c6a167ef40 Removed min-height (this might go badly) 2026-03-06 07:42:28 +00:00
snipe f0d1697108 Merge remote-tracking branch 'origin/develop' 2026-03-06 06:46:08 +00:00
snipe 420ba5f261 Fixed #18341 - remove action button from user profile view 2026-03-06 06:45:46 +00:00
snipe 90cb53566c Merge remote-tracking branch 'origin/develop' 2026-03-06 06:24:38 +00:00
snipe 7aa1f3ae1d Merge pull request #18639 from grokability/#18282-add-user-notes-to-custom-export
Fixed #18282 - added original notes to checkout target in custom report
2026-03-06 07:23:58 +01:00
snipe 556d638136 Fixed #18282 - added original notes to checkout target in custom report 2026-03-06 06:19:16 +00:00
snipe 64982d01cf Merge remote-tracking branch 'origin/develop' 2026-03-06 05:59:23 +00:00
snipe c4aa10baf8 Added user company to custom asset report 2026-03-06 05:59:11 +00:00
snipe b6cad58917 Merge remote-tracking branch 'origin/develop' 2026-03-06 05:39:20 +00:00
snipe 86f647e714 Improved bulk audit bg 2026-03-06 05:39:09 +00:00
snipe 4f9c952dbe Merge remote-tracking branch 'origin/develop' 2026-03-06 05:22:09 +00:00
snipe 64f5d40fd9 Removed duplicate code 2026-03-06 05:21:59 +00:00
snipe b9c3c8954f Merge remote-tracking branch 'origin/develop' 2026-03-06 05:17:51 +00:00
snipe 1a0869c2ca Merge pull request #18628 from marcusmoore/fixes/fd-54108-checkin-all-button
Fixed Checkin All Seats button
2026-03-06 06:17:12 +01:00
snipe 82b6159475 Merge remote-tracking branch 'origin/develop' 2026-03-06 04:46:33 +00:00
snipe 1fb32ee461 Merge pull request #18638 from grokability/experiments/compact-nav
Compacted nav UI, components for buttons
2026-03-06 05:45:02 +01:00
snipe 68a863e63e Updated test, fixed route 2026-03-06 04:38:48 +00:00
snipe a1e62ccd46 Fixed (shimmed) #18636 - added shim roite for fieldsets 2026-03-06 03:54:33 +00:00
snipe dae66c0fa4 Fixed audit background 2026-03-06 03:48:45 +00:00
snipe 1d6b21e1c7 Switched to newer button model 2026-03-06 03:33:04 +00:00
snipe 455be12058 Gate fix for admin 2026-03-06 03:05:40 +00:00
snipe 2ebb3ecb96 Update views with new button blades 2026-03-06 01:17:00 +00:00
Marcus Moore b29056dddf Delete duplicate test 2026-03-05 16:35:15 -08:00
Marcus Moore 3ed09f304c Fix method name 2026-03-05 16:30:05 -08:00
Marcus Moore 4875283ed1 Fix test route 2026-03-05 16:20:27 -08:00
Marcus Moore 261231c09e Fix method and variable names 2026-03-05 15:55:59 -08:00
snipe 180dad6ee6 Use updated infobox 2026-03-05 14:36:12 +00:00
snipe d7121ad82f Removed class active (this is handled in jquery) 2026-03-05 11:46:55 +00:00
snipe f121c61524 Added hidden-print class to action buttons column 2026-03-05 11:45:21 +00:00
Godfrey M e25ea465c5 add ternary on variables in asset count" 2026-03-04 10:25:59 -08:00
Godfrey M 30ac3d1a26 fix display name of item" 2026-03-03 16:11:46 -08:00
Godfrey M e47c772230 cleaned up other tables in print view 2026-03-03 16:04:13 -08:00
Godfrey M 706b623d95 adds assets to indirect assignment table 2026-03-03 15:51:47 -08:00
Godfrey M a908a76f53 adds components to indirect assignment table 2026-03-03 15:15:45 -08:00
Marcus Moore 93bf91869b Fix checkin all seats button 2026-03-03 14:57:43 -08:00
Marcus Moore a026ca92ff Populate tests 2026-03-03 14:46:10 -08:00
Godfrey M a2ec707f79 add licenses to indirect assignedment table 2026-03-03 12:53:37 -08:00
Marcus Moore 1b7fe4f728 Scaffold test cases 2026-03-03 11:07:28 -08:00
Marcus Moore 2bf2d55c6e Fix test case 2026-03-03 11:07:18 -08:00
snipe dbe998d9cf Merge remote-tracking branch 'origin/develop' 2026-03-02 18:36:13 +01:00
snipe 2ed32612b9 Fixed typo in comments 2026-03-02 18:35:57 +01:00
snipe 314bcbe208 Added assets upload url singleton 2026-03-02 18:35:57 +01:00
snipe 6290e34623 Exclude show route for settings API [RB-17718] 2026-03-02 18:35:57 +01:00
snipe 5e5521a128 Merge pull request #18623 from grokability/dependabot/github_actions/develop/actions/upload-artifact-7
Bump actions/upload-artifact from 6 to 7
2026-03-02 12:51:02 +00:00
dependabot[bot] 1e8bed86d3 Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 08:43:13 +00:00
Brady Wetherington 7cbc0fa671 Merge branch 'develop' into use_new_laravel_scim_server 2026-02-26 19:53:05 +00:00
snipe 79907a2770 Merge remote-tracking branch 'origin/develop' 2026-02-26 16:04:07 +00:00
snipe 8bc7d50e35 Updated to check gate on object 2026-02-26 16:03:57 +00:00
Marcus Moore aa420e5006 Bump Livewire to v4.1.4 2026-02-25 13:30:30 -08:00
Marcus Moore 4babaa85fc Merge branch 'develop' into livewire4
# Conflicts:
#	composer.lock
2026-02-25 13:29:07 -08:00
snipe 6f60ef9ec2 Merge remote-tracking branch 'origin/develop' 2026-02-25 19:46:20 +00:00
snipe 378d9e008e Removed truncate that ran after maintenance seeder 2026-02-25 19:46:09 +00:00
snipe 581867eefc Merge remote-tracking branch 'origin/develop' 2026-02-25 19:05:48 +00:00
snipe 340fabe4f6 Merge pull request #18614 from spencerrlongg/eof-rollbar
Fixes (hopefully) RB #19772 Unexpected EOF
2026-02-25 19:05:30 +00:00
spencerrlongg 29331b8b06 missing semicolon - kind of a shot in the dark 2026-02-25 12:54:43 -06:00
snipe 234855f225 Merge remote-tracking branch 'origin/develop' 2026-02-25 18:42:04 +00:00
snipe 6fbcaa0959 Make sure manager_id is an integer 2026-02-25 18:41:53 +00:00
snipe 52e10205c5 Add license ID to tabke cookie 2026-02-25 18:40:29 +00:00
snipe 0b8176a730 Merge remote-tracking branch 'origin/develop' 2026-02-25 17:41:38 +00:00
snipe f419ae3f4a Fixed license history target 2026-02-25 17:41:26 +00:00
snipe 84a6b8e012 Add display_name to asset advanced search filter 2026-02-25 16:54:54 +00:00
snipe d1be571d4d Merge remote-tracking branch 'origin/develop' 2026-02-25 16:41:47 +00:00
snipe f234aee691 Use display_name in transformUserCompact() 2026-02-25 16:41:30 +00:00
snipe 623d516595 Merge pull request #18095 from marcusmoore/5947-bulk-checkout-rollup
#5947 - roll up bulk asset checkout email
2026-02-25 15:36:58 +00:00
snipe 156eaf53d5 Fix for #18408 2026-02-25 15:30:37 +00:00
snipe 678a7c1437 Removed BS class 2026-02-25 15:04:24 +00:00
snipe ce2a760093 Merge pull request #17964 from Godmartinz/add-License-checkedout-to-user
Adds #11741 currently assigned license table to license checkout
2026-02-25 14:50:39 +00:00
snipe 34b02d8534 Merge pull request #18485 from marcusmoore/debugbar
Bumped Debugbar to v4
2026-02-25 14:43:03 +00:00
snipe 42e0e691dd Merge pull request #18609 from ubc-cpsc/bugfix/php-deprecated-string-interpolation
Fix deprecated string interpolation in controllers
2026-02-25 14:41:24 +00:00
snipe d392439f82 Merge remote-tracking branch 'origin/develop' 2026-02-25 14:23:13 +00:00
snipe ccfda99060 Merge pull request #18613 from grokability/add-sorting-on-model-name-and-number-for-maintenances
Added model number as a separate field, added sorting
2026-02-25 14:22:48 +00:00
snipe 57f02bdc57 Fixed typo 2026-02-25 14:22:27 +00:00
snipe 7056656eab Added model number as a separate field, added sorting 2026-02-25 14:19:01 +00:00
snipe 2d899fc772 Merge pull request #18612 from grokability/added-maintenances-seeder
Added maintenances seeder
2026-02-25 14:16:44 +00:00
snipe 80ee0835aa Added maintenances seeder 2026-02-25 14:12:13 +00:00
snipe f423b88b16 Merge remote-tracking branch 'origin/develop' 2026-02-25 12:39:39 +00:00
snipe 7b7e6c7971 Fixed maintence image display 2026-02-25 12:39:29 +00:00
snipe 853aed5954 Merge remote-tracking branch 'origin/develop' 2026-02-25 12:03:32 +00:00
snipe 025fb30335 Added user email to exportable field in custom report 2026-02-25 12:03:23 +00:00
snipe 947a149d08 Merge remote-tracking branch 'origin/develop' 2026-02-25 11:51:03 +00:00
snipe fcace4a192 Override the table search with the asset tag search if one is passed 2026-02-25 11:50:52 +00:00
snipe 619e1c70ea Fixed #18603 - set unique cookie ID on asset history table 2026-02-25 11:48:42 +00:00
Joël Pittet 7a95bdfba6 Fix deprecated string interpolation in controllers 2026-02-24 14:57:29 -08:00
Marcus Moore 89962de161 Move to Traits directory 2026-02-24 11:37:07 -08:00
Marcus Moore d9328bd0ce Merge branch 'develop' into debugbar 2026-02-24 11:27:04 -08:00
snipe 81306df06a Merge pull request #18606 from grokability/#18600-check-filesystem-on-healthcheck
Fixed #18600 - add filesystem check on health checker
2026-02-24 14:00:14 +00:00
snipe 75abe9eb3e Re-add try/catch for DB for cleaner output 2026-02-24 13:23:12 +00:00
snipe 1f26bf1125 Fixed #18600 - add filesystem check on health checker 2026-02-24 13:17:15 +00:00
snipe 3aec52eab0 Merge remote-tracking branch 'origin/develop' 2026-02-24 12:00:15 +00:00
snipe 14b9c06d77 Remove optional qualifier 2026-02-24 12:00:06 +00:00
snipe 4f3d23d1ef Merge pull request #18576 from marcusmoore/fixes/rb-20713-license-seat-assigned-to
Fixed RB-20713: Improved validation of license seat update api endpoint
2026-02-24 07:29:41 +00:00
Marcus Moore cada43f34d Allow checking in from unfound targets 2026-02-23 17:23:42 -08:00
snipe 8d0fda88b7 Tagged 8.4.0 release
# Conflicts:
#	config/version.php
2026-02-23 20:41:11 +00:00
snipe 9188f89a2a Tagged v8.4.0 2026-02-23 20:40:40 +00:00
Marcus Moore 1cc7ef0543 Organization 2026-02-23 10:51:34 -08:00
snipe 91a95dbc66 Merge remote-tracking branch 'origin/develop' 2026-02-23 14:44:08 +00:00
snipe a86ffc29d1 Added display name to search term in advanced search 2026-02-23 14:43:55 +00:00
snipe a15adc806b Merge remote-tracking branch 'origin/develop' 2026-02-23 14:30:54 +00:00
snipe 9ed5540c49 Merge pull request #18597 from uberbrady/improve_ldap_binding
Improve LDAP escaping to better reflect modern PHP standards
2026-02-23 13:38:28 +00:00
Brady Wetherington 3a7e00ccc3 Improve LDAP escaping to better reflect modern PHP standards 2026-02-23 13:01:00 +00:00
snipe f328da37bc Merge remote-tracking branch 'origin/develop' 2026-02-23 11:41:54 +00:00
snipe f82cdabccd More info anel refinements 2026-02-23 11:41:45 +00:00
Brady Wetherington 15346eec22 WIP: cleaning up new SCIM config 2026-02-23 11:34:41 +00:00
snipe b9c9cc0046 Merge pull request #18596 from grokability/add-with-trashed-to-formattednamelink
Adds withTrashed() to `adminuser` and updates presenter to show strikethrough
2026-02-23 11:00:43 +00:00
snipe 27ece84d52 Adds withTrashed() to adminuser and updates presenter to show strikethrough 2026-02-23 10:49:44 +00:00
snipe 3adc8f279b Merge remote-tracking branch 'origin/develop' 2026-02-21 13:17:52 +00:00
snipe 1299186fb8 Merge pull request #18591 from grokability/#18017-show-more-info-in-bulk-audit
Fixed #18017 - show status on bulk audit
2026-02-21 13:17:31 +00:00
snipe d837e4845b Show note 2026-02-21 13:16:58 +00:00
snipe 39be0c5590 Fixed #18017 - show status on bulk audit 2026-02-21 13:08:23 +00:00
snipe 41c75022a9 Merge remote-tracking branch 'origin/develop' 2026-02-21 12:53:42 +00:00
snipe d2bb10e96d Merge pull request #18590 from grokability/optionally-update-audit-dates
Added checkbox to determine if existing audit dates should be changed
2026-02-21 12:53:12 +00:00
snipe f139a616c7 Added checkbox to determine if existing audit dates should be changed 2026-02-21 12:49:36 +00:00
snipe 84924a68b7 Merge remote-tracking branch 'origin/develop' 2026-02-20 15:01:15 +00:00
snipe d5099d973b Move copy icon to right side 2026-02-20 15:00:04 +00:00
snipe 82b18a3207 Updated requestable icon 2026-02-20 14:15:50 +00:00
snipe 5a3a63e0a4 Merge remote-tracking branch 'origin/develop' 2026-02-20 13:10:55 +00:00
snipe 10aee6bb5f Fixed tab pane name 2026-02-20 13:10:14 +00:00
snipe 980cc5704f Switched branch name to master 2026-02-20 13:08:23 +00:00
snipe 28054a9112 Merge remote-tracking branch 'origin/develop' 2026-02-20 13:07:33 +00:00
snipe c1b11ab9bf Small fixes for accessories/checkedout tab 2026-02-20 13:05:31 +00:00
snipe c226a061f5 Tagged pre-release 2026-02-20 12:42:09 +00:00
snipe c0be738aef Removed unneeded return check 2026-02-20 12:13:01 +00:00
snipe 7a312f5868 Merge remote-tracking branch 'origin/develop' 2026-02-20 12:12:04 +00:00
snipe e6987ec148 Early return on non-existent acceptance 2026-02-20 12:11:49 +00:00
snipe 973fa7a58b Merge pull request #18575 from spencerrlongg/encrypted-custom-fields-api
Adds field_encrypted To Fields API Response
2026-02-20 12:11:00 +00:00
snipe 5ce493180d Merge remote-tracking branch 'origin/develop' 2026-02-20 11:56:33 +00:00
snipe b6195ba3ae Default active tab fix 2026-02-20 11:56:23 +00:00
snipe d3bd213f29 Fixed typo in tooltip text 2026-02-20 09:49:06 +00:00
snipe bbdc78a13c Merge remote-tracking branch 'origin/develop' 2026-02-20 09:36:48 +00:00
snipe 9502dd8bd7 Back out :class 2026-02-20 09:36:38 +00:00
Marcus Moore e81ccf4280 Add more failing assertions 2026-02-19 16:53:22 -08:00
Marcus Moore 9730f2c0f3 Add some failing assertions 2026-02-19 16:40:45 -08:00
Marcus Moore 1de34c0656 Some controller clean up 2026-02-19 16:40:34 -08:00
Marcus Moore bdce6b1387 Add test case 2026-02-19 13:51:20 -08:00
Marcus Moore ce0c2ecd8f Populate new tests 2026-02-19 13:47:52 -08:00
Marcus Moore 40f07e3d72 Scaffold addition test cases 2026-02-19 11:50:04 -08:00
snipe 43971b9625 Merge remote-tracking branch 'origin/develop' 2026-02-19 19:15:59 +00:00
snipe 3c3ccae7c9 Allow context overwrites in FCO specific tables 2026-02-19 19:14:26 +00:00
Godfrey M be211f6f86 fix apostophes 2026-02-19 09:57:29 -08:00
snipe f27a3a2c61 Build prod JS assets 2026-02-19 15:13:19 +00:00
snipe b96d0d55c9 Merge remote-tracking branch 'origin/develop' 2026-02-19 15:12:52 +00:00
snipe 9789ca42f8 Highlight inventory in red if below min 2026-02-19 15:11:27 +00:00
snipe da26bc5165 Updated JS assets 2026-02-19 14:55:45 +00:00
snipe 0b67626961 Merge pull request #18580 from grokability/fixes-for-alert-menu
Quick fix for alert menu 1001 queries
2026-02-19 14:54:50 +00:00
snipe 546c8ce7d5 Quick fix for alert menu 1001 queries 2026-02-19 14:52:01 +00:00
Brady Wetherington c48e0c7377 Clean out fixme's, standardize on UpdatableComplex 2026-02-19 14:50:02 +00:00
snipe c76a888d11 Merge pull request #18579 from uberbrady/fix_npm_install_jspdf
Careful upgrade to minimize too many version changes
2026-02-19 14:25:34 +00:00
Brady Wetherington 38c495a4ac Careful upgrade to minimize too many version changes 2026-02-19 14:11:15 +00:00
Brady Wetherington 95fdfa6396 Merge branch 'develop' into use_new_laravel_scim_server 2026-02-19 12:41:43 +00:00
snipe f699935f5f Merge remote-tracking branch 'origin/develop' 2026-02-19 12:05:17 +00:00
snipe d0ce5e0c57 Merge pull request #18578 from grokability/#18435-fixed-currency-selection-selectbox
Fixed #18435 - correct option value for currency format selector
2026-02-19 12:05:01 +00:00
snipe 7a0e5b57db Fixed currency selector 2026-02-19 12:01:56 +00:00
snipe 8336cf5baa Merge remote-tracking branch 'origin/develop' 2026-02-19 11:42:54 +00:00
snipe c31f1d2cce Nicer row selected color 2026-02-19 11:42:45 +00:00
snipe d3d90abba7 Merge remote-tracking branch 'origin/develop' 2026-02-19 11:31:05 +00:00
snipe ea98ee07e5 Fixed #18577 - set url back parameter as default in form component 2026-02-19 11:30:53 +00:00
snipe a38bfada57 Merge pull request #18572 from uberbrady/fix_cross_company_created_by_in_asset_acceptance
Fixed #18571 - fix cross-company created_by in asset acceptance
2026-02-19 11:24:28 +00:00
snipe bdaf13da4c Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	resources/views/maintenances/view.blade.php
2026-02-19 11:11:18 +00:00
snipe e5ff19aec4 Fixd required field color 2026-02-19 11:02:12 +00:00
Marcus Moore 504f63066f Add note 2026-02-18 16:34:22 -08:00
Marcus Moore 41b327529b Reference rollbar 2026-02-18 16:31:55 -08:00
Marcus Moore e84279c402 Implement remaining tests 2026-02-18 16:17:34 -08:00
spencerrlongg 65e6519f97 adds field_encrypted to fields api response 2026-02-18 17:53:04 -06:00
Marcus Moore dbbb3beacc Clean up 2026-02-18 15:35:57 -08:00
Marcus Moore e8a73a8de6 Organization 2026-02-18 15:29:44 -08:00
Marcus Moore 411cbc0962 Avoid overwriting created_by and timestamps 2026-02-18 15:20:28 -08:00
Marcus Moore b487c0e3e9 Scaffold additional tests 2026-02-18 15:20:18 -08:00
Marcus Moore fa0e8f6e01 Improve validation 2026-02-18 15:11:52 -08:00
Marcus Moore e25e405f74 Scaffold additional test cases and organize 2026-02-18 14:52:43 -08:00
Marcus Moore 302c4a6414 Organize test 2026-02-18 14:35:06 -08:00
Marcus Moore d1e7f6e55e Inline 2026-02-18 14:03:28 -08:00
Marcus Moore d12f0974df Add test for permission 2026-02-18 14:01:53 -08:00
snipe e92e550e9c Null operator for maintenances 2026-02-18 16:32:40 +00:00
snipe b751fe7903 Fixed incorrect translation string 2026-02-18 16:30:37 +00:00
snipe a6e34522eb Partially convert maintenances into new blade components 2026-02-18 16:26:13 +00:00
snipe 735e6f3471 Merge pull request #18570 from grokability/convert-consumables-to-new-blade-components
Converted consumables to new blade component
2026-02-18 16:02:32 +00:00
snipe c9f41c950a Added copy+paste, added additional fields 2026-02-18 15:57:40 +00:00
Brady Wetherington 091c710940 Make User parameter nullable 2026-02-18 15:25:05 +00:00
snipe 276f412a3c Small tweaks to info panel 2026-02-18 15:22:46 +00:00
snipe 6f6e5c847a Converted consumables to new blade component 2026-02-18 14:44:08 +00:00
snipe 6ef0274bb3 Merge pull request #18569 from grokability/updated-csvs
Small importer improvements, added larger CSV samples
2026-02-18 14:22:23 +00:00
snipe 7ef6a72ec4 Updated CSVs 2026-02-18 14:06:33 +00:00
snipe e2b8c69cf6 Use iconhelper for dynamic icon 2026-02-18 14:06:24 +00:00
snipe 1254d12d83 Tweaks to info panel 2026-02-18 14:06:14 +00:00
snipe b68642a827 Added alias strings 2026-02-18 14:04:51 +00:00
snipe c5214b976b Added string 2026-02-18 14:04:44 +00:00
snipe e611121244 Added tag color to main importer, added aliases 2026-02-18 14:04:38 +00:00
snipe 3aa7f0b7fe Added tag_color to importer 2026-02-18 14:04:19 +00:00
snipe 3d38eee71d Added/updated icons 2026-02-18 14:04:00 +00:00
snipe 90e6e309f9 Removed redundant icon helper 2026-02-18 14:03:53 +00:00
snipe 885314b87a Added large components sample CSV 2026-02-18 12:01:59 +00:00
snipe ef013a7026 Updated components sample 2026-02-18 12:01:48 +00:00
snipe 0353ade90e Trim off whitespace for headers 2026-02-18 12:01:34 +00:00
snipe d90c9282ac Updated strings 2026-02-18 11:13:52 +00:00
Marcus Moore 5055aafe1d Scaffold tests 2026-02-17 17:37:24 -08:00
Marcus Moore e68b9ea267 Validate assigned_to is integer 2026-02-17 16:51:31 -08:00
Marcus Moore 1d8ba2ec61 Add failing test 2026-02-17 16:49:32 -08:00
snipe d56970eaa3 Merge pull request #18566 from grokability/fixed-new-vs-update-on-custom-fieldset-creation
Fixed new vs update button label on custom fieldset creation, fixed breadcrumbs on new custom fieldset creation screen
2026-02-17 22:23:06 +00:00
snipe 8b3f18ec59 Better breadcrumbs for fieldset creation 2026-02-17 22:17:38 +00:00
snipe 170d20ddb5 Fixed new vs update button on custom fieldset create vs edit 2026-02-17 22:17:27 +00:00
snipe 70407dac85 Merge pull request #18565 from grokability/#18555-component-clone
Added #18555 - ability to clone components
2026-02-17 16:22:02 +00:00
snipe c2334d87de Merge pull request #18564 from uberbrady/fix_component_counts
Fixed #18557 - Tweak numRemaining to not re-query for un-checked-out components
2026-02-17 15:44:00 +00:00
snipe 0662e3351e Added #18555 - ability to clone components 2026-02-17 15:43:43 +00:00
Brady Wetherington 6b90b3743e Tweak numRemaining to not re-query for un-checked-out components 2026-02-17 15:27:04 +00:00
snipe dd1d456106 Alphabetize dictionary 2026-02-17 15:21:24 +00:00
snipe dceead8302 Show footer by default if the transformer asks for it 2026-02-17 15:09:29 +00:00
snipe 832f449868 Merge pull request #18561 from grokability/#18512-comment-out-first-checkout
Fixes #18512 (first checkout) temporarily
2026-02-17 14:18:05 +00:00
snipe 33a104f142 Fixes #18512 temporarily 2026-02-17 14:11:14 +00:00
snipe 28f19689ec Fixed focus color for input fields 2026-02-17 13:38:43 +00:00
snipe ce6ee32e89 Made seats a numeric field 2026-02-17 13:38:29 +00:00
snipe fdf42ba321 Add class to checkedout blade 2026-02-17 13:18:27 +00:00
snipe aadd158108 Added active class to accessory tab 2026-02-17 13:18:14 +00:00
snipe d6592819e8 Show only active licenses 2026-02-17 13:17:49 +00:00
snipe 8f34c06196 Added order_number to API for accessories, consumables, components 2026-02-17 13:08:09 +00:00
snipe 9cdc73917b Merge pull request #18537 from grokability/more-refactoring-tables-and-tabs
WIP - More refactoring of tabs, tab panes, and tables
2026-02-17 12:39:31 +00:00
snipe 2976159499 Check for parent (only really matters in locations) 2026-02-17 12:32:07 +00:00
snipe e302ccf985 Added plain clone translation 2026-02-17 12:31:35 +00:00
snipe 08915e8607 Use isDeletable in transformers 2026-02-17 12:31:26 +00:00
snipe 32b2131bff Fixed asset model deletable check 2026-02-17 12:31:12 +00:00
snipe 50cf15fb71 Added isDeletable() method 2026-02-17 12:31:01 +00:00
snipe f07ef6d7c5 Added restore and clone blade 2026-02-17 12:28:48 +00:00
snipe 666025d7f6 Use more generic text 2026-02-17 12:28:27 +00:00
snipe 671601365c Use new button blade components 2026-02-17 12:28:16 +00:00
snipe 263b04cd69 Merge pull request #13506 from matmair/develop-1
Fixed: wrong index reference in MoveUploadsToNewDisk.php
2026-02-17 11:08:24 +00:00
snipe 57b98ca782 Fixed copypasta 2026-02-13 19:03:44 +00:00
snipe 46df19d7cd Don’t use fixed columns on unaccepted asset report 2026-02-13 18:27:18 +00:00
snipe fa18524223 Fixed unaccepted report to account for much older items that might not exist 2026-02-13 18:23:59 +00:00
snipe 3ebc0532ca Added isDeleteable to Accessories 2026-02-13 18:07:22 +00:00
snipe 4f59752b8b Added rtd tab icon 2026-02-13 17:30:11 +00:00
snipe 668ab221cc Removed uploads for manufacturers since we don’t have them? 2026-02-13 17:29:56 +00:00
snipe ad90e005c4 Added history tabs 2026-02-13 17:28:07 +00:00
snipe 952b3d6884 Converted components view to blade component
This effing sucked
2026-02-13 17:27:45 +00:00
snipe 19ca1f7578 Converted to object-specific elements in indexes 2026-02-13 17:27:14 +00:00
snipe ef02fab94b Added checkout blade 2026-02-13 17:22:35 +00:00
snipe 144b5e7558 Switch to accessory table on accessory view 2026-02-13 17:22:22 +00:00
snipe aff0a60138 Added presenter for component history 2026-02-13 17:22:07 +00:00
snipe 92a641f01a Added snipe_component because wtf laravel 2026-02-13 17:21:59 +00:00
snipe 929132ba07 Merge pull request #18544 from uberbrady/fix_1001_query_on_available_models_for_notification
Added some withCount() params to tweak the 'minimum number of assets' notification
2026-02-12 21:37:10 +00:00
Brady Wetherington 2a1a4a1c72 Added some withCount() params to tweak the 'minimum number of assets' notification 2026-02-12 21:32:30 +00:00
snipe 4d73894cd2 Merge pull request #18542 from marcusmoore/fixes/fd-53577-reminder-subject-2
Updated subject line of acceptance reminder emails
2026-02-12 21:22:55 +00:00
Godfrey M 4d9bc04d58 fix test: change hasTo to hasCc pt2 2026-02-12 13:09:38 -08:00
Godfrey M 3527b86b6d fix test: change hasTo to hasCc 2026-02-12 13:05:51 -08:00
snipe e49e805b2b Merge pull request #18539 from Godmartinz/L7163_title_adjustment
Fixes title alignment to fit label L7163_A
2026-02-12 20:43:52 +00:00
Godfrey M 30f4e1eb08 remove class usage 2026-02-12 12:22:26 -08:00
snipe 05f3bf633e Fixed typeError for isManagerOf in manager view of EULAs 2026-02-12 20:21:15 +00:00
Godfrey M 8142ab64f6 change to() to cc() 2026-02-12 12:21:11 -08:00
Brady Wetherington f8ecbf8f0b removing Log::error lines 2026-02-12 16:03:40 +00:00
Marcus Moore 4d5b3548d6 Update introduction line 2026-02-11 16:28:17 -08:00
Marcus Moore 00408f0103 Revert "Put checkout_qty on checkoutable so accessory and consumable emails are formatted correctly"
This reverts commit 548cceee18.
2026-02-11 16:06:27 -08:00
Marcus Moore 548cceee18 Put checkout_qty on checkoutable so accessory and consumable emails are formatted correctly 2026-02-11 13:39:37 -08:00
Marcus Moore 7eb536f80e Bump debugbar to v4.0.7 2026-02-11 11:37:57 -08:00
Marcus Moore d91ce88e9a Merge branch 'develop' into debugbar 2026-02-11 11:37:02 -08:00
Godfrey M 76d1a20e21 adjust label L7163_A to fit title properly 2026-02-11 11:02:49 -08:00
snipe 5b6951b88d Tightened up licenses index list 2026-02-11 15:22:58 +00:00
snipe 56313e4436 Covert assets table 2026-02-11 14:54:30 +00:00
snipe 7810ae74d1 Fixed translation string 2026-02-11 14:30:42 +00:00
snipe 3ac1012757 Set fixed number for assets 2026-02-11 14:30:32 +00:00
snipe 91aec08ce0 More refactoring of tabs, tab panes, and tables 2026-02-11 13:18:32 +00:00
Brady Wetherington c5ffbf6ed9 Merge branch 'develop' into use_new_laravel_scim_server 2026-02-11 12:53:42 +00:00
snipe 30970cc7f2 A few more disabled/readonly state color fixes 2026-02-11 11:21:53 +00:00
snipe 985c027b04 Fixed disabled select2 color 2026-02-11 11:12:33 +00:00
snipe d1c4b055a9 Merge pull request #18535 from grokability/rename-field-in-infobox
Update the name of the object within the side panel
2026-02-11 10:20:23 +00:00
snipe 3f2f508e49 Fixed failing test 2026-02-11 10:16:44 +00:00
snipe 07513cb559 Update the name of the object within the side panel
It’s not always a contact/person, so…
2026-02-11 10:02:20 +00:00
snipe 66022902b7 Small style tweaks to info-box 2026-02-11 09:57:43 +00:00
snipe 613efe963a Use consistent box icon 2026-02-11 09:48:44 +00:00
snipe 5a0affcd8e Updated categories view 2026-02-11 09:47:38 +00:00
snipe 79150edb92 Fixed variable name 2026-02-11 07:41:13 +00:00
snipe 6cca24be8e Fixed typo 2026-02-11 07:27:16 +00:00
snipe c2ca51e8ef Added edit buttons to supplier view 2026-02-11 07:27:08 +00:00
snipe b9908d5665 Cast the DB_PORT to integer 2026-02-11 07:01:03 +00:00
snipe cbca420217 Added tooltips 2026-02-11 06:42:15 +00:00
snipe 017183e3fe Merge pull request #18529 from grokability/consolidate-customfieldset-edit
Consolidated custom fieldset edit/show
2026-02-11 05:25:27 +00:00
snipe 0236527f05 Use correct seeding color for links 2026-02-10 15:27:05 +00:00
snipe e946c4bf8c Consolidated custom fieldset edit/show 2026-02-10 15:20:57 +00:00
snipe 8a0414cef6 Merge remote-tracking branch 'origin/master' into develop 2026-02-10 14:16:42 +00:00
snipe ee1ad692a4 Tweaked disabled button color 2026-02-10 13:40:14 +00:00
snipe fdd5f6b0e1 Fixed #18497 - Added model name to aliases 2026-02-10 13:07:41 +00:00
snipe dca6df3244 Fixed #18527 - disable sticky column on dashboard tables 2026-02-10 11:31:25 +00:00
snipe 0874b853a0 Fixed #18520 - use plain_text_company 2026-02-10 11:10:48 +00:00
snipe 3393916b5e Merge pull request #18524 from ubc-cpsc/fix/subpath-livewire-prefix
Fix Livewire and Passport routes for subpath hosting
2026-02-10 08:34:18 +00:00
Joël Pittet b2728b4eb1 Fix Livewire routes for subpath hosting 2026-02-10 00:22:13 -08:00
snipe f3cc3ed682 Merge pull request #18470 from bilias/pr-clean
Do not delete asset name if update request does not have a name
2026-02-09 20:57:07 +00:00
snipe f8cfb8833f Merge pull request #18514 from grokability/update-models-with-new-components
Update models with new components
2026-02-09 19:53:40 +00:00
snipe c2c2332e83 Removed erroneous icon 2026-02-09 13:05:22 +00:00
snipe 9f69c36426 Added depreciations and departments 2026-02-09 13:03:07 +00:00
snipe ea9de35a3b Show/hide on companies and depts 2026-02-07 18:44:37 +00:00
snipe a50a16fb01 Nicer toggle, nicer show/hide info button 2026-02-07 18:39:42 +00:00
snipe f27c0206de Expand/contract info tab (still looks a little junky) 2026-02-07 17:52:22 +00:00
snipe 6791ddd911 Merge remote-tracking branch 'origin/develop' 2026-02-07 15:55:20 +00:00
snipe ce95060d60 Fixed #18516 - added kits for sticky columns 2026-02-07 15:55:11 +00:00
snipe 6d9bbe1ddf Small tweaks to EULA API 2026-02-07 15:41:51 +00:00
snipe 5b1507f4b7 Updated license presenter 2026-02-07 15:16:32 +00:00
snipe 53e985aaab Tweaked color for alt striping again 2026-02-07 15:08:51 +00:00
snipe f5c2119122 Merge remote-tracking branch 'origin/develop' 2026-02-07 15:03:58 +00:00
snipe 5fd6918948 Fixed text color in light mode on alt striping 2026-02-07 15:03:50 +00:00
Marcus Moore 7423d13bdd Accept $firstTimeSending in mails 2026-02-05 17:06:36 -08:00
Marcus Moore fb8586f186 Properly pass parameter for asset emails 2026-02-05 16:59:49 -08:00
Marcus Moore 8b9ebf736b Add assertions for subject line 2026-02-05 16:59:36 -08:00
Marcus Moore 5abcdb8c5a Fix relationships in AccessoryCheckout model 2026-02-05 16:46:51 -08:00
Marcus Moore e549f67fcc Create AccessoryCheckout factory 2026-02-05 16:45:25 -08:00
Marcus Moore d68576c2fa Make test name more accurate 2026-02-05 13:57:51 -08:00
Marcus Moore a6042b6a03 Clean up 2026-02-05 13:52:15 -08:00
Marcus Moore d1a3afd992 More test clean up 2026-02-05 13:39:47 -08:00
Marcus Moore 34b00f7dba More test clean up 2026-02-05 13:38:05 -08:00
Marcus Moore 14b6c6861f Test clean up 2026-02-05 13:34:09 -08:00
Marcus Moore fe4bb4209c Split out tests 2026-02-05 13:07:41 -08:00
Marcus Moore e997eb2012 Inline method 2026-02-05 12:57:42 -08:00
snipe 8337473f5a Added box arrows 2026-02-05 19:27:36 +00:00
Marcus Moore 7ada7fb327 Merge branch 'develop' into livewire4 2026-02-05 10:39:56 -08:00
Marcus Moore 9d632e39bf Merge branch 'develop' into debugbar 2026-02-05 10:33:13 -08:00
snipe 1f50eada6d Added bulk edit to department user listing 2026-02-05 14:38:46 +00:00
snipe 38e1114dad Convert manufacturers and departments 2026-02-05 14:35:01 +00:00
snipe 11be73a578 Removed stray closing div 2026-02-05 14:14:25 +00:00
snipe 13a00df73c Use new components for company view 2026-02-05 14:13:51 +00:00
snipe 7739690bf5 Extend SnipeModel for custom fieldsets 2026-02-05 13:41:26 +00:00
snipe 389eb9e05d Bumped hash 2026-02-05 13:25:53 +00:00
snipe 98fe94aa24 Bumped hash 2026-02-05 13:25:21 +00:00
snipe 4ee378bf8e Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	resources/views/blade/table/index.blade.php
#	resources/views/models/custom_fields_form.blade.php
2026-02-05 13:24:27 +00:00
snipe a8c268760b Fixed #18500 - skip encoding on API url for table component 2026-02-05 13:19:16 +00:00
snipe c684b8ab1e Fixed #18502 - custom fields disappearing on smaller resolution breakpoints 2026-02-05 12:25:49 +00:00
snipe 333d0e2391 Fixed #18510 - use correct GH link in social footer 2026-02-05 11:28:29 +00:00
snipe c22c5993fc Fixed #18503 - alt row colors on striped tables 2026-02-05 11:27:10 +00:00
snipe 1c239cc7cf Fixed typo in icon name 2026-02-05 10:16:24 +00:00
snipe 6ee5aa3e12 Fixed checkout to all modal 2026-02-04 20:55:38 +00:00
snipe 0d5ceb1e90 Merge pull request #18492 from marcusmoore/bump-phpunit
Bumped PHPUnit version
2026-02-04 20:48:06 +00:00
snipe 166a241761 Merge pull request #18484 from spencerrlongg/undefined_var_files
Fixes `Undefined variable $files` Exception
2026-02-04 20:47:02 +00:00
snipe f6f5e806e4 More flexibility in blade components for labels vs icons vs icon types 2026-02-04 20:31:11 +00:00
snipe f0f42240f3 Still more icons 2026-02-04 20:30:20 +00:00
snipe 686afc0974 Gate check linking in presenters 2026-02-04 20:30:12 +00:00
Marcus Moore 5d085469ec Bump debugbar to v4.0.6 2026-02-04 10:46:34 -08:00
Marcus Moore 7c54429c13 Bump Livewire to v4.1.2 2026-02-03 09:14:41 -08:00
Marcus Moore 8dfd04573e Bump debugbar to v4.0.5 2026-02-02 09:53:17 -08:00
snipe 7e5fb3c9ae Added more icons 2026-02-02 15:20:21 +00:00
Brady Wetherington 2115de9926 WIP: move towards UpdatableComplex class for SCIM 2026-02-02 14:55:03 +00:00
snipe 65e4c0b8d1 Renamed contact box to info-panel 2026-02-02 12:22:20 +00:00
snipe b1301237f1 Removed double lines in table 2026-02-02 11:35:09 +00:00
snipe cf82c12708 Fixed custom fieldset table colors 2026-02-02 11:27:18 +00:00
snipe 52f8697d91 Added icons, more additions to sidebar 2026-02-02 11:16:53 +00:00
Marcus Moore 1aee8679d2 Fix updating bug in oauth clients 2026-01-28 12:46:57 -08:00
Marcus Moore 3169c5b503 Bump phpunit 2026-01-28 10:15:11 -08:00
snipe 741f0d69ab Merge pull request #18490 from Godmartinz/add-label-preview-translation
Add translation and template name for Label Preview
2026-01-28 13:14:54 +00:00
Marcus Moore 8829ea9b29 Update category edit form 2026-01-27 17:08:21 -08:00
Godfrey M 53b283eac5 add seperate brackets for template name 2026-01-27 16:21:06 -08:00
Godfrey M 1234b6297e add Label preview translation, also which label is previewed 2026-01-27 14:59:44 -08:00
Marcus Moore 6ba99e8199 Bump livewire to v4.1.0 2026-01-27 14:03:52 -08:00
Marcus Moore b4eb603f22 Switch blur to change 2026-01-27 13:58:42 -08:00
Marcus Moore 62f9ce979d Fix js 2026-01-27 13:41:57 -08:00
Marcus Moore f5928fc707 Fix tags in importer 2026-01-27 12:33:46 -08:00
Marcus Moore f7040e3616 Remove console.log 2026-01-26 17:43:47 -08:00
Marcus Moore a70f1cc1ef Migrate request hook 2026-01-26 17:38:01 -08:00
Marcus Moore a86b738231 Update route 2026-01-26 17:13:56 -08:00
Marcus Moore 8a9ddba208 Use traditional component naming 2026-01-26 17:02:32 -08:00
Marcus Moore 4c727966e7 Migrate config 2026-01-26 16:59:08 -08:00
Marcus Moore c2ac53029a Update to v4 2026-01-26 16:58:58 -08:00
Marcus Moore 5d300d85bd Update content-type assertion 2026-01-26 14:52:53 -08:00
Marcus Moore 1dc181797b Move trait to base controller 2026-01-26 14:39:48 -08:00
Marcus Moore 30d932e2e0 Re-enable exception collector 2026-01-26 14:30:03 -08:00
Marcus Moore 9fb32d33af Migrate to v4 config 2026-01-26 14:28:18 -08:00
Marcus Moore 70baa60521 Install v4 of laravel debugbar 2026-01-26 14:02:01 -08:00
Marcus Moore 8ea2784d44 Uninstall debugbar 2026-01-26 14:01:29 -08:00
Marcus Moore 2b56d82577 Move disabling debugbar to trait 2026-01-26 14:01:21 -08:00
spencerrlongg 8ff34baafa wrap $files in isset to avoid null errors 2026-01-26 15:44:23 -06:00
snipe eeae534a37 Added a few more helpers 2026-01-25 14:33:54 +00:00
snipe 8b71049a3d Merge pull request #18482 from grokability/move-form-components
Move form components into their own directory
2026-01-24 21:13:07 +00:00
snipe 373361dab0 Move form components into their own directory 2026-01-24 21:06:02 +00:00
snipe 60a1141b9d Merge pull request #18480 from grokability/#more-table-components
Moves more indexes to blade components
2026-01-24 20:55:51 +00:00
snipe a38c8a0235 Merge more into contact card 2026-01-24 20:37:08 +00:00
snipe c39d165a3d Added space 2026-01-24 20:36:50 +00:00
snipe 2238f8e8ad More icons 2026-01-24 20:36:43 +00:00
snipe e0c53c3ead Merge classes 2026-01-24 18:32:13 +00:00
snipe 1074bc2d3b More conversions 2026-01-24 18:27:06 +00:00
snipe 4b22b1c115 Better defaults in nav-item component 2026-01-24 17:41:02 +00:00
snipe 141794caf7 Use new contact panel in suppliers view 2026-01-24 17:40:41 +00:00
snipe d5997e2394 Added new classes 2026-01-24 17:40:29 +00:00
snipe 429ca8dd34 Added info components 2026-01-24 17:40:18 +00:00
snipe c2ad0defe0 Added contact component 2026-01-24 17:39:53 +00:00
snipe b4658f2696 Added address presenter 2026-01-24 17:39:44 +00:00
snipe 11b7dfc9b0 Added icons 2026-01-24 17:39:33 +00:00
snipe f7b7ef850d Updated suppliers view 2026-01-24 12:10:58 +00:00
snipe bb9b145519 Updated helper icon 2026-01-24 12:10:50 +00:00
snipe d75f5b8fd3 Fixed label 2026-01-23 19:14:29 +00:00
snipe 34fe64b27c Fixed spacing 2026-01-23 19:09:48 +00:00
snipe 2151595b45 Fixed a few typos 2026-01-23 18:28:49 +00:00
snipe b2c94386b3 Switched from stupid layouts/edit-form to new form component 2026-01-23 18:26:09 +00:00
snipe b99ae9be88 Form component (will move the other things later) 2026-01-23 18:25:49 +00:00
snipe ffbc831071 Include the box footer if there is a route passed 2026-01-23 18:25:34 +00:00
snipe 302a60fbe7 Better breadcrumb 2026-01-23 18:25:06 +00:00
snipe 3ec8ba01d0 Updated manufacturer with new tabs 2026-01-23 18:24:50 +00:00
snipe 2048eb7d5a Removed unneeded presenter methods 2026-01-23 17:08:25 +00:00
snipe 4d605927f3 Fixed typos 2026-01-23 17:07:38 +00:00
snipe b7ee3a2f1d Updated groups index to use new components 2026-01-23 17:05:28 +00:00
snipe 44fa9e2d1e Handle status label index 2026-01-23 16:58:42 +00:00
snipe a5e818f970 More moved to new box+table method 2026-01-23 16:47:27 +00:00
snipe 066cf81233 Added model bulk component 2026-01-23 16:46:52 +00:00
snipe 1b4552cf30 Refactorered bulk action component 2026-01-23 16:46:42 +00:00
snipe 0ba8ee1c5f Added bulkactions named slot in box index 2026-01-23 16:45:48 +00:00
snipe 5c4f3a5aec Removed unneeded body blade 2026-01-23 16:45:30 +00:00
snipe c963c0b25b Updated path for new table component location 2026-01-23 15:45:36 +00:00
snipe b3a4fb2676 Use new user bulk edit blade 2026-01-23 15:45:19 +00:00
snipe 0b82902248 Fixed background loading color 2026-01-23 15:45:06 +00:00
snipe e7f70ccd1f Moved to new component structure 2026-01-23 15:44:52 +00:00
snipe 683395599f Moved files into table directory 2026-01-23 15:44:12 +00:00
snipe 755d7c2351 Added printIgnore, reordered fields 2026-01-23 15:43:35 +00:00
snipe 17d91bcd8e Merge pull request #18479 from grokability/improved-tab-components
Removed font-size override on tabs
2026-01-23 13:53:33 +00:00
snipe 2633ec10dc Removed font-size override on tabs 2026-01-23 13:52:00 +00:00
snipe c4f772c8d9 Merge pull request #18478 from grokability/refined-sticky-columns
Added sticky column
2026-01-23 13:50:49 +00:00
snipe 18addf2a87 Added sticky column 2026-01-23 13:49:09 +00:00
snipe eee826248d Merge pull request #18476 from marcusmoore/fixes/18475-action-log-checkin-during-import
Fixed #18475 - reference the correct model when checking in an asset via import
2026-01-23 09:37:50 +00:00
Marcus Moore 96a817753c Pass the assigned model to the event instead of always passing a User 2026-01-22 14:24:37 -08:00
snipe 600b06e66b Merge pull request #18474 from grokability/move-box-index
Renamed box blade component wrapper to index
2026-01-22 21:10:53 +00:00
snipe cd680daa4c Merge remote-tracking branch 'origin/develop' 2026-01-22 20:58:42 +00:00
snipe 315b716e87 Removed advanced search from files table
It’s not wired up on the backend, so…
2026-01-22 20:50:24 +00:00
snipe b2f1966a78 Renamed box blade component wrapper to index 2026-01-22 20:41:25 +00:00
snipe 6305f87037 Merge pull request #18473 from grokability/added-tab-component
Added tab components
2026-01-22 20:37:11 +00:00
snipe ab02b67d3c Merge remote-tracking branch 'origin/develop' 2026-01-22 20:34:51 +00:00
snipe 0f4086eaf0 Added gates to the tab panes as well 2026-01-22 20:32:33 +00:00
snipe e7c5329e57 Merge pull request #18472 from Godmartinz/fix-n+1-issue
Moved helper query, to eager load through Asset API index
2026-01-22 20:27:44 +00:00
snipe ad82ea86c8 Added tab components 2026-01-22 20:25:33 +00:00
Godfrey M c310e1e3b7 update blade 2026-01-22 11:37:24 -08:00
Brady Wetherington 53149666ad Merge branch 'develop' into use_new_laravel_scim_server 2026-01-22 19:26:41 +00:00
Brady Wetherington 5d55c5021b Fix last of groups, phone numbers, etc. 2026-01-22 19:16:22 +00:00
Godfrey M aaf9372474 move helper query to eager load in the asset api 2026-01-22 11:12:49 -08:00
snipe 2cf169359e Missed updating the closing tags 2026-01-22 15:45:53 +00:00
snipe 7f67f8c20d Merge pull request #18471 from grokability/move-box-blades-into-own-directory
Moved anonymous box blade components into their own directory
2026-01-22 15:44:10 +00:00
snipe 5607dfcecb Moved anonymous box blade components into their own dir 2026-01-22 15:38:20 +00:00
Giannis Kapetanakis ca99f525c9 Do not delete asset name if update request does not have a name 2026-01-22 12:40:59 +02:00
snipe 7e92517d13 Merge remote-tracking branch 'origin/develop' 2026-01-22 08:46:46 +00:00
snipe 1ebb67b2e7 Nicer route formatting for maintenances 2026-01-22 08:45:38 +00:00
snipe d9ef7b43b0 Merge remote-tracking branch 'origin/develop' 2026-01-21 19:59:59 +00:00
snipe c074fae885 Merge pull request #18459 from Godmartinz/moar_label_fixes
Fixes #18353 Label title scales with label fields. adjusted label row allotment.
2026-01-21 19:58:32 +00:00
snipe c5ada0fc2f Merge pull request #18466 from marcusmoore/eager-load-expiring-alerts-command
Added eager load to Expiring Alerts command
2026-01-21 19:57:44 +00:00
snipe 5268b0f67f Merge pull request #18456 from grokability/container-component-phase-2
Next step in container+box component
2026-01-21 19:57:32 +00:00
Marcus Moore 7e10089c13 Eager load assignedTo and supplier 2026-01-21 11:49:02 -08:00
Godfrey M 1dab36da2d replaced extracted variables with array 2026-01-21 10:32:26 -08:00
snipe fab50e53b8 Merge pull request #18458 from marcusmoore/fixes/17309-asset-eol-in-custom-report
Fixed #17309 - include EOL date in custom asset report
2026-01-21 11:45:08 +00:00
Godfrey M 10cfe6d37a remove duplicate parameter 2026-01-20 16:23:36 -08:00
Godfrey M 3718ce9749 if label is null make room for value 2026-01-20 16:18:13 -08:00
Godfrey M fd39c8bf11 update title help text 2026-01-20 16:09:04 -08:00
Godfrey M 2e122fa8d8 update LW 11354 2026-01-20 16:00:56 -08:00
Godfrey M 66d85d17d9 update LW 1933081 2026-01-20 16:00:24 -08:00
Godfrey M 61bc570d59 add title to layout helper, update lw2112283 2026-01-20 15:59:40 -08:00
Marcus Moore 62dbd400a4 Use asset_eol_date in custom asset report 2026-01-20 15:07:19 -08:00
snipe 74af52d29d Merge pull request #18457 from marcusmoore/fixes/api-image-upload
Fixed storing image for accessory and consumable creation via api
2026-01-20 22:28:04 +00:00
Marcus Moore 59f377b058 Prepare images prior to validation in accessory and asset creation requests 2026-01-20 13:38:01 -08:00
snipe 949f65b210 Merge pull request #18356 from Godmartinz/add-first-checkout-to-asset
Adds #17210 1st checkout to asset view and index
2026-01-20 20:36:21 +00:00
snipe 4046fbae89 Merge pull request #18256 from iryadifarhan/fix/audit-log-displays-negative-number-incorrectly-when-next-audit-date-filled-with-current-date
Fixes inconsistent negative symbol at Audit Log Report when Next Audit Date is set to the current date
2026-01-20 20:35:16 +00:00
snipe da8776c2f1 Larger group select box 2026-01-20 20:20:39 +00:00
snipe 4043df1d02 Sort groups by name, asc 2026-01-20 20:13:22 +00:00
snipe 3bc5ab593a Next step in container+box component 2026-01-20 14:49:09 +00:00
snipe 6dad0d669f Merge pull request #18454 from grokability/container-components
Use basic container+box for primary index pages with one column
2026-01-19 16:54:45 +00:00
snipe 39f581a826 Use basic container+box for primary index pages with one column 2026-01-19 16:47:55 +00:00
snipe 2034b25b25 Set footer to default false 2026-01-19 16:20:48 +00:00
snipe 468a7aa911 Added button component 2026-01-19 16:19:07 +00:00
snipe ec50643d96 Basic container+box components 2026-01-19 16:17:47 +00:00
snipe 3b98fb666f Added tel as form type to make look right 2026-01-19 16:15:14 +00:00
snipe f17eeed579 Added fax icon 2026-01-19 15:09:28 +00:00
snipe 452d0b6f6e Merge remote-tracking branch 'origin/develop' 2026-01-19 11:44:04 +00:00
snipe 41450b6e1b Merge pull request #18368 from marcusmoore/feature/group-create-edit-load-improvement
Improved loading speeds on group create and edit page
2026-01-19 11:38:00 +00:00
snipe 30029462b1 Merge remote-tracking branch 'origin/develop' 2026-01-17 11:40:22 +00:00
snipe e109879cac Small autolabeler improvements 2026-01-17 11:40:08 +00:00
snipe 90ad4e9abf Merge remote-tracking branch 'origin/develop' 2026-01-17 11:27:43 +00:00
snipe fd0e2b1a96 Fixed indenting and page footer 2026-01-17 11:27:34 +00:00
snipe 19d637efea Merge remote-tracking branch 'origin/develop' 2026-01-16 13:03:26 +00:00
snipe 6c18b35276 Added barcode class 2026-01-16 13:03:17 +00:00
snipe 184eddb5cf Merge remote-tracking branch 'origin/develop' 2026-01-16 12:52:43 +00:00
snipe 1d577b0171 Merge pull request #18450 from grokability/#18449-small-sidenav-fixes
Fixed #18449 - small sidenav improvements for selected contexts
2026-01-16 12:51:52 +00:00
snipe 05c998227a Fixed #18449 - small sidenav improvements for selected contexts 2026-01-16 12:48:28 +00:00
snipe 53ed810d86 Merge remote-tracking branch 'origin/develop' 2026-01-16 11:38:09 +00:00
snipe 7c136b6f57 Use fa-fw in footer icons 2026-01-16 11:37:57 +00:00
snipe 4e510d9d8c Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	resources/views/models/index.blade.php
2026-01-16 11:36:35 +00:00
snipe e1f30f96c9 Remove stray closing divs 2026-01-16 11:36:10 +00:00
snipe 146d0cefc0 Removed extra closing divs 2026-01-16 11:35:18 +00:00
snipe 0103bd58e1 Merge pull request #18434 from Godmartinz/label_lay_fix
Fixes Label text scaling
2026-01-15 21:13:01 +00:00
Godfrey M dbc1e7d6ab remove scaling from label title 2026-01-15 12:03:45 -08:00
snipe ea706863b5 Merge remote-tracking branch 'origin/develop' 2026-01-15 11:42:18 +00:00
snipe 04f4f5b57c Merge pull request #18439 from grokability/#18135-better-handle-cli-importer-permissions
Fixed #18135 - only unset sensitive variables in the web UI importer
2026-01-15 11:39:03 +00:00
snipe 98b9246c10 Merge pull request #18442 from uberbrady/fewer_scim_exceptions
Fixed - throw fewer exceptions on SCIM misconfigurations
2026-01-15 11:38:49 +00:00
snipe 1e158721ee Merge remote-tracking branch 'origin/develop' 2026-01-15 11:10:09 +00:00
snipe ab4eefcac2 Added links to snipeit-mcp (by @jameshgordy) and SnipeScheduler (by @JSY-Ben) 2026-01-15 11:09:50 +00:00
snipe cf3b36f124 Merge remote-tracking branch 'origin/develop' 2026-01-15 09:45:40 +00:00
snipe 8da01b8569 Check for ID in ldap sync UI screen 2026-01-15 09:45:29 +00:00
snipe c90afaa312 Fixed quotes in cli purge eula command 2026-01-15 09:10:31 +00:00
snipe 9f20bb89c1 Merge remote-tracking branch 'origin/develop' 2026-01-14 21:37:54 +00:00
snipe dfe664b779 Merge pull request #18437 from grokability/#18409-purge-signature-pdfs
Fixed #18409 - command line option to purge signatures
2026-01-14 21:37:35 +00:00
snipe 88bd1fd6ef Merge pull request #18387 from vasiliyplotnikov/mysql_rds_ssl_support_18312
Fixed #18312: support aws rds mysql with force tls
2026-01-14 21:23:18 +00:00
snipe 33f8823edb Merge remote-tracking branch 'origin/develop' 2026-01-14 21:17:28 +00:00
snipe 06d5c0a86c Merge pull request #18440 from ManiacTwister/fix-importer-logfile
Fixed #8740: Use log instance with configured log path
2026-01-14 21:17:09 +00:00
snipe e12a5eda01 Merge remote-tracking branch 'origin/develop' 2026-01-14 20:56:44 +00:00
snipe b3c59b2cc3 Use readonly style with light/dark on LDAP settings 2026-01-14 20:56:35 +00:00
Brady Wetherington 778da511a5 Merge branch 'develop' into use_new_laravel_scim_server 2026-01-14 15:38:34 +00:00
Brady Wetherington 24d5969ce8 Bump versions of our branch of laravel-scim-server to reduce reollbar usage 2026-01-14 14:37:47 +00:00
Brady Wetherington 84940f12c5 add fix to handling blank emails, add notes on things that look weird 2026-01-14 14:31:16 +00:00
snipe 6ad42a02ad Merge remote-tracking branch 'origin/develop' 2026-01-14 14:21:50 +00:00
snipe 90b1ee4805 Check that signature exists on the server before trying to display 2026-01-14 14:21:41 +00:00
snipe 0c9d5ca9da Merge remote-tracking branch 'origin/develop' 2026-01-14 14:13:53 +00:00
snipe e05ecd0c3e Add created_by on acceptance logging to action_log 2026-01-14 14:13:43 +00:00
snipe 441657cbfb Merge remote-tracking branch 'origin/develop' 2026-01-14 13:48:54 +00:00
snipe 0fb6b02fc4 Merge pull request #18418 from Godmartinz/rb20479
Fix [RB-20479] Checkin/Checkout notifications from logging as errors
2026-01-14 13:37:48 +00:00
snipe f83df0d651 Merge remote-tracking branch 'origin/develop' 2026-01-14 13:34:29 +00:00
snipe e667cd20a8 Set require_signature to default to 0 2026-01-14 13:30:54 +00:00
ManiacTwister d06c56367f Fixed #8740: Use log instance with configured log path 2026-01-14 14:23:42 +01:00
snipe 039b4cf19f Fixed #18135 - only unset variables if the user is authenticated (Web UI) 2026-01-14 13:10:46 +00:00
snipe ca0961bd49 Clarified text 2026-01-14 12:50:57 +00:00
snipe 79528fa87b Fixed #18409 - command line option to purge signatures 2026-01-14 12:45:18 +00:00
Godfrey M d96d0b1bcb applied to LabelWriter_11354 2026-01-13 12:11:30 -08:00
Godfrey M 02c237404e applied to TZe_24mm_E 2026-01-13 12:07:39 -08:00
Godfrey M c56f5282ff applied to TZe_241 2026-01-13 12:02:05 -08:00
Godfrey M d62f10cb46 apply helper to L4736_A 2026-01-13 11:57:53 -08:00
Godfrey M 4c6f123cda apply helper to L6009_A 2026-01-13 11:55:10 -08:00
Godfrey M b0b1829426 add Helper function for label layout, applied to 1933081 2112283" 2026-01-13 11:50:14 -08:00
snipe 68b590c263 Merge pull request #18419 from Godmartinz/rb20638
Refactor the exceptions for Audit log (again)
2026-01-13 18:20:20 +00:00
Godfrey M b45efddd9a readd connection and throwable 2026-01-13 08:56:12 -08:00
snipe d8f5d8c6ec Merge remote-tracking branch 'origin/develop' 2026-01-13 13:34:18 +00:00
snipe 56baa8ac9f Fixed manager view label alignment 2026-01-13 13:34:09 +00:00
Brady Wetherington 0f45ecc00f Merge branch 'develop' into use_new_laravel_scim_server 2026-01-13 13:31:15 +00:00
snipe 15aa64ed28 Merge remote-tracking branch 'origin/develop' 2026-01-13 13:30:52 +00:00
snipe 6d0bfeb420 Fixed #18422 - Hide edit buttons if the manager is looking at a different profile 2026-01-13 13:30:42 +00:00
snipe ceff334420 Merge remote-tracking branch 'origin/develop' 2026-01-13 12:43:25 +00:00
snipe 4ee2db68fc Fixed #18429 - corrected string for requestable vs requested items 2026-01-13 12:43:07 +00:00
snipe 1f04d0023b Merge remote-tracking branch 'origin/develop' 2026-01-13 12:38:43 +00:00
snipe 4427fdcaec Use theme button for LDAP sync 2026-01-13 12:38:33 +00:00
snipe 4de642c6a4 Merge pull request #18430 from grokability/#18415-null-ldap-display-name
Fixed #18415 - LDAP sync improvements to allow null display_name and bulk editing display_name
2026-01-13 12:37:48 +00:00
snipe d3eb89a97c Fixed display name in user table 2026-01-13 12:01:34 +00:00
snipe d7362a3785 Nicer light/dark for ldap sync page 2026-01-13 12:01:12 +00:00
snipe 26347ac41e Add display name to bulk user edit 2026-01-13 12:00:46 +00:00
snipe b396da3f33 Use null instead of blank if value is empty 2026-01-13 12:00:27 +00:00
snipe 306a0bf6de Merge remote-tracking branch 'origin/develop' 2026-01-13 10:22:38 +00:00
snipe 8000e274c6 Fixed #18424 - adds BYOD to view-assets page 2026-01-13 10:22:19 +00:00
akemidx 5d91e0fa0a name box alignment/icons for shared or not 2026-01-12 07:48:53 -05:00
akemidx eb41247f2d changing 'shared_report_template' to 'is_shared' in DB part 2, also last commit deleted an unused request file 2026-01-08 18:54:44 -07:00
akemidx d53eafe87a changing 'shared_report_template' to 'is_shared' in DB 2026-01-08 18:52:36 -07:00
Godfrey M e48c40e5af remove use statements 2026-01-08 15:58:15 -08:00
Godfrey M df51318fb9 remove throwable exception..too vague 2026-01-08 15:55:30 -08:00
Marcus Moore 065c17002e Remove unused test cases 2026-01-08 15:18:16 -08:00
Marcus Moore 0e46a54013 Improve input alignment 2026-01-08 15:08:56 -08:00
Marcus Moore 0e35fb941b Improve assertions 2026-01-08 14:17:10 -08:00
Marcus Moore 71c9b927c6 Allow using same template name 2026-01-08 14:17:00 -08:00
Godfrey M 0327d01287 typo fixes" 2026-01-08 10:52:27 -08:00
Godfrey M 0ab206ca13 log warnings instead of errors for 4xx status codes 2026-01-08 09:47:35 -08:00
akemidx e42960ea15 sharing a report template test 2026-01-07 18:49:34 -07:00
Marcus Moore 636d42a52e Make test more explicit 2026-01-07 16:42:47 -08:00
Marcus Moore 1451843f84 Implement test for viewing shared template 2026-01-07 16:39:10 -08:00
Marcus Moore f8af21306a Handle attempting to delete another user's template 2026-01-07 16:37:34 -08:00
Marcus Moore 4e874cdb1b Fix update logic 2026-01-07 16:13:22 -08:00
akemidx dbd9a844dc scaffold test cases around sharing templates 2026-01-07 16:29:32 -07:00
snipe 542cdef0bd Merge remote-tracking branch 'origin/develop' 2026-01-07 15:55:44 +00:00
snipe f5955e14ff Merge pull request #18410 from grokability/#18402-saml-fields-readonly-display
Fixed #18402 - Clean up SAML readonly display
2026-01-07 15:55:25 +00:00
snipe a0df7adbd1 Override readonly styles on user edit page 2026-01-07 15:50:01 +00:00
snipe 82a4398ef6 Removed @disabled on textarea 2026-01-07 15:37:05 +00:00
snipe 9271930ba8 Clean up SAML readonly display 2026-01-07 15:27:33 +00:00
snipe f149f0d994 Merge remote-tracking branch 'origin/develop' 2026-01-07 13:36:31 +00:00
snipe 14ff325608 Merge pull request #18404 from kenchan0130/patch-displayname
fixed: Prefer display name of user on UI
2026-01-07 13:29:56 +00:00
Tadayuki Onishi 8e37fcc71e Since displayname should be referenced in the UI, we've changed it to use displayname 2026-01-07 21:59:27 +09:00
snipe bf910bc708 Merge pull request #18406 from dbakan/patch-1
Fixed #18405: Clean up closing divs to fix footer position
2026-01-07 12:55:54 +00:00
Daniel Albertsen 1136ea0779 Clean up stray closing div tags
Removed redundant closing div tags in the edit view.
2026-01-07 12:43:03 +01:00
Daniel Albertsen 9ad94b6562 Fix white space indention 2026-01-07 12:43:03 +01:00
akemidx c5284ed195 works fully, just needs to restrict editing for non template creator 2026-01-06 17:21:22 -07:00
Marcus Moore 5cd92dd794 Remove redundant display of "Category" 2026-01-05 15:13:27 -08:00
snipe 5ddb0b4a55 Merge remote-tracking branch 'origin/develop' 2026-01-05 22:29:17 +00:00
snipe 990858ba41 Merge pull request #18398 from grokability/fixes-rb-#20282-set-files-variable
Set `$files` in UploadedFilesController API POST endpoint only if there are results
2026-01-05 22:28:48 +00:00
snipe 406951fc84 Set $files only if there are results 2026-01-05 22:17:06 +00:00
snipe 41c7bf4aaa Merge pull request #18397 from Godmartinz/rb-20474-fix
Adds [RB-20474] a try/catch to ms teams audit notification
2026-01-05 20:39:42 +00:00
Godfrey M 1543634cb0 remove line break 2026-01-05 12:39:28 -08:00
Godfrey M b935752ec0 reference endpoint appropriately" 2026-01-05 12:35:20 -08:00
Godfrey M 2a60b7b7b2 move endpoint 2026-01-05 12:31:00 -08:00
snipe cef78687b3 Merge remote-tracking branch 'origin/develop' 2026-01-05 20:27:37 +00:00
snipe 2f29edc01f Changed “reset to default” button to theme button style 2026-01-05 20:27:25 +00:00
snipe 134491b59e Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2026-01-05 20:20:51 +00:00
snipe 812ff0bfd2 Bumped jspdf to >=4.0.0 2026-01-05 20:20:09 +00:00
Godfrey M 201c4fa0d9 remove use path 2026-01-05 12:15:37 -08:00
Godfrey M ced83b9bfc add a try catch to ms teams audit notification 2026-01-05 12:14:42 -08:00
akemidx bd98ee62e1 something something prebreak 2026-01-05 12:16:16 -07:00
snipe e67c5273d7 Merge remote-tracking branch 'origin/develop' 2026-01-05 17:22:50 +00:00
snipe b4b9339065 Merge pull request #18396 from uberbrady/fix_select2_break_on_modal
Fixed #17652 - don't break company drop-down with modals
2026-01-05 17:22:29 +00:00
snipe f3cd68eb3f Merge remote-tracking branch 'origin/develop' 2026-01-05 17:21:44 +00:00
snipe ad57dea0e5 Suppress refresh button on client-side tables
Refresh only works on server-side tables
2026-01-05 17:21:32 +00:00
snipe 1e0a348b8e Merge remote-tracking branch 'origin/develop' 2026-01-05 17:19:56 +00:00
snipe 9c06a2126d Update sha.js to 2.4.12 2026-01-05 17:19:43 +00:00
snipe dab030e95d Merge remote-tracking branch 'origin/develop' 2026-01-05 16:56:02 +00:00
snipe 4995bc0d0d Small tweaks to select2 values 2026-01-05 16:55:53 +00:00
Brady Wetherington d2369893c8 Remove ID from company select in partial 2026-01-05 16:30:47 +00:00
snipe e48adf6443 Merge remote-tracking branch 'origin/develop' 2026-01-05 16:06:08 +00:00
snipe 505bca8386 Fixed :focus on theme buttons 2026-01-05 16:05:59 +00:00
snipe 31ca93a259 Merge remote-tracking branch 'origin/develop' 2026-01-05 15:40:59 +00:00
snipe 71523b7038 Merge pull request #18393 from grokability/#18291-bump-alpine
Attempted fix of #18291 - update PHP versions and alpine versions
2026-01-05 15:36:40 +00:00
snipe 9885dc9c8a Merge remote-tracking branch 'origin/develop' 2026-01-05 15:34:19 +00:00
snipe 00d9d9f132 Merge pull request #18395 from grokability/#18394-ldap-text-dark-mode
Fixed #18394 - LDAP sync test table background in dark mode
2026-01-05 15:34:00 +00:00
snipe 320dc3fac6 Fixed LDAP sync test table background in dark mode 2026-01-05 15:29:50 +00:00
Brady Wetherington 6e68e43a25 In this version of Alpine, php84 is default, so it's easier. 2026-01-05 15:11:08 +00:00
snipe a19c391aa1 Check can edit on demo in bulk user edit 2026-01-05 14:58:14 +00:00
snipe 32f0101c1b Attempted fix of #18291 - update PHP versions and alpine versions 2026-01-05 14:05:47 +00:00
snipe 12b9fdced5 Merge remote-tracking branch 'origin/develop' 2026-01-05 13:39:48 +00:00
snipe 0af45a53a9 Merge pull request #18359 from marcusmoore/17816-qty-in-activity-report
Fixed #17816 - added quantity to activity reports
2026-01-05 13:03:56 +00:00
snipe 37773d35f2 Merge pull request #18391 from ubc-cpsc/fix/PKSA-8x19-j2j3-bn67-sodium_compat
fix: paragonie/sodium_compat - Missing check that a point is on the prime subgroup for Edwards25519
2026-01-05 12:58:24 +00:00
snipe fca3eb4b7b Merge pull request #18392 from grokability/#18377-min-value-for-name
Fixes #18377 - make min value for names consistent
2026-01-05 12:56:29 +00:00
snipe 5e9e0b70db Fixes #18377 - make min value for names consistent 2026-01-05 12:51:49 +00:00
Joël Pittet 5242ffc04b fix: Missing check that a point is on the prime subgroup for Edwards25519 2026-01-02 13:55:18 -08:00
snipe f0c9a5b2dc Merge remote-tracking branch 'origin/develop' 2025-12-31 05:31:06 +00:00
snipe b3902e82fc Merge pull request #18388 from dylang3/fix/unintended-shell-exec-call
Fixed #18384: Remove backticks in bulk-actions.blade.php to avoid unintentional shell_exec() call
2025-12-31 05:30:06 +00:00
Dylan Guthrie d70eff6fc4 Fix: Remove backticks in bulk-actions.blade.php to avoid unintentional shell_exec() call 2025-12-30 22:37:49 -06:00
Vasily Plotnikov 5b5695ffe1 Fixed #18312: support aws rds mysql with force tls 2025-12-30 11:59:31 +00:00
snipe deb44cad30 Merge remote-tracking branch 'origin/develop' 2025-12-23 13:34:36 +00:00
snipe 35fdca3607 Added logo hover color 2025-12-23 13:33:53 +00:00
snipe 93080523d0 Merge remote-tracking branch 'origin/develop' 2025-12-21 08:34:42 +00:00
snipe b7b8f5a7e7 Merge pull request #18348 from grokability/dependabot/github_actions/develop/actions/cache-5
Bump actions/cache from 4 to 5
2025-12-21 08:16:48 +00:00
snipe 59ee55a6b2 Merge pull request #18349 from grokability/dependabot/github_actions/develop/actions/upload-artifact-6
Bump actions/upload-artifact from 5 to 6
2025-12-21 08:16:29 +00:00
snipe d85b25d683 Merge pull request #18363 from ubc-cpsc/task/request-get
fix: replace deprecated Symfony Request::get() usage
2025-12-21 08:09:50 +00:00
snipe 0108006fab Merge remote-tracking branch 'origin/develop' 2025-12-19 06:32:09 +00:00
snipe 755bb8f189 Merge pull request #18326 from dylang3/fix/users-groups-sync
Fixes #18325: Ensure existing permission group users are maintained when editing a group
2025-12-19 06:26:44 +00:00
Marcus Moore f53dcbc64f Only pull needed fields from database 2025-12-18 13:37:56 -08:00
Joël Pittet 0f215bbcf8 fix: replace deprecated Symfony Request::get() usage 2025-12-17 18:44:04 -08:00
snipe 9770775770 Merge remote-tracking branch 'origin/develop' 2025-12-17 16:27:42 +00:00
snipe 0b63bcc056 Derp. Copypasta 2025-12-17 16:25:03 +00:00
snipe 03116f5ece Fixed tests 2025-12-17 16:16:58 +00:00
snipe 5c091d8690 DIsable delete button if user cannot delete the user 2025-12-17 15:31:57 +00:00
snipe da1ca24190 Remove avatar delete - should be done in purge 2025-12-17 15:29:07 +00:00
akemidx 33f7a8d356 save copy 2025-12-16 21:38:13 -05:00
akemidx 64c3fe9099 notes and new direction? 2025-12-16 21:27:51 -05:00
Marcus Moore fa7382851f Use enum 2025-12-16 15:00:07 -08:00
Marcus Moore ab363596fd Replace qty with quantity 2025-12-16 14:55:00 -08:00
Marcus Moore b05970acf4 Add command to migrate license seat quantities in action log table 2025-12-16 13:48:23 -08:00
snipe aa6b70c296 Merge remote-tracking branch 'origin/develop' 2025-12-16 20:31:58 +00:00
snipe 00171e6d16 Fixed api docs url 2025-12-16 20:31:50 +00:00
snipe 061e0ded72 Merge remote-tracking branch 'origin/develop' 2025-12-16 20:26:18 +00:00
snipe 81bdd86fb7 Merge pull request #18358 from grokability/add-scim-url
Add SCIM url to admin settings
2025-12-16 20:06:50 +00:00
snipe 60ff06bcf0 Fixed nav footer label color 2025-12-16 20:02:20 +00:00
snipe a3e3f48d47 Added scim and API links to admin page 2025-12-16 19:59:52 +00:00
Godfrey M a3a79a696f adds first checkout to asset view and index 2025-12-16 08:48:08 -08:00
Marcus Moore 6947672046 Add seats to transformer 2025-12-15 17:31:56 -08:00
Marcus Moore 6f77e96998 Log quantity when adding or removing seats from license 2025-12-15 17:26:05 -08:00
Marcus Moore 8a595aa269 Display qty in history 2025-12-15 15:12:34 -08:00
Marcus Moore 1ccf38221f Set qty when accepting or declining checkout 2025-12-15 14:45:05 -08:00
Marcus Moore 18c639e6c0 WIP - adding qty to more event calls 2025-12-15 14:38:13 -08:00
Marcus Moore 06224371b3 Begin passing qty in CheckoutableCheckedOut event 2025-12-15 12:47:36 -08:00
dependabot[bot] d06105f410 Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 08:02:41 +00:00
dependabot[bot] 3226340b08 Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 08:02:30 +00:00
snipe 25ef5d64b4 Merge remote-tracking branch 'origin/develop' 2025-12-13 13:44:34 +00:00
snipe f286558065 Fixed #18344 2025-12-13 13:44:23 +00:00
snipe 9586c50cb5 Merge pull request #18347 from grokability/added-reset-for-theme
Added reset for theme, preview for effects in profile
2025-12-13 13:43:23 +00:00
snipe 4658bf38c5 Removed user migration for colors 2025-12-13 13:34:10 +00:00
snipe 951a4e37f3 New strings 2025-12-13 13:33:59 +00:00
snipe 6ad3154035 Added confetti, sounds test on checkboxes 2025-12-13 13:33:49 +00:00
snipe d7fa4a0df2 Tweaked colors 2025-12-13 13:33:13 +00:00
snipe 1112a40f0f Added reset button 2025-12-13 13:33:06 +00:00
snipe 78d1256b74 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2025-12-12 08:47:16 +00:00
snipe a3f9aad418 Bumped version 2025-12-12 08:46:25 +00:00
snipe dba8cb83bf Merge remote-tracking branch 'origin/develop' 2025-12-12 07:49:53 +00:00
snipe 1954c607cd #18339 - removed heroku support 2025-12-12 07:49:01 +00:00
snipe 744124f407 Merge remote-tracking branch 'origin/develop' 2025-12-12 07:14:51 +00:00
snipe 3c14921a8c #18340 - jfc swift 2025-12-12 07:14:36 +00:00
snipe b595fe7488 Merge remote-tracking branch 'origin/develop' 2025-12-12 06:41:18 +00:00
snipe b0b194cef7 Fixed missing comma 2025-12-12 06:41:06 +00:00
snipe eb0a3a27d3 Merge remote-tracking branch 'origin/develop' 2025-12-12 05:03:09 +00:00
snipe 72fbcd72e0 Fix for fullscreen with dark/light 2025-12-12 05:02:56 +00:00
snipe 09e660a38c Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-12-12 04:26:35 +00:00
snipe add1810fcc Added more options and validation to suppliers “new” modal 2025-12-12 04:18:42 +00:00
snipe eead2ce93e Adds cursor pointer to checkboxes and radios and their labels 2025-12-12 03:51:20 +00:00
akemidx 193fba71f3 fixing validation 2025-12-11 17:21:48 -05:00
snipe 5e60d96614 Simpler footer link color 2025-12-11 20:15:57 +00:00
snipe 85c721da99 Better alert color on dark 2025-12-11 20:14:33 +00:00
snipe f3f09dd9a5 Upgraded jquery to 3.7.1 2025-12-11 20:12:23 +00:00
snipe 29ad804ca8 Merge pull request #18332 from Godmartinz/add-category-to-account-accept-table
Fixed #18316 - Adds #18316 category to pending acceptance index table
2025-12-11 19:12:15 +00:00
Godfrey M a8c77d6e26 update accessor to laravel 11.x standards 2025-12-11 11:07:36 -08:00
snipe b949380db8 Fixed highlighted button in license toolbar 2025-12-11 18:38:40 +00:00
Godfrey M b7f6137a63 add accessor for category name on checkout acceptance model 2025-12-11 10:08:00 -08:00
snipe 181cd7f0dc Merge remote-tracking branch 'origin/develop' 2025-12-11 18:03:12 +00:00
snipe 10692dc587 Removed back button on history importer, themed upload button 2025-12-11 17:49:56 +00:00
snipe 8d0793e004 Merge remote-tracking branch 'origin/develop' 2025-12-11 17:45:23 +00:00
snipe 02da163ee0 Fixed modal header color in light mode 2025-12-11 17:45:14 +00:00
snipe 3199e94b3c Made icons fixed width via fa-fw 2025-12-11 16:49:02 +00:00
snipe ac2a1503e2 Merge remote-tracking branch 'origin/develop' 2025-12-11 16:45:48 +00:00
snipe ea10167607 Merge pull request #18333 from Godmartinz/fix-checkin-notification
Fixes [FD-52267] Expected Checkin Notification Shows Overdue instead of Reminder
2025-12-11 16:44:45 +00:00
snipe e617b913cd Merge remote-tracking branch 'origin/develop' 2025-12-11 16:44:01 +00:00
snipe 8f6208a3c9 Removed text-blue in bootstrap-tables 2025-12-11 16:42:56 +00:00
snipe 39c71481c9 Added breaks 2025-12-11 16:34:55 +00:00
snipe a38e49290e Added external link indicator to help text 2025-12-11 16:31:12 +00:00
snipe f974427964 Merge remote-tracking branch 'origin/develop' 2025-12-11 16:05:41 +00:00
snipe 1f311c8657 One more nullsafe 2025-12-11 16:05:31 +00:00
snipe c0406734bc Merge remote-tracking branch 'origin/develop' 2025-12-11 16:01:15 +00:00
snipe 66e80628f6 Account for no created_by value 2025-12-11 16:01:06 +00:00
akemidx 8a14800ef2 fixes/beginning validation 2025-12-11 03:42:10 -05:00
akemidx a46d73f562 spacing/hiding when no template loaded 2025-12-11 03:21:34 -05:00
Marcus Moore e908838376 Add failing tests 2025-12-10 15:44:51 -08:00
Marcus Moore 4b1339a11c Add qty to action_logs table 2025-12-10 13:30:34 -08:00
Godfrey M 620c43fd6d fixes expected checkin Notification 2025-12-10 11:33:08 -08:00
Godfrey M dfb9d5622a adds category to account accept index table 2025-12-10 10:43:59 -08:00
snipe af0aa7da4e Merge remote-tracking branch 'origin/develop' 2025-12-10 10:27:49 +00:00
snipe 75ddb50738 Use theme color for logo uploads 2025-12-10 10:27:40 +00:00
snipe 600238dd9b Merge remote-tracking branch 'origin/develop' 2025-12-10 09:38:51 +00:00
snipe 5a88e98ad9 Merge pull request #18330 from grokability/bigger-double-scrollbar-issue
Fixed #18317 - Longer double scrollbar issue
2025-12-10 09:38:37 +00:00
snipe 84a0544621 Removed <div class="table-responsive"> 2025-12-10 09:33:08 +00:00
snipe 8a1c7ee448 Remove <div class="table table-responsive"> 2025-12-10 09:09:12 +00:00
Dylan Guthrie c978be5cab send associated_users to view as collection 2025-12-09 19:47:42 -06:00
snipe 2fb29dad0a Merge remote-tracking branch 'origin/develop' 2025-12-10 00:09:17 +00:00
snipe 7d160abdaf Merge pull request #18323 from grokability/#18317-removed-responsive-table-divs
Fixed #18317 - Double scrollbars on some screens
2025-12-10 00:08:55 +00:00
snipe 6c5d2c6716 Merge pull request #18328 from grokability/#17197-download-importer-files
Added #17197: Ability to download uploaded import CSVs
2025-12-10 00:07:01 +00:00
snipe f3feff7988 Disable delete button if not owner of super admin 2025-12-09 23:59:22 +00:00
snipe 7d24f50cdc Removed extra whitespace 2025-12-09 23:49:21 +00:00
snipe 7c7375ed43 Undo temp delete commented out 2025-12-09 23:48:34 +00:00
snipe e2e4adca4e Generic message if the user tries to delete a file they don’t have access to 2025-12-09 23:46:53 +00:00
snipe a350b9bc3d Handle redirect if the user does not have permission to view results 2025-12-09 23:46:33 +00:00
snipe 7854543122 Added import-download controller 2025-12-09 23:46:13 +00:00
snipe 8b5636c0ab Override progress bar text color 2025-12-09 23:45:58 +00:00
snipe 9f948fd2ba Link to download and user 2025-12-09 23:45:49 +00:00
snipe 60fb67461a Added downnload route 2025-12-09 23:45:38 +00:00
snipe 5c896fc965 Merge pull request #18314 from Godmartinz/adjust-fonts-on-labelwriter-211xxx
Fixes [FD-52064] LabelWriter label font choice for fields, adds scaling to all labels.
2025-12-09 22:08:35 +00:00
Dylan Guthrie 242201ca91 Fix: Ensure existing permission group users are maintained when editing group 2025-12-09 16:06:49 -06:00
akemidx 865392d1f7 margin 2025-12-09 14:10:32 -05:00
akemidx b880ed2371 front end clarity 2025-12-09 13:14:09 -05:00
snipe c779988771 Fixed gallery cards in dark mode 2025-12-09 16:53:02 +00:00
snipe e6eb15d053 Removed the duplicate table-responsive in BS tables 2025-12-09 16:52:51 +00:00
snipe 05b957df19 Merge pull request #18322 from grokability/bulk-checkin-delete-UI-fixes-dark-mode
Bulk checkin delete UI fixes dark mode
2025-12-09 15:38:25 +00:00
snipe 96da8a5fab Updated route 2025-12-09 15:28:22 +00:00
snipe 62bf61402e Updated strings 2025-12-09 15:24:16 +00:00
snipe 227be798f6 Visual tweaks to bulk 2025-12-09 15:24:10 +00:00
snipe 53f304d137 Updated view with tooltip on disabled 2025-12-09 15:23:59 +00:00
snipe 137d362369 Added breadcrumbs 2025-12-09 15:21:50 +00:00
snipe 5b2cf54f50 Fixed accessory buttons on mobile 2025-12-09 14:06:53 +00:00
snipe b4bc785f7c Merge remote-tracking branch 'origin/develop' 2025-12-09 13:13:59 +00:00
snipe 98a8e4c2ec Merge pull request #18319 from uberbrady/fix_component_edit
Fixed [RB-4066], #18308 - Fix error on saving component after create
2025-12-09 13:13:45 +00:00
Brady Wetherington bed6b04c3d Unset the 'sum_unconstrained_assets' attribute before saving 2025-12-09 13:00:41 +00:00
Marcus Moore def04017e0 Improve readability in tests 2025-12-08 14:10:44 -08:00
Marcus Moore 9eeb916796 Improve clarity in test 2025-12-08 14:04:18 -08:00
Marcus Moore b06a0c5d83 Use value already computed 2025-12-08 13:59:07 -08:00
Marcus Moore 90541ba349 Use foreach instead of reduce 2025-12-08 13:57:38 -08:00
Marcus Moore 0cc346259b Use foreach instead of reduce 2025-12-08 13:51:30 -08:00
Marcus Moore 98c343b438 Improve method ordering 2025-12-08 13:48:22 -08:00
akemidx 7ee0cdc6c7 hide edit and delete for non report creators 2025-12-08 16:42:38 -05:00
akemidx 6a770832ba only creator can see share checkbox 2025-12-08 16:32:11 -05:00
akemidx ef0ff65162 scoping shared templates 2025-12-08 16:29:14 -05:00
akemidx 8c0e7e1bb3 share option saved in db column 2025-12-08 15:55:26 -05:00
snipe babb3ffb9c Merge remote-tracking branch 'origin/develop' 2025-12-08 20:24:31 +00:00
snipe 15c96f753c Revert hasMany “fix” 2025-12-08 20:22:55 +00:00
snipe 354bdeffbf Merge remote-tracking branch 'origin/develop' 2025-12-08 20:19:54 +00:00
snipe 512af90d31 Re-removed non-asset models from kits
These still do not work as expected.
2025-12-08 20:18:39 +00:00
Marcus Moore 8cb2ef7cac Add typehint 2025-12-08 12:17:04 -08:00
Marcus Moore 046b38e5c2 Improve method name 2025-12-08 12:10:25 -08:00
Marcus Moore d50d7fd631 Account for null value 2025-12-08 12:09:58 -08:00
snipe ed837b7527 Merge remote-tracking branch 'origin/develop' 2025-12-08 19:33:07 +00:00
snipe fa5dd99f00 Only try to print status name if it exists 2025-12-08 19:32:57 +00:00
Godfrey M a19282710b fix up 11354 label, and readd 1d barcode to 2112283 2025-12-08 10:44:21 -08:00
Godfrey M 2f3cfb0a4e fix labelwriter fonts and add scaling 2025-12-08 10:20:53 -08:00
snipe af4db94d17 Merge pull request #18306 from fdiaz3000/change-import-assetmodel
Change title_class to ucfirst in Object Import Command to allow AssetModel
2025-12-08 17:05:23 +00:00
snipe bcbf27acca Merge remote-tracking branch 'origin/develop' 2025-12-08 16:51:44 +00:00
snipe 80b037c5a5 Fixed label url 2025-12-08 16:51:36 +00:00
snipe 20bacfeecf Merge remote-tracking branch 'origin/develop' 2025-12-07 21:40:19 +00:00
snipe 8a128ae8c2 Fixed RB-4062 - double-braces 2025-12-07 21:40:02 +00:00
snipe beacfbb082 Merge remote-tracking branch 'origin/develop' 2025-12-07 15:02:17 +00:00
snipe df0d565ae5 Set audit button back to btn-primary 2025-12-07 15:02:07 +00:00
snipe 9ee755c112 More consistent bulk action labels 2025-12-07 14:58:08 +00:00
snipe 130aca2943 Merge remote-tracking branch 'origin/develop' 2025-12-07 14:53:10 +00:00
snipe 5ea76ecb66 Fixed checkmark class on model buk edit 2025-12-07 14:52:49 +00:00
snipe b8ff3ef41a Merge remote-tracking branch 'origin/develop' 2025-12-07 14:49:44 +00:00
snipe 3e8156be54 Merge pull request #18307 from grokability/bulk-model-edit-dark-light-fix
Fixed unreadable table on dark mode for asset model bulk edit, added breadcrumbs
2025-12-07 14:49:31 +00:00
snipe 47e192b530 Fixed breadcrumb title 2025-12-07 14:43:47 +00:00
snipe b33f222fc0 Smaller bulk delete form 2025-12-07 14:39:00 +00:00
snipe 20eab1f403 Fixed updated route names 2025-12-07 14:37:22 +00:00
snipe a283fdb75a Removed back button 2025-12-07 14:37:10 +00:00
snipe a29a115846 Nicer layout on asset bulk delete form 2025-12-07 14:36:59 +00:00
snipe 05ff9183fb Fixed weird top border 2025-12-07 14:31:47 +00:00
snipe 793d299c1d Fixed breadcrumbs 2025-12-07 14:31:01 +00:00
snipe 7d5f862f34 Use striped mode 2025-12-07 14:13:17 +00:00
snipe b0ab900a0f Fixed new dark mode for bulk model edit 2025-12-07 14:10:09 +00:00
Felix 0ea5012ba2 fix(import-command): 18305 change title_class to ucfirst 2025-12-06 15:00:43 -05:00
snipe 7ecb96d45a Merge remote-tracking branch 'origin/develop' 2025-12-06 01:08:46 +00:00
snipe 5f0d7fde39 Better selected color 2025-12-06 01:08:31 +00:00
snipe fe3c301ca2 Prod assets 2025-12-06 00:59:55 +00:00
snipe 3adf8847b0 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/build/overrides.css
#	public/css/build/overrides.css.map
#	public/css/dist/all.css
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-12-06 00:59:47 +00:00
snipe 9ae68f0000 More color tweaks 2025-12-06 00:58:32 +00:00
snipe 36415a1f7a Updated buttons 2025-12-05 23:43:56 +00:00
snipe 39d1aa932c Moved clear button 2025-12-05 21:35:47 +00:00
snipe 82b37c3b58 Removed back button 2025-12-05 21:25:17 +00:00
snipe c73c2b003a Merge remote-tracking branch 'origin/develop' 2025-12-05 20:52:48 +00:00
snipe 65b39d3a30 Use the themed buttons 2025-12-05 20:51:47 +00:00
snipe 6a59119c58 Merge pull request #18303 from grokability/update-users-api-with-disallowed-fields-list
Update users api with disallowed fields list
2025-12-05 20:32:55 +00:00
snipe 8b4387ec32 Fixed weird indenting 2025-12-05 19:52:31 +00:00
snipe dc82f8f077 Updated tests 2025-12-05 19:27:05 +00:00
snipe 07e1f67e13 Disallow fill for sensitive fields 2025-12-05 19:27:01 +00:00
snipe 412f4c65c8 Fixed dark mode footer links 2025-12-05 18:35:18 +00:00
snipe a6d9c1f882 Merge remote-tracking branch 'origin/develop' 2025-12-05 18:07:13 +00:00
snipe bb5c142f52 Nicer footer color for light/dark 2025-12-05 18:06:48 +00:00
snipe a5e1528c0d Merge remote-tracking branch 'origin/develop' 2025-12-05 17:46:30 +00:00
snipe 904c20e879 Removed blue text override 2025-12-05 17:46:20 +00:00
snipe 612daa6824 Merge pull request #18302 from grokability/preflight-quickstart-cleanup
Preflight quickstart cleanup
2025-12-05 17:20:29 +00:00
snipe 02b6de2385 Added tests 2025-12-05 17:03:10 +00:00
snipe da5db1920e Use generic email address domains 2025-12-05 17:03:02 +00:00
snipe d20545741e Nicer views 2025-12-05 17:02:51 +00:00
snipe 03b42d2c6c Nicer styles 2025-12-05 17:02:19 +00:00
snipe e9dbeebbc4 Updated some strings 2025-12-05 17:02:09 +00:00
snipe bb53fa245b Removed email domain from required setup fields 2025-12-05 17:01:36 +00:00
snipe bc796498a3 Moved setup controller methods out of settings controller 2025-12-05 17:01:24 +00:00
snipe c25266054b Merge remote-tracking branch 'origin/develop' 2025-12-05 10:55:59 +00:00
snipe 0204414196 Handle /setup link colors via middleware 2025-12-05 10:55:49 +00:00
snipe c6b2017494 Merge pull request #18297 from Godmartinz/tze_24mm_E_2d-adjustment-and-scaling
Fixes [FD-50838] adjust `Tze_24mm_E` 2D barcode 20% bigger, scales fields, center label more
2025-12-05 08:57:20 +00:00
snipe 84fd48602e Merge pull request #18298 from Godmartinz/add-TZe_241
Adds [FD-52267] TZe_241 based on TZe_18mm sizes
2025-12-05 08:56:55 +00:00
Marcus Moore a34ea0804d Separate out info and prompt 2025-12-04 17:22:23 -08:00
Marcus Moore 0fbf4ce443 Move singular eula to bottom of email 2025-12-04 17:08:48 -08:00
Marcus Moore d062cc45df Add translation 2025-12-04 15:18:24 -08:00
Marcus Moore da790136ff WIP 2025-12-04 14:40:51 -08:00
Marcus Moore 134f374ada WIP 2025-12-04 14:39:37 -08:00
Marcus Moore df304a894f WIP 2025-12-04 14:38:13 -08:00
Marcus Moore 2d1d90e38c Add comment 2025-12-04 14:34:50 -08:00
Marcus Moore dcbdc6fcb8 WIP 2025-12-04 14:27:53 -08:00
Marcus Moore 5a4ef15de5 Avoid rendering rule if last item in loop 2025-12-04 14:22:13 -08:00
Marcus Moore affc4c8bd9 Styling 2025-12-04 14:07:10 -08:00
Marcus Moore bc5d6e89ba Readability 2025-12-04 14:05:22 -08:00
Marcus Moore c17e6811d2 Group categories visually 2025-12-04 14:03:11 -08:00
Marcus Moore 7f097c029a Fix indent 2025-12-04 13:52:26 -08:00
Godfrey M c8e8eb58aa adds TZe_241 based on TZe_18mm sizes 2025-12-04 12:41:57 -08:00
akemidx 60f5affe43 more sharing framewor. tests outlines 2025-12-04 13:48:36 -05:00
Godfrey M 0b087ca77d adjust 2d barcode 20% bigger, scale fields, center label more 2025-12-04 09:55:47 -08:00
snipe 444083ec5d Merge remote-tracking branch 'origin/develop' 2025-12-04 17:54:31 +00:00
snipe bf01a11fec Fixed label colors in dark/light 2025-12-04 17:54:19 +00:00
snipe 8f232421d2 Merge remote-tracking branch 'origin/develop' 2025-12-04 17:37:58 +00:00
snipe dbc688ad6e Set '#ffffff' as default 2025-12-04 17:37:44 +00:00
snipe 6217a721ac Merge remote-tracking branch 'origin/develop' 2025-12-04 15:11:38 +00:00
snipe c2ba937ac6 Merge pull request #18295 from grokability/#18288-allow-reference-editing-if-edit-profile-is-disabled
Fixed #18288: Allow users to edit display preferences even if profile editing is not enabled
2025-12-04 15:11:11 +00:00
snipe d860786221 Re-add button 2025-12-04 13:21:54 +00:00
snipe 621ce1777f Fixed #18288: Allow users to change preferences even if profile editing is not permitted 2025-12-04 13:21:04 +00:00
snipe 4f610ac1af Added tag color to importer 2025-12-04 11:07:59 +00:00
snipe 7341cd1712 Merge pull request #18294 from grokability/#18278-import-company-in-locations
Fixed #18278: Import companies into locations on initial import
2025-12-04 11:07:18 +00:00
snipe bf112b7b4b Fixed #18278: Import companies into locations on initial import 2025-12-04 10:59:45 +00:00
snipe ad9e0cc39a Merge remote-tracking branch 'origin/develop' 2025-12-04 10:50:09 +00:00
snipe 1439681113 Alert message link text 2025-12-04 10:34:58 +00:00
snipe 3b750541c9 Prod assets 2025-12-04 10:19:12 +00:00
snipe 79765201ac Merge remote-tracking branch 'origin/develop' 2025-12-04 10:18:37 +00:00
snipe 0086b9d848 mix 2025-12-04 10:17:17 +00:00
snipe c8ddb44783 Fixed button color 2025-12-04 10:16:44 +00:00
snipe d4829a4bac Fixed #18286 - :user in declined email 2025-12-04 10:16:35 +00:00
snipe 486f0c0035 Re-running assets for prod 2025-12-04 08:46:53 +00:00
snipe dc3a695ab0 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/build/overrides.css
#	public/css/build/overrides.css.map
#	public/css/dist/all.css
#	public/css/dist/skins/_all-skins.css
#	public/css/dist/skins/_all-skins.css.map
#	public/css/dist/skins/_all-skins.min.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.css.map
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-black.css
#	public/css/dist/skins/skin-black.css.map
#	public/css/dist/skins/skin-black.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.css.map
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-blue.css
#	public/css/dist/skins/skin-blue.css.map
#	public/css/dist/skins/skin-blue.min.css
#	public/css/dist/skins/skin-contrast.css
#	public/css/dist/skins/skin-contrast.css.map
#	public/css/dist/skins/skin-contrast.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.css.map
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-green.css
#	public/css/dist/skins/skin-green.css.map
#	public/css/dist/skins/skin-green.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.css.map
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-orange.css
#	public/css/dist/skins/skin-orange.css.map
#	public/css/dist/skins/skin-orange.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.css.map
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-purple.css
#	public/css/dist/skins/skin-purple.css.map
#	public/css/dist/skins/skin-purple.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.css.map
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-red.css
#	public/css/dist/skins/skin-red.css.map
#	public/css/dist/skins/skin-red.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.css.map
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/css/dist/skins/skin-yellow.css
#	public/css/dist/skins/skin-yellow.css.map
#	public/css/dist/skins/skin-yellow.min.css
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-12-04 08:45:19 +00:00
akemidx e769239213 only user can change report sharing 2025-12-04 00:39:47 -05:00
akemidx 45923a74f6 only user can change report sharing 2025-12-04 00:34:30 -05:00
Marcus Moore 7bf7a87f8a Begin to display EULAs for all categories 2025-12-03 16:59:57 -08:00
Marcus Moore 8396e27a2c Revert "Avoid showing EULA"
This reverts commit 8c89eb6650.
2025-12-03 16:16:30 -08:00
Marcus Moore 5153c68b8b Remove old todos 2025-12-03 16:15:43 -08:00
snipe 3feee682b6 Fixed import view with light/dark 2025-12-03 21:38:57 +00:00
snipe 4ea5cb9538 Merge pull request #18284 from Godmartinz/fix-alert-threshold-bug
Fixes Low Inventory Alerts not sending when threshold is `null`
2025-12-03 21:32:29 +00:00
Godfrey M f6461a755a revert again 2025-12-03 13:22:46 -08:00
Godfrey M 39cf5ce66e revert some changes 2025-12-03 13:22:03 -08:00
Godfrey M c68d9892b5 fix threshold bug, include minimum to available 2025-12-03 13:20:01 -08:00
snipe 33b20b6268 Fixed sidemenu hover 2025-12-03 19:27:44 +00:00
snipe 280df20a0b Better default link colors for skin migration 2025-12-03 18:18:24 +00:00
snipe 7027cd80d4 Updated modal for light/dark 2025-12-03 18:18:14 +00:00
snipe bfbcfe7bae Updated text string 2025-12-03 17:36:48 +00:00
snipe e1f64b6d2b Modal title color fix 2025-12-03 17:36:39 +00:00
snipe 6944c438dd Inline tooltip improvements 2025-12-03 16:04:23 +00:00
snipe 49b7ff1192 Fixed email field color 2025-12-03 15:58:50 +00:00
snipe 662cdbaa0e Datepicker color fixes 2025-12-03 15:55:04 +00:00
snipe e912eb5ef8 Merge pull request #18279 from uberbrady/new_allowlist_restore_cleaner
Loosen regex allowlist for setting character sets
2025-12-03 13:31:01 +00:00
Brady Wetherington 5ab68d83a5 Loosen regex allowlist for setting character sets 2025-12-03 13:06:02 +00:00
snipe f7c432f7fd Bumped hash 2025-12-03 10:09:23 +00:00
snipe 592ccb6ebe Merge pull request #18244 from Godmartinz/receive-all-expired-licenses-on-report
adds #17422 [FD-49345] `--expired-licenses` command parameter to `snipeit:expiring-alerts`
2025-12-03 09:49:49 +00:00
snipe d22d70dd92 Merge pull request #18257 from iryadifarhan/fix/manager-view-not-displaying-subordinates-eulas-properly
Fixes Manager View not displaying subordinates EULAs properly in View Assets page
2025-12-03 09:49:35 +00:00
snipe 7ec5606ce4 Merge pull request #18247 from uberbrady/multi_create_fixes
Fixed #18160 - Multi-create fixes
2025-12-03 09:49:14 +00:00
snipe 476bf95edf Merge pull request #18272 from spencerrlongg/add-null-checks
Adds Null Checks
2025-12-03 09:48:43 +00:00
Marcus Moore 391495dd86 Remove some assertions 2025-12-02 17:41:22 -08:00
Marcus Moore 8c89eb6650 Avoid showing EULA 2025-12-02 17:37:21 -08:00
Marcus Moore 4167c6ea70 Add some translations 2025-12-02 17:36:05 -08:00
Marcus Moore ca3151ce29 Improve naming 2025-12-02 16:10:53 -08:00
akemidx cc20844eff share template bits 2025-12-02 18:34:13 -05:00
Marcus Moore d876e710e4 Be more specific in tests 2025-12-02 13:48:59 -08:00
Marcus Moore 5c1290425b Improve variable name 2025-12-02 13:28:59 -08:00
Marcus Moore 2043488c67 Cleanups 2025-12-02 12:31:04 -08:00
Marcus Moore e7e48c8f03 Cleanups 2025-12-02 12:30:16 -08:00
Marcus Moore dad650b804 Readability 2025-12-02 12:28:51 -08:00
Marcus Moore d0e73714c6 Implement test 2025-12-02 11:57:02 -08:00
Marcus Moore d8b95d3a20 Organization 2025-12-02 11:53:37 -08:00
Marcus Moore 559d8cc0db Implement test 2025-12-02 11:53:01 -08:00
Marcus Moore 7a804aa576 Implement test 2025-12-02 11:51:28 -08:00
snipe cdf036ed7b Merge pull request #18274 from spencerrlongg/check-that-email-exists-on-recipient
Check That Email Exists on Recipient in Checkout Acceptance
2025-12-02 19:35:28 +00:00
snipe 639a3b9295 Merge pull request #18273 from Godmartinz/fix-null-assignee-bug-in-checkoutable
Refactor `assignee` in Checkoutable to accept null
2025-12-02 19:31:22 +00:00
spencerrlongg e4f8c3bef7 add null check and check for email 2025-12-02 13:17:13 -06:00
Godfrey M 462945022c allow null for assignee in checkoutable 2025-12-02 11:05:07 -08:00
spencerrlongg aa57687df0 add null checks to license 2025-12-02 12:13:38 -06:00
snipe 3237a3b9de One more button fix 2025-12-02 16:44:31 +00:00
snipe ff30e109cc Small button fixes 2025-12-02 16:42:32 +00:00
snipe 2d291f843a Fixed create new on table buttons 2025-12-02 16:36:54 +00:00
snipe 7219fc1c3c Added style to border on colorpicker 2025-12-02 16:22:53 +00:00
snipe ed6bfa7810 Disable branding colopickers on demos 2025-12-02 16:16:33 +00:00
snipe ad15090c34 Nicer search highlight box 2025-12-02 15:58:34 +00:00
snipe 9d34bf4a19 Fixed table header colors 2025-12-02 15:54:18 +00:00
snipe 7c9b1a52af Swapped link colors 2025-12-02 15:39:32 +00:00
snipe dd297dca31 Merge pull request #18249 from grokability/proper-dark-toggle
Experiment: simpler light/dark toggle
2025-12-02 14:37:52 +00:00
snipe 1409d01078 Tweaked color 2025-12-02 14:19:53 +00:00
snipe c9a03cf9b7 Final color tweaks 2025-12-02 14:03:08 +00:00
snipe 6a99132e76 More tweaks 2025-12-02 13:29:12 +00:00
Marcus Moore 0bca66b671 Send email if asset has checkin_email set to true 2025-12-01 16:58:02 -08:00
Marcus Moore 24e5cf8121 Improve readability 2025-12-01 16:51:09 -08:00
Marcus Moore ee7c4ce0f3 Improve assertion 2025-12-01 16:47:23 -08:00
Marcus Moore 428b511687 Send if eula is set 2025-12-01 16:41:50 -08:00
Marcus Moore 49497996d5 Fix template 2025-12-01 16:41:39 -08:00
Marcus Moore bccd65e2fc Add failing test 2025-12-01 16:33:46 -08:00
Marcus Moore f2158843ce Avoid attempting to loop over null 2025-12-01 16:25:37 -08:00
Marcus Moore 87fc4a4f22 Scaffold scenarios 2025-12-01 16:01:34 -08:00
Marcus Moore 27291f9ee9 Add todo 2025-12-01 14:23:33 -08:00
Marcus Moore cba963110e Remove unused import 2025-12-01 14:22:06 -08:00
Marcus Moore aa014e3706 Improve wording 2025-12-01 14:19:54 -08:00
akemidx 58d577f67a shared/notshared marker 2025-12-01 16:48:39 -05:00
Marcus Moore cd3678841b Fix intro line to locations 2025-12-01 13:41:23 -08:00
Marcus Moore 425e0c33df Add tests for introduction line 2025-12-01 12:55:39 -08:00
Marcus Moore 2018407782 Avoid error by pre-checking if user has email address 2025-12-01 12:04:53 -08:00
snipe 2e269d2e63 Removed old skin less files 2025-11-29 10:42:10 +00:00
snipe 7820636c9f Nicer defaults 2025-11-29 10:41:58 +00:00
snipe db1b35ccf6 Fixed style 2025-11-28 19:20:41 +00:00
snipe fadfe0a782 Removed old skin references 2025-11-28 19:17:52 +00:00
snipe 255a2ecdd9 Sigh 2025-11-28 19:09:38 +00:00
snipe 97ffe33fc8 Check that a setting record exists 2025-11-28 19:07:46 +00:00
snipe 56d97a1f59 Updated map 2025-11-28 19:05:25 +00:00
snipe 28d5d24617 Migration to handle skins 2025-11-28 19:05:19 +00:00
snipe d97f6903d6 Save settings controller 2025-11-28 19:05:03 +00:00
snipe 3bf84d96d9 Update language 2025-11-28 19:04:49 +00:00
snipe 8df643a2ab Removed user skin option 2025-11-28 19:04:40 +00:00
snipe 2d001c4fa1 Added colorpickers for link colors 2025-11-28 19:04:20 +00:00
snipe cbd6b57445 Removed skin from user profile update 2025-11-28 19:04:00 +00:00
snipe dac684c08a Update demo settings 2025-11-28 19:03:48 +00:00
snipe 772c29791a Use css variable 2025-11-28 17:48:08 +00:00
snipe 89a232ae14 Merge pull request #18266 from Valinwolf/develop
Added endpoint & use_path_style_endpoint configs for public/private S3
2025-11-28 17:39:23 +00:00
snipe 4e4b8ddb77 And more updates 2025-11-28 17:33:30 +00:00
Patrick Thomas 6eaefa0bdd Added endpoint & use_path_style_endpoint configs for public/private S3 2025-11-28 17:29:02 +00:00
snipe 20a75bbbb7 More styles 2025-11-28 15:54:24 +00:00
snipe 5cc261dd3c Smaller LDAP screen 2025-11-28 15:50:37 +00:00
snipe 6d958b6f65 Added fa-fw to arrow class 2025-11-28 15:50:25 +00:00
snipe 8ddac4d7c7 More select2 styling :( 2025-11-28 15:16:22 +00:00
snipe a321ad9dbe Handle select2 stuff 2025-11-28 14:13:19 +00:00
snipe 4dff66253c Added contrast-color to dynamically pick white/black for topnav 2025-11-27 16:15:35 +00:00
snipe 9a1e9f90bc Better preview for header color, updated text 2025-11-27 15:56:06 +00:00
snipe c54724919c Show header color preview 2025-11-27 15:29:24 +00:00
snipe 139d1cdcf8 Added a few more classes 2025-11-27 14:48:28 +00:00
snipe 490c50a182 Added fa-fw to action buttons 2025-11-27 14:48:16 +00:00
snipe af1e496eab Added correct box class 2025-11-27 13:30:11 +00:00
snipe efea043549 Added dark/light text 2025-11-27 13:29:59 +00:00
snipe d4ee91f013 Removed a few classes 2025-11-27 13:29:50 +00:00
iryadifarhan d4561581ad Apply fix around view-assets to pass request parameter and profile controller to address request parameter 2025-11-27 13:42:47 +07:00
snipe a17f167952 Fix button overrides 2025-11-26 15:41:38 +00:00
snipe 5beb068cde More updates for dark and light switches 2025-11-26 15:35:43 +00:00
snipe a272bdc796 Merge pull request #18251 from uberbrady/improve_component_asset_counts
Optimize queries for Components listing
2025-11-26 14:40:14 +00:00
snipe 30a43089a0 More variablization 2025-11-26 13:50:39 +00:00
Brady Wetherington 416b32cbc8 Optimize queries for Components listing 2025-11-26 12:36:44 +00:00
iryadifarhan a3a49e47b7 Apply toDateString so that the it equally compare date only, evades including time/hour comparing 2025-11-26 13:21:15 +07:00
snipe d203cece0e Removed indicidual skins 2025-11-26 04:08:31 +00:00
snipe 9f6f0f04c7 Few more tweaks 2025-11-26 04:06:20 +00:00
iryadifarhan a4729a7de8 Fix implemented by using existing function from Depreciable trait, hence addressing the floor value 2025-11-26 10:17:21 +07:00
snipe a974c6d4cd Moved icon-med 2025-11-26 02:56:05 +00:00
snipe 34612acdcf Experiment: light/dark simplifcation 2025-11-26 02:49:40 +00:00
snipe 9e23117f9c Merge remote-tracking branch 'origin/develop' 2025-11-26 00:35:26 +00:00
snipe b3996f1970 In the sea, @uberbrady! (fixed missing semicolon) 2025-11-26 00:35:16 +00:00
snipe e143017432 Tinkering with CSS/JS dark more 2025-11-26 00:34:46 +00:00
Brady Wetherington c6c0a14ee0 Whoops, used PHP's equal signs instead of MySQL's :/ 2025-11-25 20:23:15 +00:00
Brady Wetherington 9b8768dbdd Tighten everything up, remove logging, fix last bits of functionality 2025-11-25 19:34:10 +00:00
snipe a3bfcc962d Merge remote-tracking branch 'origin/develop' 2025-11-25 18:50:23 +00:00
snipe ca4ed605a8 Merge pull request #18246 from Godmartinz/resize-label-fields-conditionally-L6009_A
Fixes [FD-52064] Avery `L6009_A` & `L4736_A` label field overflow with scaling
2025-11-25 18:37:06 +00:00
Godfrey M d3e6d7442f typo bonanza 2025-11-25 10:30:56 -08:00
Godfrey M b558bc5334 change variable" 2025-11-25 10:30:06 -08:00
Godfrey M 204d7b5be6 added scaling to L4736_A 2025-11-25 10:23:08 -08:00
Godfrey M 7dccfec332 adds notes 2025-11-25 10:12:27 -08:00
snipe 0b694bfd0b Merge remote-tracking branch 'origin/develop' 2025-11-25 18:02:23 +00:00
snipe dfb59d8a55 Added link to rudder2snipe repo 2025-11-25 18:01:29 +00:00
Brady Wetherington 3cd191210c Merge branch 'develop' into multi_create_fixes 2025-11-25 13:58:56 +00:00
snipe 56a44ad421 Merge remote-tracking branch 'origin/develop' 2025-11-25 13:38:54 +00:00
snipe a12ee3c0da Merge pull request #18245 from uberbrady/redirect_upgrader
Add new 'git remote' management to change Snipe-IT URLs
2025-11-25 13:38:31 +00:00
Brady Wetherington a657c479be Add new 'git remote' management to change Snipe-IT URL's 2025-11-25 13:17:56 +00:00
Godfrey M bb7dabc73b adds expired-licenses command parameter 2025-11-24 11:41:50 -08:00
Godfrey M ab82c5fd88 resizes label field box to size if needed 2025-11-24 11:04:23 -08:00
snipe 78cfb19f69 Merge remote-tracking branch 'origin/develop' 2025-11-24 17:40:26 +00:00
snipe f2334082ee Added tag color to location query 2025-11-24 17:40:13 +00:00
Marcus Moore 54f065f42c Improve test 2025-11-19 17:11:39 -08:00
Marcus Moore 333ebb88b9 Enable sending to manager 2025-11-19 17:08:00 -08:00
Marcus Moore 53ff367473 Add failing tests 2025-11-19 16:31:48 -08:00
Marcus Moore 33a7de9448 Add custom fields to email 2025-11-19 13:31:30 -08:00
akemidx c797472bcc migration, and front end 2025-11-18 15:03:28 -05:00
Brady Wetherington 70d79c1890 Merge branch 'develop' into multi_create_fixes 2025-11-11 18:20:49 +00:00
Brady Wetherington fb1fde26ce Use a FormRequest to better handle multiple-asset-creation by GUI 2025-11-11 18:00:22 +00:00
Godfrey M 6faf171007 update asset_deployable translation 2025-11-10 16:58:42 -08:00
Godfrey M 9348204987 remove spacing adjustment 2025-11-05 11:22:11 -08:00
Godfrey M 776c7caaa5 get warning/success status check to display 2025-11-05 11:19:05 -08:00
Godfrey M 2216b83ca7 get warning/success status check to display 2025-11-05 11:16:35 -08:00
Marcus Moore 777872d41f Add notification group 2025-10-23 13:53:38 -07:00
Marcus Moore b85d1f184a Remove redundant test 2025-10-23 13:52:52 -07:00
Marcus Moore 02129eeddb Add try/catch 2025-10-23 13:51:53 -07:00
Marcus Moore 2612e0bbc8 Remove unused import 2025-10-23 12:43:12 -07:00
Marcus Moore 3670efacb4 Implement test 2025-10-23 12:39:36 -07:00
Marcus Moore 476611b70f Remove redundant test 2025-10-23 12:27:20 -07:00
Marcus Moore 60df2a17f8 Check context when sending to alert address 2025-10-22 16:41:36 -07:00
Marcus Moore f64f4795c1 Send request instead of firing event 2025-10-22 16:39:34 -07:00
Marcus Moore e036f756d5 Improve setup 2025-10-22 16:24:47 -07:00
Marcus Moore 92fd121cae Clean up 2025-10-22 16:12:35 -07:00
Marcus Moore 6307337892 Add scenario 2025-10-22 16:09:26 -07:00
Marcus Moore fc2e35cd32 Improve assertions 2025-10-22 14:23:07 -07:00
Marcus Moore 1811e061aa Populate scenario 2025-10-22 14:21:24 -07:00
Marcus Moore 59037f0d83 Move scenario 2025-10-22 14:18:45 -07:00
Marcus Moore 67edb7d396 Send to alert email 2025-10-22 14:17:32 -07:00
Marcus Moore 0da393f950 Populate scenario 2025-10-22 14:02:16 -07:00
Marcus Moore abd30e551e Clean up 2025-10-22 13:46:19 -07:00
Marcus Moore 6fb2889a92 Clean up 2025-10-22 13:45:00 -07:00
Marcus Moore 54125d27e0 Add scenario 2025-10-22 13:44:14 -07:00
Marcus Moore 41efda5f82 Add todos 2025-10-21 13:22:41 -07:00
Marcus Moore 2aee14a800 Only send mail to target if they have an email address 2025-10-21 13:14:50 -07:00
Marcus Moore be69da0a0d Add test case 2025-10-21 13:13:45 -07:00
Marcus Moore 31a247b55b Add test case 2025-10-21 12:44:50 -07:00
Marcus Moore 33c156be16 Add failing test 2025-10-21 12:43:23 -07:00
Marcus Moore fd66a083d6 Fix assertion 2025-10-21 12:41:51 -07:00
Marcus Moore d276f50fdf Fix assertion 2025-10-21 12:30:27 -07:00
Marcus Moore 4cb748e124 Improve test assertions 2025-10-21 12:29:25 -07:00
Marcus Moore 503e6898c3 WIP 2025-10-20 16:53:36 -07:00
Marcus Moore f34056fe2e Scaffold some testing changes 2025-10-20 16:35:27 -07:00
Marcus Moore 8ff3575442 Add test for listener registration 2025-10-20 16:31:52 -07:00
Marcus Moore b5e3358bbd Add todos 2025-10-20 14:29:05 -07:00
Marcus Moore 047a1197be Add failing conditions 2025-10-20 14:18:11 -07:00
Marcus Moore 0e87843446 WIP: start testing 2025-10-16 14:30:48 -07:00
Marcus Moore 4f1ff328ad Display eula if it is the same for all items 2025-10-14 17:10:57 -07:00
Marcus Moore ad5bbb9b37 Add divider 2025-10-14 16:34:18 -07:00
Marcus Moore c6e2fd2cab Add note 2025-10-14 16:33:37 -07:00
Marcus Moore d3a7e25b86 Move expected checking and only show once 2025-10-14 16:29:59 -07:00
Marcus Moore 062445a48e Add expected checkin 2025-10-14 16:25:32 -07:00
Marcus Moore 3c32be6181 Make introduction line dynamic 2025-10-14 16:22:19 -07:00
Marcus Moore e2f4a9bf9f Make subject dynamic 2025-10-14 16:20:01 -07:00
Marcus Moore 2db4c1b2e4 Add todo 2025-10-14 16:19:42 -07:00
Marcus Moore 6ed93f4a4f Add asset details 2025-10-14 14:02:21 -07:00
Marcus Moore 9dcee71baf wip 2025-10-08 16:18:54 -07:00
Marcus Moore 9bdd0d1d1e Add admin name 2025-10-08 16:05:55 -07:00
Marcus Moore 13b51d8608 Make acceptance section dynamic 2025-10-08 15:46:36 -07:00
Marcus Moore 19969fee39 Update closing 2025-10-08 15:32:38 -07:00
Marcus Moore 28dc4bf52e Move template to correct directory 2025-10-08 14:13:04 -07:00
Marcus Moore 9a380ac3d4 Extract intro text 2025-10-08 14:12:35 -07:00
Marcus Moore 17a26b43f0 Naively send email 2025-10-08 14:01:07 -07:00
Marcus Moore 3c42acebf0 Scaffold new listener 2025-09-30 15:11:12 -07:00
Marcus Moore 3327b2ce3c Add assertions 2025-09-30 13:03:24 -07:00
Godfrey M 8c56aa9575 changed the wrong language file 2025-09-30 12:42:46 -07:00
Godfrey M d528126f15 right hand table loading, need styling and translations 2025-09-30 12:31:44 -07:00
akemidx 64d0e3928c clean erroneous added space 2025-09-30 13:11:38 -04:00
Brady Wetherington fc4ac029b1 Added the actual files to make that previous statement true 2025-09-29 12:56:59 +01:00
Brady Wetherington 73f4afa05e Got groups support working in Entra ID 2025-09-29 12:56:23 +01:00
Marcus Moore 7017a0cae1 WIP: introduce event 2025-09-25 16:23:43 -07:00
Marcus Moore a40e4d7d04 Begin experimenting with context 2025-09-25 15:43:04 -07:00
Marcus Moore 9e3b56f4bc Add failing test 2025-09-25 15:41:37 -07:00
Brady Wetherington ef1a42fff2 Progress! Got addresses updating correctly 2025-09-24 15:57:39 +01:00
Brady Wetherington 760d089073 Azure-specific Manager is handled now 2025-09-23 20:40:21 +01:00
Brady Wetherington 92fbf83bdb Adjusting some Schema settings to match our requirements 2025-09-16 15:41:14 +01:00
Brady Wetherington 9525bbf502 Re-worked the SCIMConfig for the new version of laravel-scim-server 2025-09-16 15:22:33 +01:00
Brady Wetherington 61df3bc462 WIP: switching to new version of laravel-scim-server 2025-09-16 11:44:10 +01:00
akemidx 3492ed54de i'm dumb, fixed query 2025-09-10 19:05:28 -04:00
akemidx 1455281957 updated to outside window 2025-09-10 18:49:04 -04:00
akemidx e1de57384e field for number choice 2025-08-26 18:03:47 -04:00
akemidx c95462328a selected value(s) 2025-08-19 18:35:07 -04:00
akemidx 84fc89250a backend works, no save yet 2025-08-19 14:30:26 -04:00
akemidx a80f52cbf4 putting dropdown back 2025-08-18 19:47:26 -04:00
akemidx 7ce324a3a5 controller 2025-08-14 17:42:19 -04:00
akemidx 7624082b29 dropdown 2025-08-13 18:07:39 -04:00
akemidx 6d3bba696a first front end bit 2025-08-12 19:14:11 -04:00
Matthias Mair 68dad1d3ae fixed wrong index reference in MoveUploadsToNewDisk.php
usage of undefined reference fixed
2023-08-22 20:39:21 +02:00
7765 changed files with 467403 additions and 244611 deletions
+18
View File
@@ -4262,6 +4262,24 @@
"contributions": [
"code"
]
},
{
"login": "Husky-Devel",
"name": "Peter Gallwas",
"avatar_url": "https://avatars.githubusercontent.com/u/75509373?v=4",
"profile": "https://www.husky.nz",
"contributions": [
"code"
]
},
{
"login": "CybotTM",
"name": "Sebastian Mendel",
"avatar_url": "https://avatars.githubusercontent.com/u/326348?v=4",
"profile": "https://github.com/CybotTM",
"contributions": [
"code"
]
}
]
}
+5 -1
View File
@@ -113,7 +113,7 @@ ENABLE_HSTS=false
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_PREFIX=snipeit
# --------------------------------------------
@@ -137,6 +137,8 @@ PUBLIC_AWS_ACCESS_KEY_ID=null
PUBLIC_AWS_DEFAULT_REGION=null
PUBLIC_AWS_BUCKET=null
PUBLIC_AWS_URL=null
PUBLIC_AWS_ENDPOINT=null
PUBLIC_AWS_PATH_STYLE=null
PUBLIC_AWS_BUCKET_ROOT=null
# --------------------------------------------
@@ -147,6 +149,8 @@ PRIVATE_AWS_SECRET_ACCESS_KEY=null
PRIVATE_AWS_DEFAULT_REGION=null
PRIVATE_AWS_BUCKET=null
PRIVATE_AWS_URL=null
PRIVATE_AWS_ENDPOINT=null
PRIVATE_AWS_PATH_STYLE=null
PRIVATE_AWS_BUCKET_ROOT=null
# --------------------------------------------
+6 -1
View File
@@ -37,6 +37,7 @@ MYSQL_ROOT_PASSWORD=changeme1234
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_DUMP_SKIP_SSL=true
DB_DUMP_SINGLE_TRANSACTION=false
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
@@ -120,7 +121,7 @@ ENABLE_HSTS=false
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_PREFIX=snipeit
# --------------------------------------------
@@ -144,6 +145,8 @@ PUBLIC_AWS_ACCESS_KEY_ID=null
PUBLIC_AWS_DEFAULT_REGION=null
PUBLIC_AWS_BUCKET=null
PUBLIC_AWS_URL=null
PUBLIC_AWS_ENDPOINT=null
PUBLIC_AWS_PATH_STYLE=null
PUBLIC_AWS_BUCKET_ROOT=null
# --------------------------------------------
@@ -154,6 +157,8 @@ PRIVATE_AWS_SECRET_ACCESS_KEY=null
PRIVATE_AWS_DEFAULT_REGION=null
PRIVATE_AWS_BUCKET=null
PRIVATE_AWS_URL=null
PRIVATE_AWS_ENDPOINT=null
PRIVATE_AWS_PATH_STYLE=null
PRIVATE_AWS_BUCKET_ROOT=null
# --------------------------------------------
+1 -1
View File
@@ -72,7 +72,7 @@ CORS_ALLOWED_ORIGINS="*"
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
# --------------------------------------------
# OPTIONAL: LOGIN THROTTLING
+40 -3
View File
@@ -32,6 +32,7 @@ DB_PASSWORD=null
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'
DB_DUMP_SKIP_SSL=false
DB_DUMP_SINGLE_TRANSACTION=false
DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci
DB_SANITIZE_BY_DEFAULT=false
@@ -40,12 +41,26 @@ DB_SANITIZE_BY_DEFAULT=false
# --------------------------------------------
# OPTIONAL: SSL DATABASE SETTINGS
# --------------------------------------------
# Enable SSL connection to database (true/false)
DB_SSL=false
# Set to true for cloud databases like AWS RDS, Azure Database, Google Cloud SQL
# Set to false for self-hosted databases with client certificates
DB_SSL_IS_PAAS=false
# Required when DB_SSL_IS_PAAS=false (client certificate authentication)
DB_SSL_KEY_PATH=null
DB_SSL_CERT_PATH=null
# Path to CA certificate bundle (required for SSL connections)
# For AWS RDS, download from: https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
DB_SSL_CA_PATH=null
# SSL cipher (optional, leave null for default)
DB_SSL_CIPHER=null
# Verify server certificate (true/false, defaults to false if not set)
# Set to false for development or when using self-signed certificates
DB_SSL_VERIFY_SERVER=null
# --------------------------------------------
@@ -76,7 +91,16 @@ IMAGE_LIB=gd
# --------------------------------------------
# OPTIONAL: BACKUP SETTINGS
# --------------------------------------------
# Backup filesystem configuration
# - BACKUP_FILESYSTEM_DRIVER: Driver to use (local, s3, etc.)
# Default: local (backward compatible)
# Set to s3 to use S3 for backups (requires PRIVATE_AWS_* credentials)
# - BACKUP_FILESYSTEM_ROOT: Root path/prefix
# For local driver: leave commented for default to storage_path("app")
# For S3 driver: empty string = bucket root, or specify prefix like "backups/"
#--------------------------------------------
BACKUP_FILESYSTEM_DRIVER=local
#BACKUP_FILESYSTEM_ROOT=
MAIL_BACKUP_NOTIFICATION_DRIVER=null
MAIL_BACKUP_NOTIFICATION_ADDRESS=null
BACKUP_ENV=true
@@ -110,7 +134,7 @@ BS_TABLE_DEEPLINK=true
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
ALLOW_IFRAMING=false
REFERRER_POLICY=same-origin
ENABLE_CSP=false
ENABLE_CSP=true
ADDITIONAL_CSP_URLS=null
CORS_ALLOWED_ORIGINS=null
ENABLE_HSTS=false
@@ -119,7 +143,7 @@ ENABLE_HSTS=false
# OPTIONAL: CACHE SETTINGS
# --------------------------------------------
CACHE_DRIVER=file
QUEUE_DRIVER=sync
QUEUE_CONNECTION=sync
CACHE_PREFIX=snipeit
# --------------------------------------------
@@ -135,6 +159,14 @@ REDIS_PORT=null
MEMCACHED_HOST=null
MEMCACHED_PORT=null
# --------------------------------------------
# OPTIONAL: S3 PROXY
# When enabled, public uploads (images, logos, avatars) are served through
# the application instead of directly from S3. This allows using a single
# fully private S3 bucket for all storage.
# --------------------------------------------
PUBLIC_S3_PROXY=false
# --------------------------------------------
# OPTIONAL: PUBLIC S3 Settings
# --------------------------------------------
@@ -143,6 +175,8 @@ PUBLIC_AWS_ACCESS_KEY_ID=null
PUBLIC_AWS_DEFAULT_REGION=null
PUBLIC_AWS_BUCKET=null
PUBLIC_AWS_URL=null
PUBLIC_AWS_ENDPOINT=null
PUBLIC_AWS_PATH_STYLE=null
PUBLIC_AWS_BUCKET_ROOT=null
# --------------------------------------------
@@ -153,6 +187,8 @@ PRIVATE_AWS_SECRET_ACCESS_KEY=null
PRIVATE_AWS_DEFAULT_REGION=null
PRIVATE_AWS_BUCKET=null
PRIVATE_AWS_URL=null
PRIVATE_AWS_ENDPOINT=null
PRIVATE_AWS_PATH_STYLE=null
PRIVATE_AWS_BUCKET_ROOT=null
# --------------------------------------------
@@ -175,6 +211,7 @@ LOGIN_AUTOCOMPLETE=false
RESET_PASSWORD_LINK_EXPIRES=15
PASSWORD_CONFIRM_TIMEOUT=10800
PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
TWO_FACTOR_MAX_ATTEMPTS_PER_MIN=5
INVITE_PASSWORD_LINK_EXPIRES=1500
# --------------------------------------------
+66
View File
@@ -0,0 +1,66 @@
# Pint: Models
9623fa4d87e7fb38307028338c6991afb7d4e099
# Pint: Actions
a3c7410c35388af08997b1c52adebda1056488a6
# Pint: Console
8bce38b9187d23089a28a4f3a4ab960ac7471e90
# Pint: Enums and Events
f7b82ad1ff513a25d775c20b58e9a8ce23461ec2
# Pint: Exceptions
2e7046a810ce1f7562dec9d3ee4fee0cbc7262db
# Pint: Non-api controllers
9bc92f57c8a29ac0e89c2d3f72f23c6c64567dd8
# Pint: Api controllers
1e5d426e70dcd72fd7e87c2b11ff42fe3cc7a1a4
# Pint: Middleware
ec6caf9b5959c6c57bd7be047e91bbb70fc303a7
# Pint: Requests
93168326da54fa87880570c82df3ccbf3ff152e1
# Pint: Traits and Transformers
a613380811f63f51e2951d2f4b8454d5274d5cdf
# Pint: Importer
3e831bf9b3cc060f11c88ec69a9313131de8ee1f
# Pint: Jobs and Listeners
317b1a462e079bf96d492dd3782de38b7144be9f
# Pint: Livewire
53f2ef2ca11b0571de758b101f08f259de7830cf
# Pint: Mail
de607e7d83704b30f809238c44d3d759196a77db
# Pint: Notifications
31043d1f5cb5d287c0ab2ca2ba1ae08665bc6ad5
# Pint: Observers and policies
b2c0a21230977443536655e43e524773e2ad9e27
# Pint: Presenters
55d46cbefec5fe0bb7e28b859d540977d2cfee46
# Pint: Providers
8b658a19b9182bf9a19e34bc9101ee11a13ed85b
# Pint: Config
c1a93e3ac890ed1fc1c27ba6c431f6b58ff661d6
# Pint: Lang and resources
84fdb5d6c19bf7882cb91d42fe8768fc0db0ce67
# Pint: Database
b5a46a370f85c6e87c8a9fa4a4593424bb027712
# Pint: Tests
d84eb43278177a9bcdfffe04c94d933eb49f2c48
446f5f3cefdc1837a65fd4bc983741b29f821a78
+4 -3
View File
@@ -1,10 +1,11 @@
frontend: ["*.js", "*.css", "*.vue", "*.scss", "*.less", "*.blade.*", "resources/views/livewire/*"]
frontend: ["*.js", "*.css", "*.scss", "*.less", "*.blade.*", "resources/views/livewire/*","resources/views/layouts/default.blade.php"]
skins: ["*.js", "*.css", "*.scss", "*.less"]
css: ["*.css","*.scss", "*.less"]
javascript: ["*.js", "package.json", "package.lock"]
backend: ["/app/*", "composer.json", "composer.lock"]
translations: ["/resources/lang"]
translations: ["/resources/lang/*"]
livewire: ["/app/Http/Livewire/*", "resources/views/livewire/*"]
blade-components: ["resources/views/blade/*"]
backups: ["*backup*"]
restore: ["*restore*"]
saml: ["*saml*"]
@@ -16,7 +17,7 @@ api: ["/app/Http/Controllers/Api/*"]
notifications: ["/app/Notifications/*"]
importer: ["/app/Importer/*","/app/Http/Livewire/Importer.php", "resources/views/livewire/importer.php"]
cli / artisan: ["/app/Console/*"]
LDAP: ["*Ldap*", "/app/Console/Commands/Ldap*","/app/Models/Ldap.php"]
LDAP: ["*Ldap*", "/app/Console/Commands/Ldap*","/app/Models/Ldap.php", "/resources/views/users/ldap.blade.php","/resources/views/settings/ldap.blade.php"]
docker: ["*docker/*", "Dockerfile", "Dockerfile.alpine", "Dockerfile.fpm-alpine", ".dockerignore", ".env.docker"]
tests: ["/tests/*", "/database/factories/*", "/stubs"]
config: .github
+117
View File
@@ -0,0 +1,117 @@
# GitHub Copilot Custom Instructions for Snipe-IT
These instructions guide Copilot to generate code that aligns with modern Laravel 11 standards, PHP 8.2/8.4 features, software engineering principles, and industry best practices to improve software quality, maintainability, and security.
## ✅ General Coding Standards
- Prefer short, expressive, and readable code.
- Use **meaningful, descriptive variable, function, class, and file names**.
- Apply proper PHPDoc blocks for classes, methods, and complex logic.
- Organize code into small, reusable functions or classes with single responsibility.
- Avoid magic numbers or hard-coded strings; use constants or config files.
## ✅ PHP 8.2/8.4 Best Practices
- Use **readonly properties** to enforce immutability where applicable.
- Use **Enums** instead of string or integer constants.
- Utilize **First-class callable syntax** for callbacks.
- Leverage **Constructor Property Promotion**.
- Use **Union Types**, **Intersection Types**, and **true/false return types** for strict typing.
- Apply **Static Return Type** where needed.
- Use the **Nullsafe Operator (?->)** for optional chaining.
- Adopt **final classes** where extension is not intended.
- Use **Named Arguments** for improved clarity when calling functions with multiple parameters.
## ✅ Laravel 11 Project Structure & Conventions
- Follow the official Laravel project structure:
- `app/Http/Controllers` - Controllers
- `app/Models` - Eloquent models
- `app/Http/Requests` - Form request validation
- `app/Http/Resources` - API resource responses
- `app/Enums` - Enums
- `app/Actions` - Single-responsibility action classes
- `app/Policies` - Authorization logic
- Controllers must:
- Use dependency injection.
- Use Form Requests for validation. The request class should utilize the rules set on the model.
- Return typed responses (e.g., `JsonResponse`).
- Use Transformers for API responses.
## ✅ Eloquent ORM & Database
- Use **Eloquent Models** with proper `$fillable` or `$guarded` attributes for mass assignment protection.
- Utilize **casts** for date, boolean, JSON, and custom data types.
- Apply **accessors & mutators** for attribute transformation.
- Avoid direct raw SQL unless absolutely necessary; prefer Eloquent or Query Builder.
- Migrations:
- Always use migrations for schema changes.
- Include proper constraints (foreign keys, unique indexes, etc.).
- Prefer UUIDs or ULIDs as primary keys where applicable.
## ✅ API Development
- Use **Transformer classes** for consistent and structured JSON responses.
- Apply **route model binding** where possible.
- Use Form Requests for input validation.
## ✅ Blade & Frontend (if applicable)
- Keep Blade templates clean and logic-free; use View Composers or dedicated View Models for complex data.
- Use `@props`, `@aware`, `@once` Blade features appropriately.
- Utilize Alpine.js or Livewire for interactive frontend logic (optional).
## ✅ Security Best Practices
- Never trust user input; always validate and sanitize inputs.
- Use prepared statements via Eloquent or Query Builder to prevent SQL injection.
- Use Laravel's built-in CSRF, XSS, and validation mechanisms.
- Store sensitive information in `.env`, never hard-code secrets.
- Apply proper authorization checks using Policies or Gates.
- Follow principle of least privilege for users, roles, and permissions.
## ✅ Testing Standards
- Use **factories** for test data setup.
- Include feature tests for user-facing functionality.
- Include unit tests for business logic, services, and helper classes.
- Mock external services using Laravel's `Http::fake()` or equivalent.
- Maintain high code coverage but focus on meaningful tests over 100% coverage obsession.
## ✅ Software Quality & Maintainability
- Follow **SOLID Principles**:
- Single Responsibility Principle (SRP)
- Open/Closed Principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
- Follow **DRY** (Don't Repeat Yourself) and **KISS** (Keep It Simple, Stupid) principles.
- Apply **YAGNI** (You Aren't Gonna Need It) to avoid overengineering.
- Document complex logic with PHPDoc and inline comments.
## ✅ Performance & Optimization
- Eager load relationships to avoid N+1 queries.
- Use caching with Laravel's Cache system for frequently accessed data.
- Paginate large datasets using `paginate()` instead of `get()`.
- Queue long-running tasks using Laravel Queues.
- Optimize database indexes for common queries.
## ✅ Modern Laravel Features to Use
- Use **Event Broadcasting** if real-time updates are needed.
- Use **Full-text search** if search functionality is required.
- Use **Rate Limiting** for API routes.
## ✅ Additional Copilot Behavior Preferences
- Generate **strictly typed**, modern PHP code using latest language features.
- Prioritize **readable, clean, maintainable** code over cleverness.
- Avoid legacy or deprecated Laravel patterns (facade overuse, logic-heavy views, etc.).
- Suggest proper class placement based on Laravel directory structure.
- Suggest tests alongside new features where applicable.
- Default to **immutability**, **dependency injection**, and **encapsulation** best practices.
No newline at end of file
-57
View File
@@ -1,57 +0,0 @@
# This workflow checks out code, performs a Codacy security scan
# and integrates the results with the
# GitHub Advanced Security code scanning feature. For more information on
# the Codacy security scan action usage and parameters, see
# https://github.com/codacy/codacy-analysis-cli-action.
# For more information on Codacy Analysis CLI in general, see
# https://github.com/codacy/codacy-analysis-cli.
name: Codacy Security Scan
on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '36 23 * * 3'
permissions:
contents: read
jobs:
codacy-security-scan:
# 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 == 'grokability/snipe-it') || ((github.repository != 'grokability/snipe-it') && (github.event_name != 'schedule'))
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v6
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@v4.4.7
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
max-allowed-issues: 2147483647
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
+4 -4
View File
@@ -46,13 +46,13 @@ jobs:
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -64,7 +64,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -73,7 +73,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile.alpine
+4 -4
View File
@@ -46,13 +46,13 @@ jobs:
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -64,7 +64,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -73,7 +73,7 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
+69
View File
@@ -0,0 +1,69 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# EthicalCheck addresses the critical need to continuously security test APIs in development and in production.
# EthicalCheck provides the industrys only free & automated API security testing service that uncovers security vulnerabilities using OWASP API list.
# Developers relies on EthicalCheck to evaluate every update and release, ensuring that no APIs go to production with exploitable vulnerabilities.
# You develop the application and API, we bring complete and continuous security testing to you, accelerating development.
# Know your API and Applications are secure with EthicalCheck our free & automated API security testing service.
# How EthicalCheck works?
# EthicalCheck functions in the following simple steps.
# 1. Security Testing.
# Provide your OpenAPI specification or start with a public Postman collection URL.
# EthicalCheck instantly instrospects your API and creates a map of API endpoints for security testing.
# It then automatically creates hundreds of security tests that are non-intrusive to comprehensively and completely test for authentication, authorizations, and OWASP bugs your API. The tests addresses the OWASP API Security categories including OAuth 2.0, JWT, Rate Limit etc.
# 2. Reporting.
# EthicalCheck generates security test report that includes all the tested endpoints, coverage graph, exceptions, and vulnerabilities.
# Vulnerabilities are fully triaged, it contains CVSS score, severity, endpoint information, and OWASP tagging.
# This is a starter workflow to help you get started with EthicalCheck Actions
name: EthicalCheck-Workflow
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
# Customize trigger events based on your DevSecOps processes.
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '35 17 * * 6'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
Trigger_EthicalCheck:
permissions:
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- name: EthicalCheck Free & Automated API Security Testing Service
uses: apisec-inc/ethicalcheck-action@005fac321dd843682b1af6b72f30caaf9952c641
with:
# The OpenAPI Specification URL or Swagger Path or Public Postman collection URL.
oas-url: "http://netbanking.apisec.ai:8080/v2/api-docs"
# The email address to which the penetration test report will be sent.
email: "snipe@snipe.net"
sarif-result-file: "ethicalcheck-results.sarif"
- name: Upload sarif file to repository
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: ./ethicalcheck-results.sarif
+3 -2
View File
@@ -28,6 +28,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
name: PHP ${{ matrix.php-version }}
@@ -43,7 +44,7 @@ jobs:
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -82,7 +83,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
+3 -2
View File
@@ -24,6 +24,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
name: PHP ${{ matrix.php-version }}
@@ -40,7 +41,7 @@ jobs:
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -81,7 +82,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
+3 -3
View File
@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.3"
- "8.5"
name: PHP ${{ matrix.php-version }}
@@ -31,7 +31,7 @@ jobs:
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- uses: actions/cache@v5
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -67,7 +67,7 @@ jobs:
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
+8 -8
View File
@@ -1,10 +1,10 @@
{
"DOC1": "This file is meant to be pulled from the current HEAD of the desired branch, NOT referenced locally",
"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.2.0",
"php_max_major_minor": "8.4",
"php_max_wontwork": "8.5.0",
"current_snipeit_version": "8.0"
"DOC1": "This file is meant to be pulled from the current HEAD of the desired branch, NOT referenced locally",
"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.2.0",
"php_max_major_minor": "8.5",
"php_max_wontwork": "8.6.0",
"current_snipeit_version": "8.0"
}
+110
View File
@@ -0,0 +1,110 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Stack
- **PHP 8.2+** / **Laravel 12** (framework), **Laravel Mix** (webpack) for frontend assets
- **AdminLTE 2** / **Bootstrap 3** UI — Blade views, no Livewire/Inertia
- **Chart.js v2.9.4** — bundled at `public/js/dist/Chart.min.js`; use `horizontalBar` type (v2 API, not v3)
## Common Commands
```bash
# Run all tests
php artisan test
# or
vendor/bin/phpunit
# Run a single test file
php artisan test tests/Feature/Assets/AssetsTest.php
# Run a specific test method
php artisan test --filter testSomeMethod
# Build frontend assets (dev)
npm run dev
# Build for production
npm run prod
# Laravel Mix watch
npm run watch
# Tinker / REPL
php artisan tinker
# Clear caches after config/route changes
php artisan optimize:clear
```
Dev server is served via **Laravel Herd** (`herd coverage` for coverage reports).
## Architecture
### Controllers
Two parallel controller trees:
- `app/Http/Controllers/` — web/UI controllers (Blade views)
- `app/Http/Controllers/Api/` — REST API controllers (JSON, used by datatables + select2)
Subdirectory groupings: `Assets/`, `Licenses/`, `Users/`, `Accessories/`, `Consumables/`, `Components/`, `Kits/`, `Account/`, `Auth/`
### API Pattern
Every API controller returns data via a **Transformer** (`app/Http/Transformers/`). Never return raw model attributes from API controllers — always pass through the transformer. `DatatablesTransformer` wraps paginated results.
```php
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
```
### Authorization
All authorization goes through **Policies** (`app/Policies/`). `CheckoutablePermissionsPolicy` is the base for assets/licenses/accessories/consumables — its `checkout()` / `checkin()` methods accept `$item = null` so you can use `@can('checkout', \App\Models\Asset::class)` without an instance.
### FMCS (Full Multiple Company Support)
`Setting::getSettings()->full_multiple_companies_support == '1'` gates company-scoped filtering. The select2 API endpoints (`selectlist()` methods) accept a `companyId` query param — apply it like this:
```php
if ((Setting::getSettings()->full_multiple_companies_support == '1') && ($request->filled('companyId'))) {
$query->where('table.company_id', $request->input('companyId'));
}
```
Pass `data-company-id="{{ $user->company_id }}"` in Blade to wire it to select2.
### Select2 AJAX Dropdowns
Use `class="js-data-ajax"` with `data-endpoint="hardware|licenses|consumables|..."`. `snipeit.js` auto-initializes these, forwarding `data-company-id` as `companyId` and `data-asset-status-type` as `statusType` to the API.
### Routes
All routes are in `routes/web.php` (UI) and `routes/api.php` (API). Breadcrumbs are defined inline using `->breadcrumbs(fn (Trail $trail) => ...)` from `tabuna/breadcrumbs`. Every UI route should have a breadcrumb.
Note: the `reports/unaccepted_assets` route is named with slashes, not dots — use `route('reports/unaccepted_assets')`.
### Translations
String keys live in `resources/lang/en-US/general.php` (and other files in that directory). Always add new UI strings as translation keys rather than hard-coding English.
### Checkout Redirect Flow
After checkout, `Helper::getRedirectOption()` reads `$request->redirect_option`. For redirecting back to the assigned user after checkout:
- Set `redirect_option=target` in the form
- Set `checkout_to_type=user` in the form
- Set `assigned_user={{ $user->id }}` in the form
### Key Helper Methods (`app/Helpers/Helper.php`)
- `Helper::deployableStatusLabelList()` — status labels for checkout forms
- `Helper::defaultChartColors()` — 10-color palette used in charts
- `Helper::getRedirectOption($request, $id, $table)` — post-checkout redirect logic
### Global View Variables
`$snipeSettings` is injected into all views via a service provider — no need to pass `Setting::getSettings()` from every controller. Use it directly in Blade.
## Testing
Tests live in `tests/Feature/` (organized by entity) and `tests/Unit/`. Feature tests hit the database; the test environment uses `array` cache/session/mail drivers. Tests use factories for data setup.
+1 -1
View File
@@ -69,7 +69,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<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") | [<img src="https://avatars.githubusercontent.com/u/76069640?v=4" width="110px;"/><br /><sub>Okean</sub>](https://github.com/Tinyblargon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Tinyblargon "Code") | [<img src="https://avatars.githubusercontent.com/u/6515064?v=4" width="110px;"/><br /><sub>Alejandro Medrano</sub>](https://www.lst.tfo.upm.es/alejandro-medrano/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=amedranogil "Code") | [<img src="https://avatars.githubusercontent.com/u/58696401?v=4" width="110px;"/><br /><sub>Lukas Kraic</sub>](https://github.com/lukaskraic)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukaskraic "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1571724?v=4" width="110px;"/><br /><sub>Герхард PICCORO Lenz McKAY </sub>](https://github-readme-stats.vercel.app/api?username=mckaygerhard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mckaygerhard "Code") | [<img src="https://avatars.githubusercontent.com/u/15015119?v=4" width="110px;"/><br /><sub>Johannes Pollitt</sub>](https://github.com/FlorestanII)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorestanII "Code") | [<img src="https://avatars.githubusercontent.com/u/14185442?v=4" width="110px;"/><br /><sub>Michael Strobel</sub>](https://strobelm.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=strobelm "Code") | [<img src="https://avatars.githubusercontent.com/u/634790?v=4" width="110px;"/><br /><sub>Nicky West</sub>](http://nickwest.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nickwest "Code") | [<img src="https://avatars.githubusercontent.com/u/1347327?v=4" width="110px;"/><br /><sub>akaspeh1</sub>](https://github.com/akaspeh1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akaspeh1 "Code") | [<img src="https://avatars.githubusercontent.com/u/2880129?v=4" width="110px;"/><br /><sub>Sebastian Marsching</sub>](http://sebastian.marsching.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=smarsching "Code") | [<img src="https://avatars.githubusercontent.com/u/40658372?v=4" width="110px;"/><br /><sub>Mo</sub>](https://github.com/mohammad-ahmadi1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mohammad-ahmadi1 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/20994684?v=4" width="110px;"/><br /><sub>Owen V. Hayes</sub>](https://github.com/MarvelousAnything)<br />[💻](https://github.com/snipe/snipe-it/commits?author=MarvelousAnything "Code") |
| [<img src="https://avatars.githubusercontent.com/u/20994684?v=4" width="110px;"/><br /><sub>Owen V. Hayes</sub>](https://github.com/MarvelousAnything)<br />[💻](https://github.com/snipe/snipe-it/commits?author=MarvelousAnything "Code") | [<img src="https://avatars.githubusercontent.com/u/75509373?v=4" width="110px;"/><br /><sub>Peter Gallwas</sub>](https://www.husky.nz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Husky-Devel "Code") | [<img src="https://avatars.githubusercontent.com/u/326348?v=4" width="110px;"/><br /><sub>Sebastian Mendel</sub>](https://github.com/CybotTM)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CybotTM "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
+30 -30
View File
@@ -1,35 +1,35 @@
FROM alpine:3.19
FROM alpine:3.23
# Apache + PHP
RUN apk add --no-cache \
apache2 \
php82 \
php82-common \
php82-apache2 \
php82-curl \
php82-ldap \
php82-mysqli \
php82-gd \
php82-xml \
php82-mbstring \
php82-zip \
php82-ctype \
php82-tokenizer \
php82-pdo_mysql \
php82-openssl \
php82-bcmath \
php82-phar \
php82-json \
php82-iconv \
php82-fileinfo \
php82-simplexml \
php82-session \
php82-dom \
php82-xmlwriter \
php82-xmlreader \
php82-sodium \
php82-redis \
php82-pecl-memcached \
php82-exif \
php84 \
php84-common \
php84-apache2 \
php84-curl \
php84-ldap \
php84-mysqli \
php84-gd \
php84-xml \
php84-mbstring \
php84-zip \
php84-ctype \
php84-tokenizer \
php84-pdo_mysql \
php84-openssl \
php84-bcmath \
php84-phar \
php84-json \
php84-iconv \
php84-fileinfo \
php84-simplexml \
php84-session \
php84-dom \
php84-xmlwriter \
php84-xmlreader \
php84-sodium \
php84-redis \
php84-pecl-memcached \
php84-exif \
curl \
wget \
vim \
@@ -42,7 +42,7 @@ COPY docker/column-statistics.cnf /etc/mysql/conf.d/column-statistics.cnf
# Where apache's PID lives
RUN mkdir -p /run/apache2 && chown apache:apache /run/apache2
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php82/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php84/php.ini
COPY docker/000-default-2.4.conf /etc/apache2/conf.d/default.conf
# Enable mod_rewrite
+1
View File
@@ -56,6 +56,7 @@ COPY --from=mlocati/php-extension-installer:2.1.15 /usr/bin/install-php-extensio
RUN set -eux; \
install-php-extensions \
bcmath \
exif \
gd \
ldap \
mysqli \
+7 -3
View File
@@ -1,13 +1,13 @@
![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/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)
[![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/) [![Tests in MySQL](https://github.com/grokability/snipe-it/actions/workflows/tests-mysql.yml/badge.svg)](https://github.com/grokability/snipe-it/actions/workflows/tests-mysql.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 11](http://laravel.com).
It is built on [Laravel 12](http://laravel.com).
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/).)
@@ -78,11 +78,14 @@ Since the release of the JSON REST API, several third-party developers have been
#### Libraries & Modules
- [SnipeScheduler](https://github.com/JSY-Ben/SnipeScheduler) by [@JSY-Ben](https://github.com/JSY-Ben) - An Asset Reservation/Checkout System for Snipe-IT
- [Snipe-IT MCP Server](https://github.com/jameshgordy/snipeit-mcp) by [@jameshgordy](https://github.com/jameshgordy) - A Model Context Protocol (MCP) server for managing Snipe-IT inventory systems
- [SnipeSharp - .NET module in C#](https://github.com/barrycarey/SnipeSharp) by [@barrycarey](https://github.com/barrycarey)
- [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
- [Snipe-IT plugin for Jira Service Desk](https://marketplace.atlassian.com/apps/1220964/snipe-it-for-jira)
- [Rudder2Snipe](https://github.com/norbertoaquino/rudder2snipe) by [@norbertoaquino](https://github.com/norbertoaquino) - Rudder.io integration for Snipe-IT
- [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.
@@ -95,6 +98,7 @@ Since the release of the JSON REST API, several third-party developers have been
- [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)
[IT-Tools](https://github.com/chrisnox/Snipeit-it-tools) by @chrisnox - Browser bookmarklets for PDF handover/return protocols, digital signatures, label printing (Zebra ZD410), AirWatch MDM sync and Lansweeper CSV import.
We also have a handful of [Google Apps scripts](https://github.com/grokability/google-apps-scripts-for-snipe-it) to help with various tasks.
@@ -121,7 +125,7 @@ We're currently working on our own mobile app, but in the meantime, check out th
### Contributing
**Please refrain from submitting issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.**
**Please refrain from submitting issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.** Please see our [AI Contribution Policy](https://snipe-it.readme.io/docs/contributing-overview#ai-usage-policy) for more information.
Contributions should follow from a human-to-human discussion in the form of an issue for the best chances of being merged into the core project. (Sometimes we might already be working on that feature, sometimes we've decided against )
+15 -4
View File
@@ -10,9 +10,9 @@ however there are times when library dependencies and/or PHP/MySQL dependencies
make it impossible to backport security fixes on older versions.
| Version | Supported |
|---------| ------------------ |
|---------|--------------------|
| 8.x | :white_check_mark: |
| 7.x | :white_check_mark: |
| 7.x | :x: |
| 6.x | :x: |
| 5.1.x | :x: |
| 5.0.x | :x: |
@@ -24,7 +24,18 @@ make it impossible to backport security fixes on older versions.
Security vulnerabilities should be sent to security@snipeitapp.com. You can typically expect a
response within two business days, and we typically have fixes out in under a week from the initial disclosure.
This obviously varies based on the severity of the security issue and the difficulty in remediation,
but those have historically been the timelines we worm around.
This obviously varies based on the severity of the security issue and the difficulty in remediation, but those have
historically been the timelines we work around.
We do ask that you do not disclose the vulnerability publicly until we have had a chance to address it and tag a release
so that we can protect our users, and we will work
with you to coordinate a public disclosure once we have a fix out. We will also work with you to ensure that you receive
appropriate credit for the discovery of the vulnerability, if you would like to be credited. (Please provide a GitHub
username or other information if you would like to be credited, and please let us know if you would like to remain
anonymous.)
For responsible disclosure, we ask that you give us at least __90 days__ to address the issue before disclosing it
publicly,
but we will work with you if you need to disclose it sooner than that.
For a full breakdown of our security policies, please see https://snipeitapp.com/security.
@@ -0,0 +1,109 @@
<?php
namespace App\Actions\Breadcrumbs;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Consumable;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Tabuna\Breadcrumbs\Trail;
final class BuildAcceptanceBreadcrumbs
{
public static function forAcceptance(Trail $trail, CheckoutAcceptance|int|string $acceptance): void
{
$acceptance = self::resolveAcceptance($acceptance);
$trail->parent('home');
if (! $acceptance instanceof CheckoutAcceptance) {
self::appendProfileContext($trail);
return;
}
if (! self::isSignInPlaceFlow($acceptance)) {
self::appendProfileContext($trail);
$trail->push(trans('general.accept_item'), route('account.accept.item', $acceptance));
return;
}
self::appendCheckoutFlowContext($trail, $acceptance);
$trail->push(self::buildSignInPlaceLabel($acceptance));
}
private static function resolveAcceptance(CheckoutAcceptance|int|string $acceptance): ?CheckoutAcceptance
{
if ($acceptance instanceof CheckoutAcceptance) {
return $acceptance;
}
if (is_numeric($acceptance)) {
return CheckoutAcceptance::find((int) $acceptance);
}
return null;
}
private static function isSignInPlaceFlow(CheckoutAcceptance $acceptance): bool
{
return (int) session('sign_in_place_acceptance_id') === (int) $acceptance->id;
}
private static function appendProfileContext(Trail $trail): void
{
$trail->push(trans('general.profile'), route('account'));
$trail->push(trans('general.accept_items'), route('account.accept'));
}
private static function appendCheckoutFlowContext(Trail $trail, CheckoutAcceptance $acceptance): void
{
$checkoutable = $acceptance->checkoutable;
if ($checkoutable instanceof Asset) {
$trail->push(trans('general.assets'), route('hardware.index'));
$trail->push($checkoutable->display_name ?? trans('general.asset'), route('hardware.show', $checkoutable));
$trail->push(trans('general.checkout'));
return;
}
if ($checkoutable instanceof LicenseSeat) {
$license = $checkoutable->license;
if ($license instanceof License) {
$trail->push(trans('general.licenses'), route('licenses.index'));
$trail->push($license->display_name ?? trans('general.license'), route('licenses.show', $license));
$trail->push(trans('general.checkout'));
}
return;
}
if ($checkoutable instanceof Consumable) {
$trail->push(trans('general.consumables'), route('consumables.index'));
$trail->push($checkoutable->display_name ?? trans('general.consumable'), route('consumables.show', $checkoutable));
$trail->push(trans('general.checkout'));
return;
}
if ($checkoutable instanceof Accessory) {
$trail->push(trans('general.accessories'), route('accessories.index'));
$trail->push($checkoutable->display_name ?? trans('general.accessory'), route('accessories.show', $checkoutable));
$trail->push(trans('general.checkout'));
}
}
private static function buildSignInPlaceLabel(CheckoutAcceptance $acceptance): string
{
if ($acceptance->assignedTo instanceof User) {
return sprintf('%s for %s', trans('general.sign_in_place'), $acceptance->assignedTo->display_name);
}
return trans('general.sign_in_place');
}
}
@@ -21,7 +21,7 @@ class DestroyCategoryAction
* @throws ItemStillHasLicenses
* @throws ItemStillHasConsumables
*/
static function run(Category $category): bool
public static function run(Category $category): bool
{
$category->loadCount([
'assets as assets_count',
@@ -29,7 +29,7 @@ class DestroyCategoryAction
'consumables as consumables_count',
'components as components_count',
'licenses as licenses_count',
'models as models_count'
'models as models_count',
]);
if ($category->assets_count > 0) {
@@ -56,4 +56,4 @@ class DestroyCategoryAction
return true;
}
}
}
@@ -14,8 +14,8 @@ class CancelCheckoutRequestAction
{
public static function run(Asset $asset, User $user)
{
if (!Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException();
if (! Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException;
}
$asset->cancelRequest();
@@ -27,7 +27,7 @@ class CancelCheckoutRequestAction
$data['item_quantity'] = 1;
$settings = Setting::getSettings();
$logaction = new Actionlog();
$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');
@@ -44,5 +44,4 @@ class CancelCheckoutRequestAction
return true;
}
}
}
@@ -23,8 +23,8 @@ class CreateCheckoutRequestAction
if (is_null(Asset::RequestableAssets()->find($asset->id))) {
throw new AssetNotRequestable($asset);
}
if (!Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException();
if (! Company::isCurrentUserHasAccess($asset)) {
throw new AuthorizationException;
}
$data['item'] = $asset;
@@ -32,7 +32,7 @@ class CreateCheckoutRequestAction
$data['item_quantity'] = 1;
$settings = Setting::getSettings();
$logaction = new Actionlog();
$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');
@@ -44,11 +44,11 @@ class CreateCheckoutRequestAction
$asset->request();
$asset->increment('requests_counter', 1);
try {
$settings->notify(new RequestAssetNotification($data));
$settings->notify((new RequestAssetNotification($data))->locale($settings->locale));
} catch (\Exception $e) {
Log::warning($e);
}
return true;
}
}
}
@@ -20,7 +20,7 @@ class DeleteManufacturerAction
* @throws ItemStillHasLicenses
* @throws ItemStillHasConsumables
*/
static function run(Manufacturer $manufacturer): bool
public static function run(Manufacturer $manufacturer): bool
{
$manufacturer->loadCount([
'assets as assets_count',
@@ -55,9 +55,8 @@ class DeleteManufacturerAction
}
$manufacturer->delete();
//dd($manufacturer);
// dd($manufacturer);
return true;
}
}
}
@@ -0,0 +1,30 @@
<?php
namespace App\Actions\Permissions;
final class NormalizePermissionsPayloadAction
{
/**
* Normalize permissions payloads from request/model to a consistent associative array.
*
* @return array<string, mixed>
*/
public static function run(mixed $permissions): array
{
if (is_string($permissions)) {
$decoded = json_decode($permissions, true);
return is_array($decoded) ? $decoded : [];
}
if (is_array($permissions)) {
return $permissions;
}
if ($permissions instanceof \stdClass) {
return (array) $permissions;
}
return [];
}
}
@@ -0,0 +1,41 @@
<?php
namespace App\Actions\Permissions;
use App\Models\User;
final class PreserveUnauthorizedPrivilegedPermissionsAction
{
/**
* Preserve privileged permission keys unless the authenticated user may manage them.
*
* @param array<string, mixed> $requestedPermissions
* @param array<string, mixed> $originalPermissions
* @return array<string, mixed>
*/
public static function run(array $requestedPermissions, User $authenticatedUser, array $originalPermissions = [], ?User $targetUser = null): array
{
// Disallow non-admin/superuser users from modifying their own permissions, but allow them to modify other users' permissions (except for admin/superuser keys).
if ($targetUser && ! $authenticatedUser->isSuperUser() && $authenticatedUser->id === $targetUser->id) {
return $originalPermissions;
}
if (! $authenticatedUser->isSuperUser()) {
if (array_key_exists('superuser', $originalPermissions)) {
$requestedPermissions['superuser'] = $originalPermissions['superuser'];
} else {
unset($requestedPermissions['superuser']);
}
}
if ((! $authenticatedUser->isAdmin()) && (! $authenticatedUser->isSuperUser())) {
if (array_key_exists('admin', $originalPermissions)) {
$requestedPermissions['admin'] = $originalPermissions['admin'];
} else {
unset($requestedPermissions['admin']);
}
}
return $requestedPermissions;
}
}
@@ -3,19 +3,18 @@
namespace App\Actions\Suppliers;
use App\Exceptions\ItemStillHasAccessories;
use App\Exceptions\ItemStillHasAssets;
use App\Exceptions\ItemStillHasComponents;
use App\Exceptions\ItemStillHasConsumables;
use App\Models\Supplier;
use App\Exceptions\ItemStillHasAssets;
use App\Exceptions\ItemStillHasMaintenances;
use App\Exceptions\ItemStillHasLicenses;
use App\Exceptions\ItemStillHasMaintenances;
use App\Models\Supplier;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
class DestroySupplierAction
{
/**
*
* @throws ItemStillHasLicenses
* @throws ItemStillHasAssets
* @throws ItemStillHasMaintenances
@@ -23,7 +22,7 @@ class DestroySupplierAction
* @throws ItemStillHasConsumables
* @throws ItemStillHasComponents
*/
static function run(Supplier $supplier): bool
public static function run(Supplier $supplier): bool
{
$supplier->loadCount([
'maintenances as maintenances_count',
+989
View File
@@ -0,0 +1,989 @@
<?php
namespace App\Console\Commands;
use App\Events\CheckoutableCheckedIn;
use App\Mail\BulkDeleteReportMail;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\Console\Helper\ProgressBar;
use function Laravel\Prompts\confirm;
use function Laravel\Prompts\error;
use function Laravel\Prompts\info;
use function Laravel\Prompts\multisearch;
use function Laravel\Prompts\multiselect;
use function Laravel\Prompts\search;
use function Laravel\Prompts\select;
use function Laravel\Prompts\warning;
class BulkDelete extends Command
{
protected $signature = 'snipeit:checkin-delete-items';
protected $description = 'Interactively check in and/or delete items by company and type';
private const CHECKIN_NOTE = 'Checked in via bulk CLI operation';
private array $reportLines = [];
public function handle(): int
{
// Step 1: Dry run?
$dryRun = confirm(
label: 'Is this a dry run?',
default: true,
yes: 'Yes — preview only, no changes will be made',
no: 'No — LIVE RUN, changes WILL be made',
);
// Step 2: Who are you?
$adminId = search(
label: 'Who are you? Search by username, first or last name.',
placeholder: 'Type to search users...',
options: function (string $value): array {
if (strlen($value) < 1) {
return [];
}
return User::where('activated', 1)
->whereNull('deleted_at')
->onlySuperAdmins()
->where(function ($query) use ($value) {
$query->where('username', 'like', "%{$value}%")
->orWhere('first_name', 'like', "%{$value}%")
->orWhere('last_name', 'like', "%{$value}%")
->orWhereRaw("CONCAT(first_name, ' ', last_name) LIKE ?", ["%{$value}%"]);
})
->get()
->mapWithKeys(fn (User $u) => [$u->id => "{$u->first_name} {$u->last_name} ({$u->username})"])
->toArray();
},
validate: fn (mixed $value) => ! $value ? 'A valid active user is required.' : null,
);
/** @var User $admin */
$admin = User::findOrFail((int) $adminId);
// Step 3: Which companies?
if (! Company::exists()) {
error('No companies found. Please create at least one company before using this command.');
return 1;
}
$selectedCompanyKeys = multisearch(
label: 'Which companies would you like to check in and delete items for?',
placeholder: 'Type to search companies...',
options: function (string $value): array {
$results = [];
if ($value === '' || str_contains('(no company / unassigned)', strtolower($value))) {
$results['__null__'] = '(No Company / Unassigned)';
}
$query = Company::orderBy('name');
if ($value !== '') {
$query->where('name', 'like', "%{$value}%");
}
$query->get()->each(function (Company $c) use (&$results) {
$results[$c->id] = "{$c->name} (ID: {$c->id})";
});
return $results;
},
scroll: 10,
required: 'Please select at least one company.',
hint: 'If you\'re searching on several differently named companies, use the up-arrow to go back to the search box to search again. ',
);
$includeNullCompany = in_array('__null__', $selectedCompanyKeys);
$selectedCompanyIds = array_values(array_filter(
$selectedCompanyKeys,
fn ($k) => $k !== '__null__'
));
$companyNamesById = Company::whereIn('id', $selectedCompanyIds)->pluck('name', 'id')->toArray();
$selectedCompanyNames = array_map(
fn ($id) => $id === '__null__' ? '(No Company)' : ($companyNamesById[$id] ?? "(ID: {$id})"),
$selectedCompanyKeys
);
// Step 4: Which item types?
$rawTypeSelection = multiselect(
label: 'What item types would you like to check in and delete?',
options: [
'all' => 'All Items (assets, licenses, accessories, components, consumables, users)',
'assets' => 'Assets',
'licenses' => 'Licenses',
'accessories' => 'Accessories',
'components' => 'Components',
'consumables' => 'Consumables',
'users' => 'Users',
],
required: 'Please select at least one item type.',
hint: 'Select "All Items" to process every supported type.',
);
$allSubTypes = ['assets', 'licenses', 'accessories', 'components', 'consumables', 'users'];
$selectedTypes = in_array('all', $rawTypeSelection)
? $allSubTypes
: array_values(array_intersect($allSubTypes, $rawTypeSelection));
// Compute and display counts now so the user can see what will be affected
$counts = $this->getCounts($selectedTypes, $selectedCompanyIds, $includeNullCompany);
$skipAdminUser = false;
$this->line('');
$this->line(' Items that would be affected:');
foreach ($counts as $type => $count) {
$this->line(sprintf(' %-14s %d', ucfirst($type).':', $count));
}
if (in_array('users', $selectedTypes)) {
$userInScope = $this->buildUserQuery($selectedCompanyIds, $includeNullCompany)
->where('users.id', $admin->id)
->exists();
if ($userInScope) {
$skipAdminUser = true;
$counts['users'] = max(0, ($counts['users'] ?? 0) - 1);
warning(" Your user ({$admin->username}) is within the selected scope and will be skipped during user deletion.");
}
}
$this->line('');
// Step 5: Hard delete, soft delete, or no delete?
$deleteType = select(
label: 'How should items be deleted?',
options: [
'soft' => 'Soft delete — items moved to trash (recoverable)',
'hard' => 'Hard delete — permanently removed (cannot be recovered)',
'none' => 'No delete — check in only, items remain in inventory',
],
default: 'soft',
);
// Step 6: Send checkin notifications? (not applicable to users or consumables)
$notifiableTypes = array_intersect($selectedTypes, ['assets', 'licenses', 'accessories', 'components']);
$sendNotifications = false;
if (! empty($notifiableTypes)) {
$sendNotifications = confirm(
label: 'Should we send checkin notifications?',
default: true,
hint: 'Applies to: '.implode(', ', $notifiableTypes).'. Users and consumables are excluded.',
);
}
// Step 7: Clear related action_logs?
$clearLogs = confirm(
label: 'Should we clear related action logs?',
default: false,
hint: 'This removes all history for affected items, as if the data never existed.',
);
// Step 8: Delete associated files?
$deleteFiles = false;
if ($deleteType !== 'none') {
$deleteFiles = confirm(
label: 'Should we also delete associated image and upload files?',
default: $deleteType === 'hard',
hint: 'Permanently removes images, avatars, signatures, EULAs, and action log uploads from disk.',
);
}
// Step 9: Delete the companies themselves?
$deleteCompanyType = 'keep';
if (! empty($selectedCompanyIds)) {
$deleteCompanyType = select(
label: 'Should the selected companies also be deleted?',
options: [
'keep' => 'Keep — do not delete the companies',
'soft' => 'Soft delete — companies moved to trash (recoverable)',
'hard' => 'Hard delete — permanently removed (cannot be recovered)',
],
default: 'keep',
);
}
// Step 10: Backup first?
$doBackup = confirm(
label: 'Should we run a backup before proceeding?',
default: true,
hint: 'Strongly recommended. Saved as backup-before-bulk-delete-cli-[datetime].zip',
);
// Step 11: Summary + final confirmation
$this->line('');
$this->line(' ════════════════════════════════════════════════════');
$this->line(' SUMMARY OF ACTIONS');
$this->line(' ════════════════════════════════════════════════════');
$this->line(" Admin user: {$admin->first_name} {$admin->last_name} ({$admin->username})");
$this->line(' Companies: '.implode(', ', $selectedCompanyNames));
$this->line(' Item types: '.implode(', ', $selectedTypes));
$this->line(" Delete mode: {$deleteType}");
$this->line(' Notifications: '.($sendNotifications ? 'Yes' : 'No'));
$this->line(' Clear logs: '.($clearLogs ? 'Yes' : 'No'));
$this->line(' Delete files: '.($deleteFiles ? 'Yes' : 'No'));
$this->line(' Delete companies: '.($deleteCompanyType === 'keep' ? 'No' : ucfirst($deleteCompanyType).' delete'));
$this->line(' Backup first: '.($doBackup ? 'Yes' : 'No'));
$this->line(' Dry run: '.($dryRun ? 'Yes' : 'No'));
$this->line('');
$this->line(' Items to be processed:');
foreach ($counts as $type => $count) {
$this->line(sprintf(' %-14s %d', ucfirst($type).':', $count));
}
if ($skipAdminUser) {
$this->line(' * Your user account will be skipped during user deletion.');
}
$this->line(' ════════════════════════════════════════════════════');
$this->line('');
// Step 10.5: Email report?
$sendEmailReport = false;
if ($admin->email) {
$sendEmailReport = confirm(
label: "Send an email report to {$admin->email}?",
default: false,
hint: 'A summary of all '.($dryRun ? 'would-be ' : '').'actions will be emailed to you.',
);
}
if (! $dryRun) {
$confirmed = confirm(
label: 'Are you sure you want to proceed? This cannot be undone.',
default: false,
);
if (! $confirmed) {
info('Aborted. No changes were made.');
return 0;
}
}
// Run backup if requested
if ($doBackup && ! $dryRun) {
$backupFilename = 'backup-before-bulk-delete-cli-'.now()->format('Y-m-d-H-i-s');
info("Running backup ({$backupFilename}.zip)...");
$result = $this->callSilently('snipeit:backup', ['--filename' => $backupFilename]);
if ($result === 0) {
info("Backup completed: {$backupFilename}.zip");
} else {
warning("Backup may have failed (exit code {$result}). Proceeding anyway.");
}
}
// Step 11: Execute with progress bar
$totalItems = array_sum($counts);
$bar = $this->output->createProgressBar($totalItems > 0 ? $totalItems : 1);
$bar->setFormat(' %current%/%max% [%bar%] %percent:3s%% %message%');
$bar->setMessage('Starting...');
$bar->start();
foreach ($selectedTypes as $type) {
match ($type) {
'assets' => $this->processAssets($selectedCompanyIds, $includeNullCompany, $sendNotifications, $admin, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
'licenses' => $this->processLicenses($selectedCompanyIds, $includeNullCompany, $sendNotifications, $admin, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
'accessories' => $this->processAccessories($selectedCompanyIds, $includeNullCompany, $sendNotifications, $admin, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
'components' => $this->processComponents($selectedCompanyIds, $includeNullCompany, $sendNotifications, $admin, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
'consumables' => $this->processConsumables($selectedCompanyIds, $includeNullCompany, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
'users' => $this->processUsers($selectedCompanyIds, $includeNullCompany, $admin, $skipAdminUser, $dryRun, $deleteType, $clearLogs, $deleteFiles, $bar),
};
}
$bar->setMessage('Done.');
$bar->finish();
$this->line('');
$this->line('');
// Delete companies if requested
if ($deleteCompanyType !== 'keep' && ! empty($selectedCompanyIds)) {
$companies = Company::whereIn('id', $selectedCompanyIds)->get();
foreach ($companies as $company) {
if ($dryRun) {
$this->line(" [dry-run] Would {$deleteCompanyType}-delete company {$company->name}");
$this->reportLines[] = "Would {$deleteCompanyType}-delete company {$company->name}";
} else {
if ($deleteCompanyType === 'soft') {
$company->delete();
} else {
$company->forceDelete();
}
// Remove any remaining pivot associations (e.g. the admin user who was
// skipped during user processing but is still a member of this company)
DB::table('company_user')->where('company_id', $company->id)->delete();
$this->reportLines[] = ucfirst($deleteCompanyType)."-deleted company {$company->name}";
}
}
}
if ($dryRun) {
warning('Dry run complete — no changes were made.');
} else {
info('All actions completed successfully.');
}
if ($sendEmailReport && $admin->email) {
Mail::to($admin->email)->send(new BulkDeleteReportMail(
admin: $admin,
dryRun: $dryRun,
companyNames: $selectedCompanyNames,
selectedTypes: $selectedTypes,
deleteType: $deleteType,
reportLines: $this->reportLines,
runAt: now(),
));
info("Report sent to {$admin->email}.");
}
return 0;
}
private function getCounts(array $types, array $companyIds, bool $includeNull): array
{
$counts = [];
if (in_array('assets', $types)) {
$counts['assets'] = $this->buildCompanyQuery(Asset::query(), $companyIds, $includeNull)->count();
}
if (in_array('licenses', $types)) {
$counts['licenses'] = $this->buildCompanyQuery(License::query(), $companyIds, $includeNull)->count();
}
if (in_array('accessories', $types)) {
$counts['accessories'] = $this->buildCompanyQuery(Accessory::query(), $companyIds, $includeNull)->count();
}
if (in_array('components', $types)) {
$counts['components'] = $this->buildCompanyQuery(Component::query(), $companyIds, $includeNull)->count();
}
if (in_array('consumables', $types)) {
$counts['consumables'] = $this->buildCompanyQuery(Consumable::query(), $companyIds, $includeNull)->count();
}
if (in_array('users', $types)) {
$counts['users'] = $this->buildUserQuery($companyIds, $includeNull)->count();
}
return $counts;
}
private function buildCompanyQuery(Builder $query, array $companyIds, bool $includeNull): Builder
{
return $query->where(function (Builder $q) use ($companyIds, $includeNull) {
if (! empty($companyIds)) {
$q->whereIn('company_id', $companyIds);
}
if ($includeNull) {
$method = ! empty($companyIds) ? 'orWhereNull' : 'whereNull';
$q->{$method}('company_id');
}
});
}
private function buildUserQuery(array $companyIds, bool $includeNull): Builder
{
return User::query()
->where('activated', 1)
->where(function (Builder $q) use ($companyIds, $includeNull) {
if (! empty($companyIds)) {
$q->whereIn('company_id', $companyIds);
}
if ($includeNull) {
$method = ! empty($companyIds) ? 'orWhereNull' : 'whereNull';
$q->{$method}('company_id');
}
});
}
private function processAssets(
array $companyIds,
bool $includeNull,
bool $sendNotifications,
User $admin,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$assets = $this->buildCompanyQuery(Asset::query(), $companyIds, $includeNull)->get();
foreach ($assets as $asset) {
$bar->setMessage("Assets: {$asset->asset_tag}");
if ($asset->assignedTo) {
if ($dryRun) {
$this->line(" [dry-run] Would check in asset {$asset->asset_tag} from {$asset->assignedTo->name}");
$this->reportLines[] = "Would check in asset {$asset->asset_tag} (assigned to {$asset->assignedTo->name})";
} else {
$target = $asset->assignedTo;
$checkinAt = now()->format('Y-m-d H:i:s');
$originalValues = $asset->getRawOriginal();
if ($sendNotifications) {
event(new CheckoutableCheckedIn($asset, $target, $admin, self::CHECKIN_NOTE, $checkinAt, $originalValues));
DB::table('assets')->where('id', $asset->id)->update(['assigned_to' => null, 'assigned_type' => null]);
} else {
DB::table('assets')->where('id', $asset->id)->update(['assigned_to' => null, 'assigned_type' => null]);
$asset->logCheckin($target, self::CHECKIN_NOTE, $checkinAt, $originalValues);
}
$this->reportLines[] = "Checked in asset {$asset->asset_tag} from {$target->name}";
$asset->licenseseats()->update(['assigned_to' => null]);
CheckoutAcceptance::where('checkoutable_type', Asset::class)
->where('checkoutable_id', $asset->id)
->whereNull('accepted_at')
->whereNull('declined_at')
->forceDelete();
}
}
if (! $dryRun) {
// Collect action log file paths before logs may be cleared
$actionLogPaths = $deleteFiles
? $asset->assetlog()->whereNotNull('filename')->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
// Delete checkout acceptance files, then hard-remove all acceptances
if ($deleteFiles) {
CheckoutAcceptance::where('checkoutable_type', Asset::class)
->where('checkoutable_id', $asset->id)
->get()
->each(fn (CheckoutAcceptance $ca) => $this->deleteAcceptanceFiles($ca));
}
CheckoutAcceptance::where('checkoutable_type', Asset::class)
->where('checkoutable_id', $asset->id)
->forceDelete();
// Hard-delete-only cleanup: maintenance records, accessory checkouts to this
// asset, and any other assets that were assigned to this one
$maintenanceImages = [];
if ($deleteType === 'hard') {
if ($deleteFiles) {
$maintenanceImages = $asset->maintenances()
->whereNotNull('image')
->pluck('image')
->toArray();
}
$asset->maintenances()->forceDelete();
AccessoryCheckout::where('assigned_to', $asset->id)
->where('assigned_type', Asset::class)
->delete();
DB::table('assets')
->where('assigned_to', $asset->id)
->where('assigned_type', Asset::class)
->update(['assigned_to' => null, 'assigned_type' => null]);
}
match ($deleteType) {
'soft' => $asset->delete(),
'hard' => $asset->forceDelete(),
default => null,
};
if ($deleteType !== 'none') {
$this->reportLines[] = ucfirst($deleteType)."-deleted asset {$asset->asset_tag}";
}
if ($clearLogs) {
$asset->assetlog()->forceDelete();
}
if ($deleteFiles) {
if ($asset->image) {
$this->deleteStorageFile('public', app('assets_upload_path').$asset->image);
}
foreach ($maintenanceImages as $img) {
$this->deleteStorageFile('public', app('maintenances_upload_path').$img);
}
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete asset {$asset->asset_tag}");
$this->reportLines[] = "Would {$deleteType}-delete asset {$asset->asset_tag}";
}
$bar->advance();
}
}
private function processLicenses(
array $companyIds,
bool $includeNull,
bool $sendNotifications,
User $admin,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$licenses = $this->buildCompanyQuery(License::query(), $companyIds, $includeNull)->get();
foreach ($licenses as $license) {
$bar->setMessage("Licenses: {$license->name}");
$seats = LicenseSeat::where('license_id', $license->id)
->where(fn ($q) => $q->whereNotNull('assigned_to')->orWhereNotNull('asset_id'))
->get();
foreach ($seats as $seat) {
$target = $seat->assigned_to ? $seat->user : $seat->asset;
if ($dryRun) {
$this->line(" [dry-run] Would check in license seat for {$license->name} from ".($target?->name ?? $target?->asset_tag ?? 'unknown'));
$this->reportLines[] = "Would check in license seat for {$license->name} from ".($target?->name ?? $target?->asset_tag ?? 'unknown');
} else {
$seat->assigned_to = null;
$seat->asset_id = null;
$seat->save();
$this->reportLines[] = "Checked in license seat for {$license->name} from ".($target?->name ?? $target?->asset_tag ?? 'unknown');
if ($target) {
if ($sendNotifications) {
event(new CheckoutableCheckedIn($seat, $target, $admin, self::CHECKIN_NOTE));
} else {
$seat->logCheckin($target, self::CHECKIN_NOTE);
}
}
}
}
if (! $dryRun) {
// Collect action log file paths before logs may be cleared
$actionLogPaths = $deleteFiles
? $license->assetlog()->whereNotNull('filename')->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
if ($deleteType === 'soft') {
$license->licenseseats()->delete();
$license->delete();
$this->reportLines[] = "Soft-deleted license {$license->name}";
} elseif ($deleteType === 'hard') {
$seatIds = $license->licenseseats()->pluck('id');
if ($deleteFiles) {
CheckoutAcceptance::where('checkoutable_type', LicenseSeat::class)
->whereIn('checkoutable_id', $seatIds)
->get()
->each(fn (CheckoutAcceptance $ca) => $this->deleteAcceptanceFiles($ca));
}
CheckoutAcceptance::where('checkoutable_type', LicenseSeat::class)
->whereIn('checkoutable_id', $seatIds)
->forceDelete();
$license->licenseseats()->forceDelete();
DB::table('kits_licenses')->where('license_id', $license->id)->delete();
$license->forceDelete();
$this->reportLines[] = "Hard-deleted license {$license->name}";
}
if ($clearLogs) {
$license->assetlog()->forceDelete();
}
if ($deleteFiles) {
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete license {$license->name}");
$this->reportLines[] = "Would {$deleteType}-delete license {$license->name}";
}
$bar->advance();
}
}
private function processAccessories(
array $companyIds,
bool $includeNull,
bool $sendNotifications,
User $admin,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$accessories = $this->buildCompanyQuery(Accessory::query(), $companyIds, $includeNull)->get();
foreach ($accessories as $accessory) {
$bar->setMessage("Accessories: {$accessory->name}");
$checkouts = AccessoryCheckout::where('accessory_id', $accessory->id)->get();
foreach ($checkouts as $checkout) {
$target = $checkout->assignedTo;
if ($dryRun) {
$this->line(" [dry-run] Would check in accessory {$accessory->name} from ".($target?->name ?? 'unknown'));
$this->reportLines[] = "Would check in accessory {$accessory->name} from ".($target?->name ?? 'unknown');
} else {
$checkinAt = now()->format('Y-m-d H:i:s');
$checkout->delete();
$this->reportLines[] = "Checked in accessory {$accessory->name} from ".($target?->name ?? 'unknown');
if ($target) {
if ($sendNotifications) {
event(new CheckoutableCheckedIn($accessory, $target, $admin, self::CHECKIN_NOTE, $checkinAt));
} else {
$accessory->logCheckin($target, self::CHECKIN_NOTE, $checkinAt);
}
}
}
}
if (! $dryRun) {
// Collect action log file paths before logs may be cleared
$actionLogPaths = $deleteFiles
? $accessory->assetlog()->whereNotNull('filename')->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
if ($clearLogs) {
$accessory->assetlog()->forceDelete();
}
if ($deleteType === 'hard') {
DB::table('kits_accessories')->where('accessory_id', $accessory->id)->delete();
}
match ($deleteType) {
'soft' => $accessory->delete(),
'hard' => $accessory->forceDelete(),
default => null,
};
if ($deleteType !== 'none') {
$this->reportLines[] = ucfirst($deleteType)."-deleted accessory {$accessory->name}";
}
if ($deleteFiles) {
if ($accessory->image) {
$this->deleteStorageFile('public', app('accessories_upload_path').$accessory->image);
}
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete accessory {$accessory->name}");
$this->reportLines[] = "Would {$deleteType}-delete accessory {$accessory->name}";
}
$bar->advance();
}
}
private function processComponents(
array $companyIds,
bool $includeNull,
bool $sendNotifications,
User $admin,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$components = $this->buildCompanyQuery(Component::query(), $companyIds, $includeNull)->get();
foreach ($components as $component) {
$bar->setMessage("Components: {$component->name}");
$assignments = DB::table('components_assets')
->where('component_id', $component->id)
->get();
foreach ($assignments as $assignment) {
$asset = Asset::find($assignment->asset_id);
if ($dryRun) {
$this->line(" [dry-run] Would check in component {$component->name} from asset ".($asset?->asset_tag ?? 'unknown'));
$this->reportLines[] = "Would check in component {$component->name} from asset ".($asset?->asset_tag ?? 'unknown');
} else {
$checkinAt = now()->format('Y-m-d H:i:s');
DB::table('components_assets')->where('id', $assignment->id)->delete();
$this->reportLines[] = "Checked in component {$component->name} from asset ".($asset?->asset_tag ?? 'unknown');
if ($asset) {
if ($sendNotifications) {
event(new CheckoutableCheckedIn($component, $asset, $admin, self::CHECKIN_NOTE, $checkinAt));
} else {
$component->logCheckin($asset, self::CHECKIN_NOTE, $checkinAt);
}
}
}
}
if (! $dryRun) {
// Collect action log file paths before logs may be cleared
$actionLogPaths = $deleteFiles
? $component->assetlog()->whereNotNull('filename')->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
if ($clearLogs) {
$component->assetlog()->forceDelete();
}
match ($deleteType) {
'soft' => $component->delete(),
'hard' => $component->forceDelete(),
default => null,
};
if ($deleteType !== 'none') {
$this->reportLines[] = ucfirst($deleteType)."-deleted component {$component->name}";
}
if ($deleteFiles) {
if ($component->image) {
$this->deleteStorageFile('public', app('components_upload_path').$component->image);
}
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete component {$component->name}");
$this->reportLines[] = "Would {$deleteType}-delete component {$component->name}";
}
$bar->advance();
}
}
private function processConsumables(
array $companyIds,
bool $includeNull,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$consumables = $this->buildCompanyQuery(Consumable::query(), $companyIds, $includeNull)->get();
foreach ($consumables as $consumable) {
$bar->setMessage("Consumables: {$consumable->name}");
if (! $dryRun) {
// Collect action log file paths before logs may be cleared
$actionLogPaths = $deleteFiles
? $consumable->assetlog()->whereNotNull('filename')->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
if ($clearLogs) {
$consumable->assetlog()->forceDelete();
}
if ($deleteType === 'hard') {
DB::table('kits_consumables')->where('consumable_id', $consumable->id)->delete();
}
match ($deleteType) {
'soft' => $consumable->delete(),
'hard' => $consumable->forceDelete(),
default => null,
};
if ($deleteType !== 'none') {
$this->reportLines[] = ucfirst($deleteType)."-deleted consumable {$consumable->name}";
}
if ($deleteFiles) {
if ($consumable->image) {
$this->deleteStorageFile('public', app('consumables_upload_path').$consumable->image);
}
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete consumable {$consumable->name}");
$this->reportLines[] = "Would {$deleteType}-delete consumable {$consumable->name}";
}
$bar->advance();
}
}
private function processUsers(
array $companyIds,
bool $includeNull,
User $admin,
bool $skipAdminUser,
bool $dryRun,
string $deleteType,
bool $clearLogs,
bool $deleteFiles,
ProgressBar $bar,
): void {
$users = $this->buildUserQuery($companyIds, $includeNull)->get();
foreach ($users as $user) {
if ($skipAdminUser && $user->id === $admin->id) {
continue;
}
$bar->setMessage("Users: {$user->username}");
// If real companies were selected, check whether this user also belongs to
// companies outside the selected scope. If so, only remove the selected-company
// associations and skip full deletion to avoid orphaning them from their other companies.
if (! empty($companyIds)) {
$allUserCompanyIds = array_unique(array_filter(array_merge(
$user->companies()->pluck('companies.id')->toArray(),
$user->company_id ? [$user->company_id] : [],
)));
$outsideCompanyIds = array_values(array_diff($allUserCompanyIds, $companyIds));
if (! empty($outsideCompanyIds)) {
$outsideNames = Company::whereIn('id', $outsideCompanyIds)->pluck('name')->implode(', ');
if ($dryRun) {
$this->line(" [dry-run] Would partially disassociate user {$user->username} (also belongs to: {$outsideNames})");
$this->reportLines[] = "Would partially disassociate user {$user->username} — also belongs to: {$outsideNames}";
} else {
$user->companies()->detach($companyIds);
warning(" Skipped full deletion of {$user->username}: they also belong to {$outsideNames}. Removed selected company associations only.");
$this->reportLines[] = "Partially disassociated user {$user->username} — also belongs to: {$outsideNames}. Full deletion skipped.";
}
$bar->advance();
continue;
}
}
if (! $dryRun) {
// Collect file paths and acceptance records before deleting pivot data
$acceptancesToDelete = $deleteFiles
? CheckoutAcceptance::where('assigned_to_id', $user->id)->get()
: collect();
$actionLogPaths = $deleteFiles
? Actionlog::where('item_type', User::class)
->where('item_id', $user->id)
->where('action_type', 'uploaded')
->whereNotNull('filename')
->get()
->map(fn (Actionlog $log) => $log->uploads_file_path())
->filter()
->values()
->toArray()
: [];
// Clear pivot/assignment data that will orphan on deletion
LicenseSeat::where('assigned_to', $user->id)->update(['assigned_to' => null]);
AccessoryCheckout::where('assigned_to', $user->id)
->where('assigned_type', User::class)
->delete();
DB::table('consumables_users')->where('assigned_to', $user->id)->delete();
CheckoutAcceptance::where('assigned_to_id', $user->id)->forceDelete();
if ($deleteType === 'hard') {
DB::table('company_user')->where('user_id', $user->id)->delete();
}
if ($clearLogs) {
$user->userlog()->forceDelete();
}
match ($deleteType) {
'soft' => $user->delete(),
'hard' => $user->forceDelete(),
default => null,
};
if ($deleteType !== 'none') {
$this->reportLines[] = ucfirst($deleteType)."-deleted user {$user->username}";
}
if ($deleteFiles) {
if ($user->avatar) {
$this->deleteStorageFile('public', app('users_upload_path').$user->avatar);
}
$acceptancesToDelete->each(fn (CheckoutAcceptance $ca) => $this->deleteAcceptanceFiles($ca));
foreach ($actionLogPaths as $path) {
$this->deleteStorageFile('local', $path);
}
}
} elseif ($deleteType !== 'none') {
$this->line(" [dry-run] Would {$deleteType}-delete user {$user->username}");
$this->reportLines[] = "Would {$deleteType}-delete user {$user->username}";
}
$bar->advance();
}
}
private function deleteStorageFile(string $disk, ?string $path): void
{
if (! $path) {
return;
}
try {
$storage = $disk === 'public'
? Storage::disk('public')
: Storage::disk(config('filesystems.default'));
if ($storage->exists($path)) {
$storage->delete($path);
}
} catch (\Exception $e) {
Log::warning("Could not delete file {$path}: ".$e->getMessage());
}
}
private function deleteAcceptanceFiles(CheckoutAcceptance $acceptance): void
{
if ($acceptance->signature_filename) {
$this->deleteStorageFile('local', 'private_uploads/signatures/'.$acceptance->signature_filename);
}
if ($acceptance->stored_eula_file) {
$this->deleteStorageFile('local', 'private_uploads/eula-pdfs/'.$acceptance->stored_eula_file);
}
}
}
@@ -0,0 +1,308 @@
<?php
namespace App\Console\Commands;
use App\Events\CheckoutableCheckedIn;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Component;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
class CheckinAndDeleteItems extends Command
{
protected $signature = 'snipeit:checkin-delete-all
{--company-id= : Only process items belonging to this company ID}
{--admin-id= : ID of the user credited for the checkins (defaults to first superadmin)}
{--no-notifications : Suppress email and webhook notifications}
{--type=all : Comma-separated types to process: assets, licenses, accessories, components, or all}
{--note= : Note recorded on each checkin action log entry}
{--dry-run : Preview what would be processed without making any changes}
{--force : Skip the confirmation prompt}';
protected $description = 'Check in all assigned items and soft-delete them, optionally scoped to a company';
public function handle(): int
{
$companyId = $this->option('company-id');
$noNotifications = $this->option('no-notifications');
$dryRun = $this->option('dry-run');
$typeOption = $this->option('type') ?? 'all';
$note = $this->option('note') ?: 'Checked in and deleted via CLI';
$allTypes = ['assets', 'licenses', 'accessories', 'components'];
$typesToProcess = $typeOption === 'all'
? $allTypes
: array_intersect(array_map('trim', explode(',', $typeOption)), $allTypes);
if (empty($typesToProcess)) {
$this->error('Invalid --type value. Use: assets, licenses, accessories, components, or all.');
return 1;
}
$admin = null;
if (! $dryRun && ! $noNotifications) {
if ($this->option('admin-id')) {
$admin = User::find($this->option('admin-id'));
if (! $admin) {
$this->error('No user found with admin-id '.$this->option('admin-id').'.');
return 1;
}
} else {
$admin = User::onlySuperAdmins()->first();
}
if (! $admin) {
$this->warn('No admin user found — notifications will be suppressed.');
$noNotifications = true;
}
}
$scopeMsg = $companyId ? "company ID {$companyId}" : 'all companies';
$typesMsg = implode(', ', $typesToProcess);
if ($dryRun) {
$this->warn('DRY RUN — no changes will be made.');
} elseif (! $this->option('force')) {
if (! $this->confirm("This will check in and soft-delete all [{$typesMsg}] for [{$scopeMsg}]. Continue?")) {
$this->info('Aborted.');
return 0;
}
}
if (in_array('assets', $typesToProcess)) {
$this->processAssets($companyId, $noNotifications, $note, $admin, $dryRun);
}
if (in_array('licenses', $typesToProcess)) {
$this->processLicenses($companyId, $noNotifications, $note, $admin, $dryRun);
}
if (in_array('accessories', $typesToProcess)) {
$this->processAccessories($companyId, $noNotifications, $note, $admin, $dryRun);
}
if (in_array('components', $typesToProcess)) {
$this->processComponents($companyId, $noNotifications, $note, $admin, $dryRun);
}
if ($dryRun) {
$this->warn('Dry run complete — no changes were made.');
}
return 0;
}
private function processAssets(?string $companyId, bool $noNotifications, string $note, ?User $admin, bool $dryRun): void
{
$query = Asset::query();
if ($companyId) {
$query->where('company_id', $companyId);
}
$assets = $query->get();
$checkedIn = 0;
$deleted = 0;
foreach ($assets as $asset) {
if ($asset->assignedTo) {
if ($dryRun) {
$this->line(' Would check in asset: '.$asset->asset_tag.' (assigned to '.$asset->assignedTo->name.')');
} else {
$target = $asset->assignedTo;
$checkin_at = now()->format('Y-m-d H:i:s');
$originalValues = $asset->getRawOriginal();
if ($noNotifications) {
DB::table('assets')->where('id', $asset->id)
->update(['assigned_to' => null, 'assigned_type' => null]);
$asset->logCheckin($target, $note, $checkin_at, $originalValues);
} else {
// Fire event before clearing so the log captures the original state
event(new CheckoutableCheckedIn($asset, $target, $admin, $note, $checkin_at, $originalValues));
DB::table('assets')->where('id', $asset->id)
->update(['assigned_to' => null, 'assigned_type' => null]);
}
$asset->licenseseats()->update(['assigned_to' => null]);
CheckoutAcceptance::pending()
->whereHasMorph('checkoutable', [Asset::class], fn (Builder $q) => $q->where('id', $asset->id))
->delete();
}
$checkedIn++;
}
if ($dryRun) {
$this->line(' Would delete asset: '.$asset->asset_tag);
} else {
$asset->delete();
}
$deleted++;
}
$action = $dryRun ? 'would be' : 'were';
$this->info("Assets: {$checkedIn} {$action} checked in, {$deleted} {$action} deleted.");
}
private function processLicenses(?string $companyId, bool $noNotifications, string $note, ?User $admin, bool $dryRun): void
{
$query = License::query();
if ($companyId) {
$query->where('company_id', $companyId);
}
$licenses = $query->get();
$seatsCheckedIn = 0;
$deleted = 0;
foreach ($licenses as $license) {
$seats = LicenseSeat::where('license_id', $license->id)
->where(fn ($q) => $q->whereNotNull('assigned_to')->orWhereNotNull('asset_id'))
->get();
foreach ($seats as $seat) {
$target = $seat->assigned_to ? $seat->user : $seat->asset;
if ($dryRun) {
$this->line(' Would check in license seat for: '.$license->name.' (assigned to '.($target?->name ?? $target?->asset_tag ?? 'unknown').')');
} else {
$seat->assigned_to = null;
$seat->asset_id = null;
$seat->save();
if ($target) {
if ($noNotifications) {
$seat->logCheckin($target, $note);
} else {
event(new CheckoutableCheckedIn($seat, $target, $admin, $note));
}
}
}
$seatsCheckedIn++;
}
if ($dryRun) {
$this->line(' Would delete license: '.$license->name);
} else {
$license->licenseseats()->delete();
$license->delete();
}
$deleted++;
}
$action = $dryRun ? 'would be' : 'were';
$this->info("Licenses: {$seatsCheckedIn} seats {$action} checked in, {$deleted} licenses {$action} deleted.");
}
private function processAccessories(?string $companyId, bool $noNotifications, string $note, ?User $admin, bool $dryRun): void
{
$query = Accessory::query();
if ($companyId) {
$query->where('company_id', $companyId);
}
$accessories = $query->get();
$checkedIn = 0;
$deleted = 0;
foreach ($accessories as $accessory) {
$checkouts = AccessoryCheckout::where('accessory_id', $accessory->id)->get();
foreach ($checkouts as $checkout) {
$target = $checkout->assignedTo;
if ($dryRun) {
$this->line(' Would check in accessory: '.$accessory->name.' (assigned to '.($target?->name ?? $target?->asset_tag ?? 'unknown').')');
} else {
$checkin_at = now()->format('Y-m-d H:i:s');
$checkout->delete();
if ($target) {
if ($noNotifications) {
$accessory->logCheckin($target, $note, $checkin_at);
} else {
event(new CheckoutableCheckedIn($accessory, $target, $admin, $note, $checkin_at));
}
}
}
$checkedIn++;
}
if ($dryRun) {
$this->line(' Would delete accessory: '.$accessory->name);
} else {
$accessory->delete();
}
$deleted++;
}
$action = $dryRun ? 'would be' : 'were';
$this->info("Accessories: {$checkedIn} {$action} checked in, {$deleted} {$action} deleted.");
}
private function processComponents(?string $companyId, bool $noNotifications, string $note, ?User $admin, bool $dryRun): void
{
$query = Component::query();
if ($companyId) {
$query->where('company_id', $companyId);
}
$components = $query->get();
$checkedIn = 0;
$deleted = 0;
foreach ($components as $component) {
$assignments = DB::table('components_assets')
->where('component_id', $component->id)
->get();
foreach ($assignments as $assignment) {
$asset = Asset::find($assignment->asset_id);
if ($dryRun) {
$this->line(' Would check in component: '.$component->name.' (assigned to '.($asset?->asset_tag ?? 'unknown').')');
} else {
$checkin_at = now()->format('Y-m-d H:i:s');
DB::table('components_assets')->where('id', $assignment->id)->delete();
if ($asset) {
if ($noNotifications) {
$component->logCheckin($asset, $note, $checkin_at);
} else {
event(new CheckoutableCheckedIn($component, $asset, $admin, $note, $checkin_at));
}
}
}
$checkedIn++;
}
if ($dryRun) {
$this->line(' Would delete component: '.$component->name);
} else {
$component->delete();
}
$deleted++;
}
$action = $dryRun ? 'would be' : 'were';
$this->info("Components: {$checkedIn} {$action} checked in, {$deleted} {$action} deleted.");
}
}
@@ -4,9 +4,7 @@ namespace App\Console\Commands;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
class CheckinLicensesFromAllUsers extends Command
{
@@ -3,10 +3,8 @@
namespace App\Console\Commands;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
class CheckoutLicenseToAllUsers extends Command
{
@@ -75,6 +73,7 @@ class CheckoutLicenseToAllUsers extends Command
if ($user->licenses->where('id', '=', $license_id)->count()) {
$this->info($user->username.' already has this license checked out to them. Skipping... ');
continue;
}
@@ -21,7 +21,7 @@ class CleanIncorrectCheckoutAcceptances extends Command
*
* @var string
*/
protected $description = "Delete checkout acceptances for checkouts to non-users";
protected $description = 'Delete checkout acceptances for checkouts to non-users';
/**
* Execute the console command.
@@ -30,39 +30,77 @@ class CleanIncorrectCheckoutAcceptances extends Command
{
$deletions = 0;
$skips = 0;
$total = CheckoutAcceptance::count();
// This walks *every* checkoutacceptance. That's gnarly. But necessary
$this->withProgressBar(CheckoutAcceptance::all(), function ($checkoutAcceptance) use (&$deletions, &$skips) {
$item = $checkoutAcceptance->checkoutable;
$checkout_to_id = $checkoutAcceptance->assigned_to_id;
if(is_null($item)) {
$this->info("'Checkoutable' Item is null, going to next record");
return; //'false' allegedly breaks execution entirely, so 'true' maybe doesn't? hrm. just straight return maybe?
}
if(get_class($item) == LicenseSeat::class) {
$item = $item->license;
}
foreach($item->assetlog()->where('action_type','checkout')->get() as $assetlog) {
if ($assetlog->target_id == $checkout_to_id && $assetlog->target_type != User::class) {
//We have a checkout-to an ID for a non-User, which matches to an ID in the checkout_acceptances table
$this->info("Processing {$total} checkout acceptances...");
$bar = $this->output->createProgressBar($total);
$bar->start();
//now, let's compare the _times_ - are they close?
//I'm picking `created_at` over `action_date` because I'm more interested in when the actionlogs
//were _created_, not when they were alleged to have happened - those created_at times need to be within 'X' seconds of
//each other (currently 5)
if ($assetlog->created_at->diffInSeconds($checkoutAcceptance->created_at, true) <= 5) { //we're allowing for five _ish_ seconds of slop
$deletions++;
$checkoutAcceptance->forceDelete(); // HARD delete this record; it should have never been
return;
} else {
//$this->info("The two records are too far apart");
// Chunk to avoid loading the whole table into memory; eager-load checkoutable
// to eliminate the N+1 on that relationship.
CheckoutAcceptance::with('checkoutable')
->chunkById(500, function ($chunk) use (&$deletions, &$skips, $bar) {
$idsToDelete = [];
foreach ($chunk as $checkoutAcceptance) {
$item = $checkoutAcceptance->checkoutable;
$checkout_to_id = $checkoutAcceptance->assigned_to_id;
if (is_null($item)) {
$skips++;
$bar->advance();
continue;
}
} else {
//$this->info("No match! checkout to id: " . $checkout_to_id." target_id: ".$assetlog->target_id." target_type: ".$assetlog->target_type);
if (get_class($item) === LicenseSeat::class) {
$item = $item->license;
if (is_null($item)) {
$skips++;
$bar->advance();
continue;
}
}
if (is_null($checkoutAcceptance->created_at)) {
$skips++;
$bar->advance();
continue;
}
// Push all filtering (including the ±5-second window) into the DB;
// exists() returns as soon as one matching row is found rather than
// fetching all checkout logs into PHP.
$shouldDelete = $item->assetlog()
->where('action_type', 'checkout')
->where('target_id', $checkout_to_id)
->where('target_type', '!=', User::class)
->whereBetween('created_at', [
$checkoutAcceptance->created_at->copy()->subSeconds(5),
$checkoutAcceptance->created_at->copy()->addSeconds(5),
])
->exists();
if ($shouldDelete) {
$idsToDelete[] = $checkoutAcceptance->id;
$deletions++;
} else {
$skips++;
}
$bar->advance();
}
}
$skips++;
});
$this->error("Final deletion count: $deletions, and skip count: $skips");
// Bulk-delete the bad records in one query per chunk instead of one per row.
if (! empty($idsToDelete)) {
CheckoutAcceptance::whereIn('id', $idsToDelete)->forceDelete();
}
});
$bar->finish();
$this->newLine();
$this->info("Final deletion count: {$deletions}, and skip count: {$skips}");
}
}
@@ -8,6 +8,7 @@ use Illuminate\Console\Command;
class CleanOldCheckoutRequests extends Command
{
private int $deletions = 0;
private int $skips = 0;
/**
@@ -44,12 +45,14 @@ class CleanOldCheckoutRequests extends Command
if ($this->shouldForceDelete($request)) {
$request->forceDelete();
$this->deletions++;
return;
}
if ($this->shouldSoftDelete($request)) {
$request->delete();
$this->deletions++;
return;
}
@@ -64,7 +67,7 @@ class CleanOldCheckoutRequests extends Command
private function shouldForceDelete(CheckoutRequest $request)
{
// check if the requestable or user relationship is null
return !$request->requestable || !$request->user;
return ! $request->requestable || ! $request->user;
}
private function shouldSoftDelete(CheckoutRequest $request)
+7 -13
View File
@@ -2,31 +2,28 @@
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
use \App\Models\User;
use Illuminate\Support\Carbon;
class CreateAdmin extends Command
{
/** @mixin User **/
/**
* App\Console\CreateAdmin
*
* @property mixed $first_name
* @property string $last_name
* @property string $username
* @property string $email
* @property string $permissions
* @property string $password
* @property boolean $activated
* @property boolean $show_in_list
* @property boolean $autoassign_licenses
* @property \Illuminate\Support\Carbon|null $created_at
* @property bool $activated
* @property bool $show_in_list
* @property bool $autoassign_licenses
* @property Carbon|null $created_at
* @property mixed $created_by
*/
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?} {autoassign_licenses?}';
/**
@@ -46,7 +43,6 @@ class CreateAdmin extends Command
parent::__construct();
}
public function handle()
{
$first_name = $this->option('first_name');
@@ -57,8 +53,6 @@ class CreateAdmin extends Command
$show_in_list = $this->argument('show_in_list');
$autoassign_licenses = $this->argument('autoassign_licenses');
if (($first_name == '') || ($last_name == '') || ($username == '') || ($email == '') || ($password == '')) {
$this->info('ERROR: All fields are required.');
} else {
@@ -24,6 +24,7 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
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;
/**
@@ -50,10 +51,11 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
if ($logs->isEmpty()) {
$this->info('No logs found with incorrect timestamps.');
return 0;
}
$this->info('Found ' . $logs->count() . ' logs with incorrect timestamps:');
$this->info('Found '.$logs->count().' logs with incorrect timestamps:');
$this->table(
['ID', 'Created By', 'Created At', 'Updated At'],
@@ -67,11 +69,11 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
})
);
if (!$this->dryrun && !$this->confirm('Update these logs?')) {
if (! $this->dryrun && ! $this->confirm('Update these logs?')) {
return 0;
}
if (!$this->dryrun && !$this->skipBackup) {
if (! $this->dryrun && ! $this->skipBackup) {
$this->info('Backing up the database before making changes...');
$this->call('snipeit:backup');
}
@@ -83,7 +85,7 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
foreach ($logs as $log) {
$this->newLine();
$this->info('Processing log id:' . $log->id);
$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
@@ -106,7 +108,7 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
$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) {
if (! $this->dryrun) {
Model::withoutTimestamps(function () use ($log) {
$log->saveQuietly();
});
@@ -129,7 +131,7 @@ class FixBulkAccessoryCheckinActionLogEntries extends Command
* 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
private function getCreatedByAttributeFromSimilarLog(Actionlog $log): ?int
{
$similarLog = Actionlog::query()
->whereNotNull('created_by')
+30 -15
View File
@@ -2,6 +2,21 @@
namespace App\Console\Commands;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\Company;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\Department;
use App\Models\Depreciation;
use App\Models\Group;
use App\Models\License;
use App\Models\Location;
use App\Models\Manufacturer;
use App\Models\Statuslabel;
use App\Models\Supplier;
use App\Models\User;
use Illuminate\Console\Command;
class FixDoubleEscape extends Command
@@ -38,21 +53,21 @@ class FixDoubleEscape extends Command
public function handle()
{
$tables = [
\App\Models\Asset::class => ['name'],
\App\Models\License::class => ['name'],
\App\Models\Consumable::class => ['name'],
\App\Models\Accessory::class => ['name'],
\App\Models\Component::class => ['name'],
\App\Models\Company::class => ['name'],
\App\Models\Manufacturer::class => ['name'],
\App\Models\Supplier::class => ['name'],
\App\Models\Statuslabel::class => ['name'],
\App\Models\Depreciation::class => ['name'],
\App\Models\AssetModel::class => ['name'],
\App\Models\Group::class => ['name'],
\App\Models\Department::class => ['name'],
\App\Models\Location::class => ['name'],
\App\Models\User::class => ['first_name', 'last_name'],
Asset::class => ['name'],
License::class => ['name'],
Consumable::class => ['name'],
Accessory::class => ['name'],
Component::class => ['name'],
Company::class => ['name'],
Manufacturer::class => ['name'],
Supplier::class => ['name'],
Statuslabel::class => ['name'],
Depreciation::class => ['name'],
AssetModel::class => ['name'],
Group::class => ['name'],
Department::class => ['name'],
Location::class => ['name'],
User::class => ['first_name', 'last_name'],
];
$count = [];
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\User;
use Illuminate\Console\Command;
class FixMismatchedAssetsAndLogs extends Command
@@ -56,26 +57,26 @@ class FixMismatchedAssetsAndLogs extends Command
$mismatch_count = 0;
$assets = Asset::whereNotNull('assigned_to')
->where('assigned_type', '=', \App\Models\User::class)
->where('assigned_type', '=', User::class)
->orderBy('id', 'ASC')->get();
foreach ($assets as $asset) {
// get the last checkout of the asset
if ($checkout_log = Actionlog::where('target_type', '=', \App\Models\User::class)
if ($checkout_log = Actionlog::where('target_type', '=', User::class)
->where('action_type', '=', 'checkout')
->where('item_id', '=', $asset->id)
->orderBy('created_at', 'DESC')
->first()) {
// Now check for a subsequent checkin log - we want to ignore those
if (! $checkin_log = Actionlog::where('target_type', '=', \App\Models\User::class)
->where('action_type', '=', 'checkin from')
->where('item_id', '=', $asset->id)
->whereDate('created_at', '>', $checkout_log->created_at)
->orderBy('created_at', 'DESC')
->first()) {
// Now check for a subsequent checkin log - we want to ignore those
if (! $checkin_log = Actionlog::where('target_type', '=', User::class)
->where('action_type', '=', 'checkin from')
->where('item_id', '=', $asset->id)
->whereDate('created_at', '>', $checkout_log->created_at)
->orderBy('created_at', 'DESC')
->first()) {
//print_r($asset);
// print_r($asset);
if ($checkout_log->target_id != $asset->assigned_to) {
$this->error('Log ID: '.$checkout_log->id.' -- Asset ID '.$checkout_log->item_id.' SHOULD BE checked out to User '.$checkout_log->target_id.' but its assigned_to is '.$asset->assigned_to);
@@ -90,7 +91,7 @@ class FixMismatchedAssetsAndLogs extends Command
$mismatch_count++;
}
} else {
//$this->info('Asset ID '.$asset->id.': There is a checkin '.$checkin_log->created_at.' after this checkout '.$checkout_log->created_at);
// $this->info('Asset ID '.$asset->id.': There is a checkin '.$checkin_log->created_at.' after this checkout '.$checkout_log->created_at);
}
}
}
@@ -27,6 +27,6 @@ class FixUpAssignedTypeWithoutAssignedTo extends Command
public function handle()
{
DB::table('assets')->whereNotNull('assigned_type')->whereNull('assigned_to')->update(['assigned_type' => null]);
$this->info("Assets with an assigned_type but no assigned_to are fixed");
$this->info('Assets with an assigned_type but no assigned_to are fixed');
}
}
@@ -27,40 +27,42 @@ class FixupAssignedToWithoutAssignedType extends Command
*/
public function handle()
{
$assets = Asset::whereNull("assigned_type")->whereNotNull("assigned_to")->withTrashed();
$assets = Asset::whereNull('assigned_type')->whereNotNull('assigned_to')->withTrashed();
$this->withProgressBar($assets->get(), function (Asset $asset) {
//now check each action log, from the most recent backwards, to find the last checkin or checkout
foreach($asset->log()->orderBy("id","desc")->get() as $action_log) {
if($this->option("debug")) {
$this->info("Asset id: " . $asset->id . " action log, action type is: " . $action_log->action_type);
// now check each action log, from the most recent backwards, to find the last checkin or checkout
foreach ($asset->log()->orderBy('id', 'desc')->get() as $action_log) {
if ($this->option('debug')) {
$this->info('Asset id: '.$asset->id.' action log, action type is: '.$action_log->action_type);
}
switch($action_log->action_type) {
switch ($action_log->action_type) {
case 'checkin from':
if($this->option("debug")) {
$this->info("Doing a checkin for ".$asset->id);
if ($this->option('debug')) {
$this->info('Doing a checkin for '.$asset->id);
}
$asset->assigned_to = null;
// if you have a required custom field, we still want to save, and we *don't* want an action_log
$asset->saveQuietly();
return;
case 'checkout':
if($this->option("debug")) {
$this->info("Doing a checkout for " . $asset->id . " picking target type: " . $action_log->target_type);
if ($this->option('debug')) {
$this->info('Doing a checkout for '.$asset->id.' picking target type: '.$action_log->target_type);
}
if($asset->assigned_to != $action_log->target_id) {
$this->error("Asset's assigned_to does *NOT* match Action Log's target_id. \$asset->assigned_to=".$asset->assigned_to." vs. \$action_log->target_id=".$action_log->target_id);
//FIXME - do we abort here? Do we try to keep looking? I don't know, this means your data is *really* messed up...
if ($asset->assigned_to != $action_log->target_id) {
$this->error("Asset's assigned_to does *NOT* match Action Log's target_id. \$asset->assigned_to=".$asset->assigned_to.' vs. $action_log->target_id='.$action_log->target_id);
// FIXME - do we abort here? Do we try to keep looking? I don't know, this means your data is *really* messed up...
}
$asset->assigned_type = $action_log->target_type;
$asset->saveQuietly(); // see above
return;
}
}
$asset->assigned_to = null; //asset was never checked in or out in its lifetime - it stays 'checked in'
$asset->saveQuietly(); //see above
$asset->assigned_to = null; // asset was never checked in or out in its lifetime - it stays 'checked in'
$asset->saveQuietly(); // see above
});
$this->newLine();
$this->info("Assets assigned_type are fixed");
$this->info('Assets assigned_type are fixed');
}
}
@@ -2,14 +2,13 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
use Laravel\Passport\TokenRepository;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Laravel\Passport\TokenRepository;
class GeneratePersonalAccessToken extends Command
{
/**
* The name and signature of the console command.
*
@@ -27,15 +26,13 @@ class GeneratePersonalAccessToken extends Command
*/
protected $description = 'This console command allows you to generate Personal API tokens to be used with the Snipe-IT JSON REST API on behalf of a user.';
/**
* The token repository implementation.
*
* @var \Laravel\Passport\TokenRepository
* @var TokenRepository
*/
protected $tokenRepository;
/**
* Create a new command instance.
*
@@ -56,11 +53,11 @@ class GeneratePersonalAccessToken extends Command
{
$accessTokenName = $this->option('name');
if ($accessTokenName=='') {
if ($accessTokenName == '') {
$accessTokenName = 'CLI Auth Token';
}
if ($this->option('user_id')=='') {
if ($this->option('user_id') == '') {
return $this->error('ERROR: user_id cannot be blank.');
}
@@ -75,7 +72,7 @@ class GeneratePersonalAccessToken extends Command
$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()) {
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);
}
@@ -84,11 +81,8 @@ class GeneratePersonalAccessToken extends Command
$this->info('API Token: '.$createAccessToken);
}
} else {
return $this->error('ERROR: Invalid user. API key was not created.');
return $this->error('ERROR: Invalid user. API key was not created.');
}
}
}
+1 -1
View File
@@ -46,7 +46,7 @@ class ImportLocations extends Command
$filename = $this->argument('filename');
$csv = Reader::createFromPath(storage_path('private_uploads/imports/').$filename, 'r');
$this->info('Attempting to process: '.storage_path('private_uploads/imports/').$filename);
$csv->setHeaderOffset(0); //because we don't want to insert the header
$csv->setHeaderOffset(0); // because we don't want to insert the header
$results = $csv->getRecords();
// Import parent location names first if they don't exist
+7 -6
View File
@@ -38,22 +38,23 @@ class KillAllSessions extends Command
public function handle()
{
if (!$this->option('force') && !$this->confirm("****************************************************\nTHIS WILL FORCE A LOGIN FOR ALL LOGGED IN USERS.\n\nAre you SURE you wish to continue? ")) {
return $this->error("Session loss not confirmed");
if (! $this->option('force') && ! $this->confirm("****************************************************\nTHIS WILL FORCE A LOGIN FOR ALL LOGGED IN USERS.\n\nAre you SURE you wish to continue? ")) {
return $this->error('Session loss not confirmed');
}
$session_files = glob(storage_path("framework/sessions/*"));
$session_files = glob(storage_path('framework/sessions/*'));
$count = 0;
foreach ($session_files as $file) {
if (is_file($file))
if (is_file($file)) {
unlink($file);
$count++;
}
$count++;
}
\DB::table('users')->update(['remember_token' => null]);
$this->info($count. ' sessions cleared!');
$this->info($count.' sessions cleared!');
}
}
+164 -106
View File
@@ -5,11 +5,11 @@ namespace App\Console\Commands;
use App\Models\Asset;
use App\Models\Department;
use App\Models\Group;
use Illuminate\Console\Command;
use App\Models\Setting;
use App\Models\Ldap;
use App\Models\User;
use App\Models\Location;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
class LdapSync extends Command
@@ -19,7 +19,7 @@ class LdapSync extends Command
*
* @var string
*/
protected $signature = 'snipeit:ldap-sync {--location=} {--location_id=*} {--base_dn=} {--filter=} {--summary} {--json_summary}';
protected $signature = 'snipeit:ldap-sync {--location=} {--location_id=*} {--base_dn=} {--filter=} {--delete} {--summary} {--json_summary}';
/**
* The console command description.
@@ -47,35 +47,34 @@ class LdapSync extends Command
{
// If LDAP enabled isn't set to 1 (ldap_enabled!=1) then we should cut this short immediately without going any further
if (Setting::getSettings()->ldap_enabled!='1') {
if (Setting::getSettings()->ldap_enabled != '1') {
$this->error('LDAP is not enabled. Aborting. See Settings > LDAP to enable it.');
exit();
}
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); // 600 seconds = 10 minutes
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
// Map the LDAP attributes to the Snipe-IT user fields.
$ldap_map = [
"username" => Setting::getSettings()->ldap_username_field,
"last_name" => Setting::getSettings()->ldap_lname_field,
"first_name" => Setting::getSettings()->ldap_fname_field,
"active_flag" => Setting::getSettings()->ldap_active_flag,
"emp_num" => Setting::getSettings()->ldap_emp_num,
"email" => Setting::getSettings()->ldap_email,
"phone" => Setting::getSettings()->ldap_phone_field,
"mobile" => Setting::getSettings()->ldap_mobile,
"jobtitle" => Setting::getSettings()->ldap_jobtitle,
"address" => Setting::getSettings()->ldap_address,
"city" => Setting::getSettings()->ldap_city,
"state" => Setting::getSettings()->ldap_state,
"zip" => Setting::getSettings()->ldap_zip,
"country" => Setting::getSettings()->ldap_country,
"location" => Setting::getSettings()->ldap_location,
"dept" => Setting::getSettings()->ldap_dept,
"manager" => Setting::getSettings()->ldap_manager,
"display_name" => Setting::getSettings()->ldap_display_name,
'username' => Setting::getSettings()->ldap_username_field,
'last_name' => Setting::getSettings()->ldap_lname_field,
'first_name' => Setting::getSettings()->ldap_fname_field,
'active_flag' => Setting::getSettings()->ldap_active_flag,
'emp_num' => Setting::getSettings()->ldap_emp_num,
'email' => Setting::getSettings()->ldap_email,
'phone' => Setting::getSettings()->ldap_phone_field,
'mobile' => Setting::getSettings()->ldap_mobile,
'jobtitle' => Setting::getSettings()->ldap_jobtitle,
'address' => Setting::getSettings()->ldap_address,
'city' => Setting::getSettings()->ldap_city,
'state' => Setting::getSettings()->ldap_state,
'zip' => Setting::getSettings()->ldap_zip,
'country' => Setting::getSettings()->ldap_country,
'location' => Setting::getSettings()->ldap_location,
'dept' => Setting::getSettings()->ldap_dept,
'manager' => Setting::getSettings()->ldap_manager,
'display_name' => Setting::getSettings()->ldap_display_name,
];
$ldap_default_group = Setting::getSettings()->ldap_default_group;
@@ -95,19 +94,20 @@ class LdapSync extends Command
}
$summary = [];
$seen_ldap_usernames = [];
try {
/**
* if a location ID has been specified, use that OU
*/
if ( $this->option('location_id') ) {
if ($this->option('location_id')) {
foreach($this->option('location_id') as $location_id){
foreach ($this->option('location_id') as $location_id) {
$location_ou = Location::where('id', '=', $location_id)->value('ldap_ou');
$search_base = $location_ou;
Log::debug('Importing users from specified location OU: \"'.$search_base.'\".');
}
}
}
/**
@@ -153,21 +153,21 @@ class LdapSync extends Command
$default_location = null;
if ($this->option('location') != '') {
if ($default_location = Location::where('name', '=', $this->option('location'))->first()) {
Log::debug('Location name ' . $this->option('location') . ' passed');
Log::debug('Location name '.$this->option('location').' passed');
Log::debug('Importing to '.$default_location->name.' ('.$default_location->id.')');
}
} elseif ($this->option('location_id')) {
//TODO - figure out how or why this is an array?
foreach($this->option('location_id') as $location_id) {
// TODO - figure out how or why this is an array?
foreach ($this->option('location_id') as $location_id) {
if ($default_location = Location::where('id', '=', $location_id)->first()) {
Log::debug('Location ID ' . $location_id . ' passed');
Log::debug('Location ID '.$location_id.' passed');
Log::debug('Importing to '.$default_location->name.' ('.$default_location->id.')');
}
}
}
if (!isset($default_location)) {
if (! isset($default_location)) {
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
}
@@ -208,17 +208,17 @@ class LdapSync extends Command
}
$usernames = [];
for ($i = 0; $i < $location_users['count']; $i++) {
if (array_key_exists($ldap_map["username"], $location_users[$i])) {
if (array_key_exists($ldap_map['username'], $location_users[$i])) {
$location_users[$i]['ldap_location_override'] = true;
$location_users[$i]['location_id'] = $ldap_loc['id'];
$usernames[] = $location_users[$i][$ldap_map["username"]][0];
$usernames[] = $location_users[$i][$ldap_map['username']][0];
}
}
// Delete located users from the general group.
foreach ($results as $key => $generic_entry) {
if ((is_array($generic_entry)) && (array_key_exists($ldap_map["username"], $generic_entry))) {
if (in_array($generic_entry[$ldap_map["username"]][0], $usernames)) {
if ((is_array($generic_entry)) && (array_key_exists($ldap_map['username'], $generic_entry))) {
if (in_array($generic_entry[$ldap_map['username']][0], $usernames)) {
unset($results[$key]);
}
}
@@ -232,42 +232,41 @@ class LdapSync extends Command
$manager_cache = [];
if($ldap_default_group != null) {
if ($ldap_default_group != null) {
$default = Group::find($ldap_default_group);
if (!$default) {
if (! $default) {
$ldap_default_group = null; // un-set the default group if that group doesn't exist
}
}
// Assign the mapped LDAP attributes for each user to the Snipe-IT user fields
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
$item['display_name'] = $results[$i][$ldap_map["display_name"]][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_map["emp_num"]][0] ?? '';
$item['lastname'] = $results[$i][$ldap_map["last_name"]][0] ?? '';
$item['firstname'] = $results[$i][$ldap_map["first_name"]][0] ?? '';
$item['email'] = $results[$i][$ldap_map["email"]][0] ?? '';
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_map["phone"]][0] ?? '';
$item['mobile'] = $results[$i][$ldap_map["mobile"]][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['address'] = $results[$i][$ldap_map["address"]][0] ?? '';
$item['city'] = $results[$i][$ldap_map["city"]][0] ?? '';
$item['state'] = $results[$i][$ldap_map["state"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][0] ?? '';
$item['zip'] = $results[$i][$ldap_map["zip"]][0] ?? '';
$item['department'] = $results[$i][$ldap_map["dept"]][0] ?? '';
$item['manager'] = $results[$i][$ldap_map["manager"]][0] ?? '';
$item['location'] = $results[$i][$ldap_map["location"]][0] ?? '';
$location = $default_location; //initially, set '$location' to the default_location (which may just be `null`)
$item['username'] = $results[$i][$ldap_map['username']][0] ?? null;
$item['display_name'] = $results[$i][$ldap_map['display_name']][0] ?? null;
$item['employee_number'] = $results[$i][$ldap_map['emp_num']][0] ?? null;
$item['lastname'] = $results[$i][$ldap_map['last_name']][0] ?? null;
$item['firstname'] = $results[$i][$ldap_map['first_name']][0] ?? null;
$item['email'] = $results[$i][$ldap_map['email']][0] ?? null;
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? null;
$item['location_id'] = $results[$i]['location_id'] ?? null;
$item['telephone'] = $results[$i][$ldap_map['phone']][0] ?? null;
$item['mobile'] = $results[$i][$ldap_map['mobile']][0] ?? null;
$item['jobtitle'] = $results[$i][$ldap_map['jobtitle']][0] ?? null;
$item['address'] = $results[$i][$ldap_map['address']][0] ?? null;
$item['city'] = $results[$i][$ldap_map['city']][0] ?? null;
$item['state'] = $results[$i][$ldap_map['state']][0] ?? null;
$item['country'] = $results[$i][$ldap_map['country']][0] ?? null;
$item['zip'] = $results[$i][$ldap_map['zip']][0] ?? null;
$item['department'] = $results[$i][$ldap_map['dept']][0] ?? null;
$item['manager'] = $results[$i][$ldap_map['manager']][0] ?? null;
$item['location'] = $results[$i][$ldap_map['location']][0] ?? null;
$location = $default_location; // initially, set '$location' to the default_location (which may just be null)
// ONLY if you are using the "ldap_location" option *AND* you have an actual result
if ($ldap_map["location"] && $item['location']) {
if ($ldap_map['location'] && $item['location']) {
$location = Location::firstOrCreate([
'name' => $item['location'],
]);
@@ -276,8 +275,14 @@ class LdapSync extends Command
'name' => $item['department'],
]);
$user = User::where('username', $item['username'])->first();
$user = User::withTrashed()->where('username', $item['username'])->first();
if (! empty($item['username'])) {
$seen_ldap_usernames[] = $item['username'];
}
if ($user) {
if ($user->trashed()) {
$user->restore();
}
// Updating an existing user.
$item['createorupdate'] = 'updated';
} else {
@@ -289,58 +294,58 @@ class LdapSync extends Command
$item['createorupdate'] = 'created';
}
//If a sync option is not filled in on the LDAP settings don't populate the user field
if($ldap_map["username"] != null){
// If a sync option is not filled in on the LDAP settings don't populate the user field
if ($ldap_map['username'] != null) {
$user->username = $item['username'];
}
if($ldap_map["display_name"] != null){
if ($ldap_map['display_name'] != null) {
$user->display_name = $item['display_name'];
}
if($ldap_map["last_name"] != null){
if ($ldap_map['last_name'] != null) {
$user->last_name = $item['lastname'];
}
if($ldap_map["first_name"] != null){
if ($ldap_map['first_name'] != null) {
$user->first_name = $item['firstname'];
}
if($ldap_map["emp_num"] != null){
if ($ldap_map['emp_num'] != null) {
$user->employee_num = e($item['employee_number']);
}
if($ldap_map["email"] != null){
if ($ldap_map['email'] != null) {
$user->email = $item['email'];
}
if($ldap_map["phone"] != null){
if ($ldap_map['phone'] != null) {
$user->phone = $item['telephone'];
}
if($ldap_map["mobile"] != null){
if ($ldap_map['mobile'] != null) {
$user->mobile = $item['mobile'];
}
if($ldap_map["jobtitle"] != null){
if ($ldap_map['jobtitle'] != null) {
$user->jobtitle = $item['jobtitle'];
}
if($ldap_map["address"] != null){
if ($ldap_map['address'] != null) {
$user->address = $item['address'];
}
if($ldap_map["city"] != null){
if ($ldap_map['city'] != null) {
$user->city = $item['city'];
}
if($ldap_map["state"] != null){
if ($ldap_map['state'] != null) {
$user->state = $item['state'];
}
if($ldap_map["country"] != null){
if ($ldap_map['country'] != null) {
$user->country = $item['country'];
}
if($ldap_map["zip"] != null){
if ($ldap_map['zip'] != null) {
$user->zip = $item['zip'];
}
if($ldap_map["dept"] != null){
if ($ldap_map['dept'] != null) {
$user->department_id = $department->id;
}
if($ldap_map["location"] != null){
if ($ldap_map['location'] != null) {
$user->location_id = $location?->id;
}
if($ldap_map["manager"] != null){
if($item['manager'] != null) {
if ($ldap_map['manager'] != null) {
if ($item['manager'] != null) {
// Check Cache first
if (isset($manager_cache[$item['manager']])) {
// found in cache; use that and avoid extra lookups
@@ -350,23 +355,23 @@ class LdapSync extends Command
try {
$ldap_manager = Ldap::findLdapUsers($item['manager'], -1, $this->option('filter'));
} catch (\Exception $e) {
Log::warning("Manager lookup caused an exception: " . $e->getMessage() . ". Falling back to direct username lookup");
Log::warning('Manager lookup caused an exception: '.$e->getMessage().'. Falling back to direct username lookup');
// Hail-mary for Okta manager 'shortnames' - will only work if
// Okta configuration is using full email-address-style usernames
$ldap_manager = [
"count" => 1,
'count' => 1,
0 => [
$ldap_map["username"] => [$item['manager']]
]
$ldap_map['username'] => [$item['manager']],
],
];
}
$add_manager_to_cache = true;
if ($ldap_manager["count"] > 0) {
if ($ldap_manager['count'] > 0) {
try {
// Get the Manager's username
// PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array.
$ldapManagerUsername = $ldap_manager[0][$ldap_map["username"]][0];
$ldapManagerUsername = $ldap_manager[0][$ldap_map['username']][0];
// Get User from Manager username.
$ldap_manager = User::where('username', $ldapManagerUsername)->first();
@@ -377,11 +382,11 @@ class LdapSync extends Command
}
} catch (\Exception $e) {
$add_manager_to_cache = false;
\Log::warning('Handling ldap manager ' . $item['manager'] . ' caused an exception: ' . $e->getMessage() . '. Continuing synchronization.');
\Log::warning('Handling ldap manager '.$item['manager'].' caused an exception: '.$e->getMessage().'. Continuing synchronization.');
}
}
if ($add_manager_to_cache) {
$manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed'
$manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed'
}
}
@@ -389,18 +394,18 @@ class LdapSync extends Command
}
// Sync activated state for Active Directory.
if (!empty($ldap_map["active_flag"])) { // IF we have an 'active' flag set....
if (! empty($ldap_map['active_flag'])) { // IF we have an 'active' flag set....
// ....then *most* things that are truthy will activate the user. Anything falsey will deactivate them.
// (Specifically, we don't handle a value of '0.0' correctly)
$raw_value = @$results[$i][$ldap_map["active_flag"]][0];
$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;
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);
} else {
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
}
@@ -408,7 +413,6 @@ class LdapSync extends Command
// ....otherwise, (ie if no 'active' LDAP flag is defined), IF the UAC setting exists,
// ....then use the UAC setting on the account to determine can-log-in vs. cannot-log-in
/* The following is _probably_ the correct logic, but we can't use it because
some users may have been dependent upon the previous behavior, and this
could cause additional access to be available to users they don't want
@@ -434,7 +438,7 @@ class LdapSync extends Command
'262688', // 0x40220 NORMAL_ACCOUNT, PASSWD_NOTREQD, SMARTCARD_REQUIRED
'328192', // 0x50200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'328224', // 0x50220 NORMAL_ACCOUNT, PASSWD_NOT_REQD, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'4194816',// 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH
'4194816', // 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH
'4260352', // 0x410200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, DONT_REQ_PREAUTH
'1049088', // 0x100200 NORMAL_ACCOUNT, NOT_DELEGATED
'1114624', // 0x110200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, NOT_DELEGATED,
@@ -445,14 +449,13 @@ class LdapSync extends Command
} /* implied 'else' here - leave the $user->activated flag alone. Newly-created accounts will be active.
already-existing accounts will be however the administrator has set them */
if ($item['ldap_location_override'] == true) {
$user->location_id = $item['location_id'];
} elseif ((isset($location)) && (!empty($location))) {
} elseif ((isset($location)) && (! empty($location))) {
if ((is_array($location)) && (array_key_exists('id', $location))) {
$user->location_id = $location['id'];
} elseif (is_object($location)) {
$user->location_id = $location->id; //THIS is the magic line, this should do it.
$user->location_id = $location->id; // THIS is the magic line, this should do it.
}
}
// TODO - should we be NULLING locations if $location is really `null`, and that's what we came up with?
@@ -464,16 +467,17 @@ class LdapSync extends Command
$errors = '';
if ($user->save()) {
$item['id'] = $user->id;
$item['note'] = $item['createorupdate'];
$item['status'] = 'success';
if ($item['createorupdate'] === 'created' && $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);
// 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
// updates assets location based on user's location
if ($user->wasChanged('location_id')) {
foreach ($user->assets as $asset) {
$asset->location_id = $user->location_id;
@@ -493,6 +497,41 @@ class LdapSync extends Command
array_push($summary, $item);
}
// Optionally soft-delete LDAP-imported users that are no longer present in LDAP.
// users with assests etc. are not deletable and skipped
if ($this->option('delete')) {
$missing_ldap_users = User::where('ldap_import', 1);
$missing_ldap_users = $missing_ldap_users->whereNotIn('username', $seen_ldap_usernames);
$missing_ldap_users = $missing_ldap_users->get();
foreach ($missing_ldap_users as $missing_user) {
$is_deletable = $this->isUserDeletable($missing_user);
$missing_item = [
'id' => $missing_user->id,
'username' => $missing_user->username,
'firstname' => $missing_user->first_name,
'lastname' => $missing_user->last_name,
'email' => $missing_user->email,
'createorupdate' => 'skipped',
'status' => 'info',
'deletable' => $is_deletable,
'note' => $is_deletable ? 'missing from LDAP' : 'missing from LDAP, but not deletable',
];
if ($is_deletable) {
$missing_user->delete();
$missing_item['createorupdate'] = 'deleted';
$missing_item['status'] = 'success';
$missing_item['note'] = 'deleted_missing_from_ldap';
}
$summary[] = $missing_item;
}
}
if ($this->option('summary')) {
for ($x = 0; $x < count($summary); $x++) {
if ($summary[$x]['status'] == 'error') {
@@ -508,4 +547,23 @@ class LdapSync extends Command
return $summary;
}
}
/**
* Checks if the user is deletable without gate check
*
* A user is considered deletable if they have no associated assets, accessories, licenses, consumables, managed users, or managed locations.
*
* @param User $user The user to check
*
* @return bool True if the user is deletable, false otherwise
*/
private function isUserDeletable(User $user): bool
{
return (($user->assets_count ?? $user->assets()->count()) === 0)
&& (($user->accessories_count ?? $user->accessories()->count()) === 0)
&& (($user->licenses_count ?? $user->licenses()->count()) === 0)
&& (($user->consumables_count ?? $user->consumables()->count()) === 0)
&& (($user->manages_users_count ?? $user->managesUsers()->count()) === 0)
&& (($user->manages_locations_count ?? $user->managedLocations()->count()) === 0);
}
}
+224 -201
View File
@@ -2,29 +2,32 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Ldap;
use App\Models\Setting;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Crypt;
use App\Models\Ldap;
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return bool true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
// $range is in IP/CIDR format eg 127.0.0.1/24
list( $range, $netmask ) = explode( '/', $range, 2 );
$range_decimal = ip2long( $range );
$ip_decimal = ip2long( $ip );
$wildcard_decimal = pow( 2, ( 32 - $netmask ) ) - 1;
$netmask_decimal = ~ $wildcard_decimal;
return ( ( $ip_decimal & $netmask_decimal ) == ( $range_decimal & $netmask_decimal ) );
function ip_in_range($ip, $range)
{
if (strpos($range, '/') == false) {
$range .= '/32';
}
// $range is in IP/CIDR format eg 127.0.0.1/24
[$range, $netmask] = explode('/', $range, 2);
$range_decimal = ip2long($range);
$ip_decimal = ip2long($ip);
$wildcard_decimal = pow(2, (32 - $netmask)) - 1;
$netmask_decimal = ~$wildcard_decimal;
return ($ip_decimal & $netmask_decimal) == ($range_decimal & $netmask_decimal);
}
// NOTE - this function was shamelessly stolen from this gist: https://gist.github.com/tott/7684443
@@ -33,10 +36,10 @@ function ip_in_range( $ip, $range ) {
*/
function parenthesized_filter($filter)
{
if(substr($filter,0,1) == "(" ) {
if (substr($filter, 0, 1) == '(') {
return $filter;
} else {
return "(".$filter.")";
return '('.$filter.')';
}
}
@@ -74,41 +77,44 @@ class LdapTroubleshooter extends Command
/**
* Output something *only* if debug is enabled
*
*
* @return void
*/
public function debugout($string)
{
if($this->option('debug')) {
if ($this->option('debug')) {
$this->line($string);
}
}
/**
* Clean the results from ldap_get_entries into something useful
* @param array $array
*
* @param array $array
* @return array
*/
public function ldap_results_cleaner ($array) {
public function ldap_results_cleaner($array)
{
$cleaned = [];
for($i = 0; $i < $array['count']; $i++) {
for ($i = 0; $i < $array['count']; $i++) {
$row = $array[$i];
$clean_row = [];
foreach($row AS $key => $val ) {
$this->debugout("Key is: ".$key);
if($key == "count" || is_int($key) || $key == "dn") {
foreach ($row as $key => $val) {
$this->debugout('Key is: '.$key);
if ($key == 'count' || is_int($key) || $key == 'dn') {
$this->debugout(" and we're gonna skip it\n");
continue;
}
$this->debugout(" And that seems fine.\n");
if(array_key_exists('count',$val)) {
if($val['count'] == 1) {
if (array_key_exists('count', $val)) {
if ($val['count'] == 1) {
$clean_row[$key] = $val[0];
} else {
unset($val['count']); //these counts are annoying
unset($val['count']); // these counts are annoying
$elements = [];
foreach($val as $entry) {
if(isset($ldap_constants[$entry])) {
foreach ($val as $entry) {
if (isset($ldap_constants[$entry])) {
$elements[] = $ldap_constants[$entry];
} else {
$elements[] = $entry;
@@ -122,6 +128,7 @@ class LdapTroubleshooter extends Command
}
$cleaned[$i] = $clean_row;
}
return $cleaned;
}
@@ -132,58 +139,58 @@ class LdapTroubleshooter extends Command
*/
public function handle()
{
if($this->option('trace')) {
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);
if ($this->option('trace')) {
ldap_set_option(null, LDAP_OPT_DEBUG_LEVEL, 7);
}
$settings = Setting::getSettings();
$this->settings = $settings;
if($this->option('ldap-search')) {
if(!$this->option('force')) {
if ($this->option('ldap-search')) {
if (! $this->option('force')) {
$confirmation = $this->confirm('WARNING: This command will display your LDAP password on your terminal. Are you sure this is ok?');
if(!$confirmation) {
if (! $confirmation) {
$this->error('ABORTING');
exit(-1);
}
}
$output = [];
if($settings->ldap_server_cert_ignore) {
$this->line("# Ignoring server certificate validity");
$output[] = "LDAPTLS_REQCERT=never";
if ($settings->ldap_server_cert_ignore) {
$this->line('# Ignoring server certificate validity');
$output[] = 'LDAPTLS_REQCERT=never';
}
if($settings->ldap_client_tls_cert && $settings->ldap_client_tls_key) {
$this->line("# Adding LDAP Client Certificate and Key");
$output[] = "LDAPTLS_CERT=storage/ldap_client_tls.cert";
$output[] = "LDAPTLS_KEY=storage/ldap_client_tls.key";
if ($settings->ldap_client_tls_cert && $settings->ldap_client_tls_key) {
$this->line('# Adding LDAP Client Certificate and Key');
$output[] = 'LDAPTLS_CERT=storage/ldap_client_tls.cert';
$output[] = 'LDAPTLS_KEY=storage/ldap_client_tls.key';
}
$output[] = "ldapsearch";
$output[] = "-H ".$settings->ldap_server;
$output[] = "-x";
$output[] = "-b ".escapeshellarg($settings->ldap_basedn);
$output[] = "-D ".escapeshellarg($settings->ldap_uname);
$output[] = 'ldapsearch';
$output[] = '-H '.$settings->ldap_server;
$output[] = '-x';
$output[] = '-b '.escapeshellarg($settings->ldap_basedn);
$output[] = '-D '.escapeshellarg($settings->ldap_uname);
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
} catch (Exception $e) {
$this->warn('Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.');
exit(0);
}
$output[] = "-w ". escapeshellarg($w);
$output[] = '-w '.escapeshellarg($w);
$output[] = escapeshellarg(parenthesized_filter($settings->ldap_filter));
if($settings->ldap_tls) {
$this->line("# adding STARTTLS option");
$output[] = "-Z";
if ($settings->ldap_tls) {
$this->line('# adding STARTTLS option');
$output[] = '-Z';
}
$output[] = "-v";
$output[] = '-v';
$this->line("\n");
$this->line(implode(" \\\n",$output));
$this->line(implode(" \\\n", $output));
exit(0);
}
//PHP Version check for warning
// PHP Version check for warning
$php_version = phpversion();
list($major, $minor, $patch) = explode('.', $php_version);
[$major, $minor, $patch] = explode('.', $php_version);
if (
$major < 8 ||
($major == 8 && $minor < 3) ||
@@ -191,22 +198,22 @@ class LdapTroubleshooter extends Command
($major == 8 && $minor == 4 && $patch < 7)
) {
$this->warn("PHP Version: $php_version WARNING - Versions before 8.3.21 or 8.4.7 will return INCONSISTENT results!");
if (!$this->confirm("Are you sure you wish to continue?")) {
$this->warn("ABORTING");
if (! $this->confirm('Are you sure you wish to continue?')) {
$this->warn('ABORTING');
exit(-1);
}
}
if(!$this->option('force')) {
if (! $this->option('force')) {
$confirmation = $this->confirm('WARNING: This command will make several attempts to connect to your LDAP server. Are you sure this is ok?');
if(!$confirmation) {
if (! $confirmation) {
$this->error('ABORTING');
exit(-1);
}
}
//$this->line(print_r($settings,true));
$this->line("STAGE 1: Checking settings");
if(!$settings->ldap_enabled) {
// $this->line(print_r($settings,true));
$this->line('STAGE 1: Checking settings');
if (! $settings->ldap_enabled) {
$this->error("WARNING: Snipe-IT's LDAP setting is not turned on. (That may be OK if you're still trying to figure out settings)");
}
@@ -214,123 +221,126 @@ class LdapTroubleshooter extends Command
try {
$ldap_conn = ldap_connect($settings->ldap_server);
} catch (Exception $e) {
$this->error("WARNING: Exception caught when executing 'ldap_connect()' - ".$e->getMessage().". We will try to guess.");
$this->error("WARNING: Exception caught when executing 'ldap_connect()' - ".$e->getMessage().'. We will try to guess.');
}
if(!$ldap_conn) {
$this->error("WARNING: LDAP Server setting of: ".$settings->ldap_server." cannot be parsed. We will try to guess.");
//exit(-1);
if (! $ldap_conn) {
$this->error('WARNING: LDAP Server setting of: '.$settings->ldap_server.' cannot be parsed. We will try to guess.');
// exit(-1);
}
//since we never use $ldap_conn again, we don't have to ldap_unbind() it (it's not even connected, tbh - that only happens at bind-time)
// since we never use $ldap_conn again, we don't have to ldap_unbind() it (it's not even connected, tbh - that only happens at bind-time)
$parsed = parse_url($settings->ldap_server);
if(@$parsed['scheme'] != 'ldap' && @$parsed['scheme'] != 'ldaps') {
if (@$parsed['scheme'] != 'ldap' && @$parsed['scheme'] != 'ldaps') {
$this->error("WARNING: LDAP URL Scheme of '".@$parsed['scheme']."' is probably incorrect; should usually be ldap or ldaps");
}
if(!@$parsed['host']) {
$this->error("ERROR: Cannot determine hostname or IP from ldap URL: ".$settings->ldap_server.". ABORTING.");
if (! @$parsed['host']) {
$this->error('ERROR: Cannot determine hostname or IP from ldap URL: '.$settings->ldap_server.'. ABORTING.');
exit(-1);
} else {
$this->info("Determined LDAP hostname to be: ".$parsed['host']);
$this->info('Determined LDAP hostname to be: '.$parsed['host']);
}
$raw_ips = [];
if (inet_pton($parsed['host']) !== false) {
$this->line($parsed['host'] . " already looks like an address; skipping DNS lookup");
$this->line($parsed['host'].' already looks like an address; skipping DNS lookup');
$raw_ips[] = $parsed['host'];
} else {
$this->line("Performing DNS lookup of: " . $parsed['host']);
$this->line('Performing DNS lookup of: '.$parsed['host']);
$ips = dns_get_record($parsed['host']);
//$this->info("Host IP is: ".print_r($ips,true));
// $this->info("Host IP is: ".print_r($ips,true));
if (!$ips || count($ips) == 0) {
$this->error("ERROR: DNS lookup of host: " . $parsed['host'] . " has failed. ABORTING.");
if (! $ips || count($ips) == 0) {
$this->error('ERROR: DNS lookup of host: '.$parsed['host'].' has failed. ABORTING.');
exit(-1);
}
$this->debugout("IP's? " . print_r($ips, true));
$this->debugout("IP's? ".print_r($ips, true));
foreach ($ips as $ip) {
if (!isset($ip['ip'])) {
if (! isset($ip['ip'])) {
continue;
}
$raw_ips[] = $ip['ip'];
}
}
foreach ($raw_ips as $ip) {
if ($ip == "127.0.0.1") {
$this->error("WARNING: Using the localhost IP as the LDAP server. This is usually wrong");
if ($ip == '127.0.0.1') {
$this->error('WARNING: Using the localhost IP as the LDAP server. This is usually wrong');
}
if (ip_in_range($ip, '10.0.0.0/8') || ip_in_range($ip, '192.168.0.0/16') || ip_in_range($ip, '172.16.0.0/12')) {
$this->error("WARNING: Using an RFC1918 Private address for LDAP server. This may be correct, but it can be a problem if your Snipe-IT instance is not hosted on your private network");
$this->error('WARNING: Using an RFC1918 Private address for LDAP server. This may be correct, but it can be a problem if your Snipe-IT instance is not hosted on your private network');
}
}
$this->line("STAGE 2: Checking basic network connectivity");
$this->line('STAGE 2: Checking basic network connectivity');
$ports = [636, 389];
if(@$parsed['port'] && !in_array($parsed['port'],$ports)) {
if (@$parsed['port'] && ! in_array($parsed['port'], $ports)) {
$ports[] = $parsed['port'];
}
$open_ports=[];
foreach($ports as $port ) {
$open_ports = [];
foreach ($ports as $port) {
$errno = 0;
$errstr = '';
$timeout = 30.0;
$result = '';
$this->line("Attempting to connect to port: " . $port . " - may take up to $timeout seconds");
$this->line('Attempting to connect to port: '.$port." - may take up to $timeout seconds");
try {
$result = fsockopen($parsed['host'], $port, $errno, $errstr, 30.0);
} catch(Exception $e) {
$this->error("Exception: ".$e->getMessage());
} catch (Exception $e) {
$this->error('Exception: '.$e->getMessage());
}
if($result) {
$this->info("Success!");
if ($result) {
$this->info('Success!');
$open_ports[] = $port;
} else {
$this->error("WARNING: Cannot connect to port: $port - $errstr ($errno)");
}
}
if(count($open_ports) == 0) {
$this->error("ERROR - no open ports. ABORTING.");
if (count($open_ports) == 0) {
$this->error('ERROR - no open ports. ABORTING.');
exit(-1);
}
$this->line("STAGE 3: Determine encryption algorithm, if any");
$this->line('STAGE 3: Determine encryption algorithm, if any');
$ldap_urls = []; // [url, cert-check?, start_tls?]
$pretty_ldap_urls = [];
foreach($open_ports as $port) {
foreach ($open_ports as $port) {
$this->line("Trying TLS first for port $port");
$ldap_url = "ldaps://".$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url)) {
$ldap_url = 'ldaps://'.$parsed['host'].":$port";
if ($this->test_anonymous_bind($ldap_url)) {
$this->info("Anonymous bind succesful to $ldap_url!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [$ldap_url, "enabled", "n/a (no)"];
$ldap_urls[] = [$ldap_url, true, false];
$pretty_ldap_urls[] = [$ldap_url, 'enabled', 'n/a (no)'];
continue; // TODO - lots of copypasta in these if(test_anonymous_bind()) routines...
} else {
$this->error("WARNING: Failed to bind to $ldap_url - trying without certificate checks.");
}
if($this->test_anonymous_bind($ldap_url, false)) {
if ($this->test_anonymous_bind($ldap_url, false)) {
$this->info("Anonymous bind successful to $ldap_url with certificate-checks disabled");
$ldap_urls[] = [$ldap_url, false, false];
$pretty_ldap_urls[] = [$ldap_url, "DISABLED", "n/a (no)"];
$pretty_ldap_urls[] = [$ldap_url, 'DISABLED', 'n/a (no)'];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with certificate checks disabled. Trying unencrypted with STARTTLS");
}
// now switching to ldap:// URL's from ldaps://
$ldap_url = "ldap://".$parsed['host'].":$port";
$ldap_url = 'ldap://'.$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url, true, true)) {
if ($this->test_anonymous_bind($ldap_url, true, true)) {
$this->info("Plain connection to $ldap_url with STARTTLS succesful!");
$ldap_urls[] = [ $ldap_url, true, true ];
$pretty_ldap_urls[] = [$ldap_url, "enabled", "STARTTLS ENABLED"];
$ldap_urls[] = [$ldap_url, true, true];
$pretty_ldap_urls[] = [$ldap_url, 'enabled', 'STARTTLS ENABLED'];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled. Trying without certificate checks.");
@@ -339,224 +349,235 @@ class LdapTroubleshooter extends Command
if ($this->test_anonymous_bind($ldap_url, false, true)) {
$this->info("Plain connection to $ldap_url with STARTTLS and cert checks *disabled* successful!");
$ldap_urls[] = [$ldap_url, false, true];
$pretty_ldap_urls[] = [$ldap_url, "DISABLED", "STARTTLS ENABLED"];
$pretty_ldap_urls[] = [$ldap_url, 'DISABLED', 'STARTTLS ENABLED'];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled, and cert checks disabled. Trying without STARTTLS");
}
if($this->test_anonymous_bind($ldap_url)) {
if ($this->test_anonymous_bind($ldap_url)) {
$this->info("Plain connection to $ldap_url succesful!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [$ldap_url, "n/a", "starttls disabled"];
$ldap_urls[] = [$ldap_url, true, false];
$pretty_ldap_urls[] = [$ldap_url, 'n/a', 'starttls disabled'];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url. Giving up on port $port");
}
}
$this->debugout(print_r($ldap_urls,true));
$this->debugout(print_r($ldap_urls, true));
if(count($ldap_urls) > 0 ) {
if (count($ldap_urls) > 0) {
$this->debugout("Found working LDAP URL's: ");
foreach($ldap_urls as $ldap_url) { // TODO maybe do this as a $this->table() instead?
$this->debugout("LDAP URL: " . $ldap_url[0]);
$this->debugout($ldap_url[0] . ($ldap_url[1] ? " certificate checks enabled" : " certificate checks disabled") . ($ldap_url[2] ? " STARTTLS Enabled " : " STARTTLS Disabled"));
foreach ($ldap_urls as $ldap_url) { // TODO maybe do this as a $this->table() instead?
$this->debugout('LDAP URL: '.$ldap_url[0]);
$this->debugout($ldap_url[0].($ldap_url[1] ? ' certificate checks enabled' : ' certificate checks disabled').($ldap_url[2] ? ' STARTTLS Enabled ' : ' STARTTLS Disabled'));
}
$this->table(["URL", "Cert Checks?", "STARTTLS?"], $pretty_ldap_urls);
$this->table(['URL', 'Cert Checks?', 'STARTTLS?'], $pretty_ldap_urls);
} else {
$this->error("ERROR - no valid LDAP URL's available - ABORTING");
exit(1);
}
$this->line("STAGE 4: Test Administrative Bind for LDAP Sync");
foreach($ldap_urls AS $ldap_url) {
$this->line('STAGE 4: Test Administrative Bind for LDAP Sync');
foreach ($ldap_urls as $ldap_url) {
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
} catch (Exception $e) {
$this->warn('Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.');
exit(0);
}
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, $w);
}
$this->line("STAGE 5: Test BaseDN");
//grab all LDAP_ constants and fill up a reversed array mapping from weird LDAP dotted-strings to (Constant Name)
$this->line('STAGE 5: Test BaseDN');
// grab all LDAP_ constants and fill up a reversed array mapping from weird LDAP dotted-strings to (Constant Name)
$all_defined_constants = get_defined_constants();
$ldap_constants = [];
foreach($all_defined_constants AS $key => $val) {
if(starts_with($key,"LDAP_") && is_string($val)) {
foreach ($all_defined_constants as $key => $val) {
if (starts_with($key, 'LDAP_') && is_string($val)) {
$ldap_constants[$val] = $key; // INVERT the meaning here!
}
}
$this->debugout("LDAP constants are: ".print_r($ldap_constants,true));
$this->debugout('LDAP constants are: '.print_r($ldap_constants, true));
foreach($ldap_urls AS $ldap_url) {
foreach ($ldap_urls as $ldap_url) {
try {
$w = Crypt::Decrypt($settings->ldap_pword);
} catch (\Exception $e) {
$this->warn("Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.");
} catch (Exception $e) {
$this->warn('Could not decrypt password. This usually means an LDAP password was not set or the APP_KEY was changed since the LDAP pasword was last saved. Aborting.');
exit(0);
}
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,$w,$settings)) {
$this->info("Success getting informational bind!");
if ($this->test_informational_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, $w, $settings)) {
$this->info('Success getting informational bind!');
} else {
$this->error("Unable to get information from bind.");
$this->error('Unable to get information from bind.');
}
}
$this->line("STAGE 6: Test LDAP Login to Snipe-IT");
foreach($ldap_urls AS $ldap_url) {
$this->line("Starting auth to " . $ldap_url[0]);
while(true) {
$with_tls = $ldap_url[1] ? "with": "without";
$with_startssl = $ldap_url[2] ? "using": "not using";
if(!$this->confirm('Do you wish to try to authenticate to this directory: '.$ldap_url[0]." $with_tls TLS and $with_startssl STARTSSL?")) {
$this->line('STAGE 6: Test LDAP Login to Snipe-IT');
foreach ($ldap_urls as $ldap_url) {
$this->line('Starting auth to '.$ldap_url[0]);
while (true) {
$with_tls = $ldap_url[1] ? 'with' : 'without';
$with_startssl = $ldap_url[2] ? 'using' : 'not using';
if (! $this->confirm('Do you wish to try to authenticate to this directory: '.$ldap_url[0]." $with_tls TLS and $with_startssl STARTSSL?")) {
break;
}
$username = $this->ask("Username");
$password = $this->secret("Password");
$username = $this->ask('Username');
$password = $this->secret('Password');
$results = $this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $username, $password); // FIXME - should do some other stuff here, maybe with the concatenating or something? maybe? and/or should put up some results?
if ($results) {
$this->info("Success authenticating with " . $username);
$this->info('Success authenticating with '.$username);
} else {
$this->error("Unable to authenticate with " . $username);
$this->error('Unable to authenticate with '.$username);
}
}
}
$this->info("LDAP TROUBLESHOOTING COMPLETE!");
$this->info('LDAP TROUBLESHOOTING COMPLETE!');
}
public function connect_to_ldap($ldap_url, $check_cert, $start_tls)
public function connect_to_ldap($ldap_url, $check_cert, $start_tls)
{
if ($check_cert) {
$this->line("we *ARE* checking certs");
$this->line('we *ARE* checking certs');
Ldap::ignoreCertificates(false);
} else {
$this->line("we are IGNORING certs");
$this->line('we are IGNORING certs');
Ldap::ignoreCertificates(true);
}
$lconn = ldap_connect($ldap_url);
ldap_set_option($lconn, LDAP_OPT_PROTOCOL_VERSION, 3); // should we 'test' different protocol versions here? Does anyone even use anything other than LDAPv3?
// no - it's formally deprecated: https://tools.ietf.org/html/rfc3494
if($this->settings->ldap_client_tls_cert && $this->settings->ldap_client_tls_key) {
// no - it's formally deprecated: https://tools.ietf.org/html/rfc3494
if ($this->settings->ldap_client_tls_cert && $this->settings->ldap_client_tls_key) {
// client-side TLS certificate support for LDAP (Google Secure LDAP)
putenv('LDAPTLS_CERT=storage/ldap_client_tls.cert');
putenv('LDAPTLS_KEY=storage/ldap_client_tls.key');
}
if($start_tls) {
if(!ldap_start_tls($lconn)) {
$this->error("WARNING: Unable to start TLS");
if ($start_tls) {
if (! ldap_start_tls($lconn)) {
$this->error('WARNING: Unable to start TLS');
return false;
}
}
if(!$lconn) {
$this->error("WARNING: Failed to generate connection string - using: ".$ldap_url);
if (! $lconn) {
$this->error('WARNING: Failed to generate connection string - using: '.$ldap_url);
return false;
}
$net = ldap_set_option($lconn, LDAP_OPT_NETWORK_TIMEOUT, $this->option('timeout'));
$time = ldap_set_option($lconn, LDAP_OPT_TIMELIMIT, $this->option('timeout'));
if(!$net || !$time) {
$this->error("Unable to set timeouts!");
if (! $net || ! $time) {
$this->error('Unable to set timeouts!');
}
return $lconn;
}
public function test_anonymous_bind($ldap_url, $check_cert = true, $start_tls = false)
{
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert , $start_tls) {
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls) {
try {
$lconn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$this->line("Attempting to bind now, this can take a while if we mess it up");
$this->line('Attempting to bind now, this can take a while if we mess it up');
$bind_results = ldap_bind($lconn);
$this->line("Bind results are: " . $bind_results . " which translate into boolean: " . (bool)$bind_results);
$this->line('Bind results are: '.$bind_results.' which translate into boolean: '.(bool) $bind_results);
ldap_close($lconn);
return (bool)$bind_results;
return (bool) $bind_results;
} catch (Exception $e) {
$this->error("WARNING: Exception caught during bind - ".$e->getMessage());
$this->error('WARNING: Exception caught during bind - '.$e->getMessage());
return false;
}
});
}
public function test_authed_bind($ldap_url, $check_cert, $start_tls, $username, $password)
public function test_authed_bind($ldap_url, $check_cert, $start_tls, $username, $password)
{
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls, $username, $password) {
try {
$lconn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$bind_results = ldap_bind($lconn, $username, $password);
ldap_close($lconn);
if(!$bind_results) {
if (! $bind_results) {
$this->error("WARNING: Failed to bind to $ldap_url as $username");
return false;
} else {
$this->info("SUCCESS - Able to bind to $ldap_url as $username");
return (bool)$lconn;
return (bool) $lconn;
}
} catch (Exception $e) {
$this->error("WARNING: Exception caught during Authed bind to $username - ".$e->getMessage());
return false;
}
});
}
public function test_informational_bind($ldap_url, $check_cert, $start_tls, $username, $password,$settings)
public function test_informational_bind($ldap_url, $check_cert, $start_tls, $username, $password, $settings)
{
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls, $username, $password, $settings) {
try { // TODO - copypasta'ed from test_authed_bind
$conn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$bind_results = ldap_bind($conn, $username, $password);
if(!$bind_results) {
if (! $bind_results) {
$this->error("WARNING: Failed to bind to $ldap_url as $username");
return false;
}
$this->info("SUCCESS - Able to bind to $ldap_url as $username");
$cleaned_results = [];
try {
// This _may_ only work for Active Directory?
$result = ldap_read($conn, '', '(objectClass=*)'/* , ['supportedControl']*/);
$result = ldap_read($conn, '', '(objectClass=*)'/* , ['supportedControl'] */);
$results = ldap_get_entries($conn, $result);
$cleaned_results = $this->ldap_results_cleaner($results);
//$this->line(print_r($cleaned_results,true));
// $this->line(print_r($cleaned_results,true));
$default_naming_contexts = $cleaned_results[0]['namingcontexts'];
$this->info("Default Naming Contexts:");
$this->info(implode(", ", $default_naming_contexts));
//okay, great - now how do we display those results? I have no idea.
} catch (\Exception $e) {
$this->info('Default Naming Contexts:');
$this->info(implode(', ', $default_naming_contexts));
// okay, great - now how do we display those results? I have no idea.
} catch (Exception $e) {
$this->error("Unable to get base naming contexts - here's what we *did* get:");
$this->line(print_r($cleaned_results, true));
}
// I don't see why this throws an Exception for Google LDAP, but I guess we ought to try and catch it?
$this->debugout("I guess we're trying to do the ldap search here, but sometimes it takes too long?");
$this->debugout("Base DN is: ".$settings->ldap_basedn." and filter is: ".parenthesized_filter($settings->ldap_filter));
$this->debugout('Base DN is: '.$settings->ldap_basedn.' and filter is: '.parenthesized_filter($settings->ldap_filter));
$search_results = ldap_search($conn, $settings->ldap_basedn, parenthesized_filter($settings->ldap_filter));
$entries = ldap_get_entries($conn, $search_results);
$this->info("Printing first 10 results: ");
$this->info('Printing first 10 results: ');
$pretty_data = array_slice($this->ldap_results_cleaner($entries), 0, 10);
//print_r($data);
// print_r($data);
$headers = [];
foreach ($pretty_data as $row) {
//populate headers
// populate headers
foreach ($row as $key => $value) {
//skip objectsid and objectguid because it junks up output
if ($key == "objectsid" || $key == "objectguid") {
// skip objectsid and objectguid because it junks up output
if ($key == 'objectsid' || $key == 'objectguid') {
continue;
}
if (!in_array($key, $headers)) {
if (! in_array($key, $headers)) {
$headers[] = $key;
}
}
}
$table = [];
//repeat again to populate table
// repeat again to populate table
foreach ($pretty_data as $row) {
$newrow = [];
foreach ($headers as $header) {
if (is_array(@$row[$header])) {
$newrow[] = "[" . implode(", ", $row[$header]) . "]";
$newrow[] = '['.implode(', ', $row[$header]).']';
} else {
$newrow[] = @$row[$header];
}
@@ -565,8 +586,9 @@ class LdapTroubleshooter extends Command
}
$this->table($headers, $table);
} catch (\Exception $e) {
} catch (Exception $e) {
$this->error("WARNING: Exception caught during Authed bind to $username - ".$e->getMessage());
return false;
} finally {
ldap_close($conn);
@@ -575,53 +597,54 @@ class LdapTroubleshooter extends Command
}
/***********************************************
*
* This function executes $function - which is expected to be some kind of executable function -
*
* This function executes $function - which is expected to be some kind of executable function -
* with a timeout set. It respects the timeout by forking execution and setting a strict timer
* for which to get back a SIGUSR1 or SIGUSR2 signal from the forked process.
*
*
***********************************************/
private function timed_boolean_execute($function)
{
if(!(function_exists('pcntl_sigtimedwait') && function_exists('posix_getpid') && function_exists('pcntl_fork') && function_exists('posix_kill') && function_exists('pcntl_wifsignaled'))) {
if (! (function_exists('pcntl_sigtimedwait') && function_exists('posix_getpid') && function_exists('pcntl_fork') && function_exists('posix_kill') && function_exists('pcntl_wifsignaled'))) {
// POSIX functions needed for forking aren't present, just run the function inline (ignoring timeout)
$this->line('WARNING: Unable to execute POSIX fork() commands, timeout may not be respected');
return $function();
} else {
$parent_pid = posix_getpid();
$pid = pcntl_fork();
switch($pid) {
switch ($pid) {
case 0:
//we're the 'child'
if($function()) {
//SUCCESS = SIGUSR1
// we're the 'child'
if ($function()) {
// SUCCESS = SIGUSR1
posix_kill($parent_pid, SIGUSR1);
} else {
//FAILURE = SIGUSR2
// FAILURE = SIGUSR2
posix_kill($parent_pid, SIGUSR2);
}
exit();
break; //yes I know we don't need it.
break; // yes I know we don't need it.
case -1:
//couldn't fork
$this->error("COULD NOT FORK - assuming failure");
// couldn't fork
$this->error('COULD NOT FORK - assuming failure');
return false;
break; //I still know that we don't need it
break; // I still know that we don't need it
default:
//we remain the 'parent', $pid is the PID of the forked process.
// we remain the 'parent', $pid is the PID of the forked process.
$siginfo = [];
$exit_status = pcntl_sigtimedwait ([SIGUSR1, SIGUSR2], $siginfo, $this->option('timeout'));
$exit_status = pcntl_sigtimedwait([SIGUSR1, SIGUSR2], $siginfo, $this->option('timeout'));
if ($exit_status == SIGUSR1) {
return true;
} else {
posix_kill($pid, SIGKILL); //make sure we don't have processes hanging around that might try and send signals during later executions, confusing us
posix_kill($pid, SIGKILL); // make sure we don't have processes hanging around that might try and send signals during later executions, confusing us
return false;
}
break; //Yeah I get it already, shush.
break; // Yeah I get it already, shush.
}
}
}
}
@@ -44,19 +44,15 @@ class MergeUsersByUsername extends Command
$users = User::where('username', 'LIKE', '%@%')->whereNull('deleted_at')->get();
$this->info($users->count().' total non-deleted users whose usernames contain a @ symbol.');
foreach ($users as $user) {
$parts = explode('@', trim($user->username));
$this->info('Checking against username '.trim($parts[0]).'.');
$bad_users = User::where('username', '=', trim($parts[0]))
->whereNull('deleted_at')
->with('assets', 'manager', 'userlog', 'licenses', 'consumables', 'accessories', 'managedLocations','uploads', 'acceptances')
->with('assets', 'manager', 'userlog', 'licenses', 'consumables', 'accessories', 'managedLocations', 'uploads', 'acceptances')
->get();
foreach ($bad_users as $bad_user) {
$this->info($bad_user->username.' ('.$bad_user->id.') will be merged into '.$user->username.' ('.$user->id.') ');
@@ -125,7 +121,6 @@ class MergeUsersByUsername extends Command
event(new UserMerged($bad_user, $user, null));
}
}
}
@@ -0,0 +1,73 @@
<?php
namespace App\Console\Commands;
use App\Enums\ActionType;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class MigrateLicenseSeatQuantitiesInActionLogs extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:migrate-license-seat-quantities-in-action-logs
{--no-interaction: Do not ask any interactive question}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Updates quantity field in action_logs table for license seats that were added or deleted.';
/**
* Execute the console command.
*/
public function handle()
{
$query = DB::table('action_logs')
->whereIn('action_type', [
ActionType::AddSeats->value,
ActionType::DeleteSeats->value,
])
->where('quantity', '=', 1)
->orderBy('id');
$count = $query->count();
if ($count === 0) {
$this->info('Nothing to update');
return 0;
}
$this->info("{$count} logs to update");
if ($this->option('no-interaction') || $this->confirm('Update quantities in the action log?')) {
$query->chunk(50, function ($logs) {
$logs->each(function ($log) {
$quantityFromNote = Str::between($log->note, 'ed ', ' seats');
if (! is_numeric($quantityFromNote)) {
$this->error('Could not parse quantity from ID: {id}', ['id' => $log->id]);
}
if ($log->quantity !== (int) $quantityFromNote) {
$this->info(vsprintf('Updating id: %s to quantity %s', [
'id' => $log->id,
'new_quantity' => $quantityFromNote,
]));
DB::table('action_logs')->where('id', $log->id)->update(['quantity' => (int) $quantityFromNote]);
}
});
});
}
return 0;
}
}
+41 -45
View File
@@ -3,8 +3,8 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
class MoveUploadsToNewDisk extends Command
{
@@ -47,30 +47,29 @@ class MoveUploadsToNewDisk extends Command
}
$delete_local = $this->argument('delete_local');
$public_uploads['accessories'] = glob('public/uploads/accessories'."/*.*");
$public_uploads['assets'] = glob('public/uploads/assets'."/*.*");
$public_uploads['avatars'] = glob('public/uploads/avatars'."/*.*");
$public_uploads['categories'] = glob('public/uploads/categories'."/*.*");
$public_uploads['companies'] = glob('public/uploads/companies'."/*.*");
$public_uploads['components'] = glob('public/uploads/components'."/*.*");
$public_uploads['consumables'] = glob('public/uploads/consumables'."/*.*");
$public_uploads['departments'] = glob('public/uploads/departments'."/*.*");
$public_uploads['locations'] = glob('public/uploads/locations'."/*.*");
$public_uploads['manufacturers'] = glob('public/uploads/manufacturers'."/*.*");
$public_uploads['suppliers'] = glob('public/uploads/suppliers'."/*.*");
$public_uploads['assetmodels'] = glob('public/uploads/models'."/*.*");
$public_uploads['accessories'] = glob('public/uploads/accessories'.'/*.*');
$public_uploads['assets'] = glob('public/uploads/assets'.'/*.*');
$public_uploads['avatars'] = glob('public/uploads/avatars'.'/*.*');
$public_uploads['categories'] = glob('public/uploads/categories'.'/*.*');
$public_uploads['companies'] = glob('public/uploads/companies'.'/*.*');
$public_uploads['components'] = glob('public/uploads/components'.'/*.*');
$public_uploads['consumables'] = glob('public/uploads/consumables'.'/*.*');
$public_uploads['departments'] = glob('public/uploads/departments'.'/*.*');
$public_uploads['locations'] = glob('public/uploads/locations'.'/*.*');
$public_uploads['manufacturers'] = glob('public/uploads/manufacturers'.'/*.*');
$public_uploads['suppliers'] = glob('public/uploads/suppliers'.'/*.*');
$public_uploads['assetmodels'] = glob('public/uploads/models'.'/*.*');
// iterate files
foreach ($public_uploads as $public_type => $public_upload) {
$type_count = 0;
$this->info('- There are ' . count($public_upload) . ' PUBLIC ' . $public_type . ' files.');
$this->info('- There are '.count($public_upload).' PUBLIC '.$public_type.' files.');
for ($i = 0; $i < count($public_upload); $i++) {
$type_count++;
$filename = basename($public_upload[$i]);
try {
try {
Storage::disk('public')->put('uploads/'.$public_type.'/'.$filename, file_get_contents($public_upload[$i]));
$new_url = Storage::disk('public')->url('uploads/'.$public_type.'/'.$filename, $filename);
$this->info($type_count.'. PUBLIC: '.$filename.' was copied to '.$new_url);
@@ -81,49 +80,46 @@ class MoveUploadsToNewDisk extends Command
}
}
$logos = glob("public/uploads/setting*.*");
$this->info("- There are ".count($logos).' files that might be logos.');
$logos = glob('public/uploads/setting*.*');
$this->info('- There are '.count($logos).' files that might be logos.');
$type_count = 0;
foreach ($logos as $logo) {
$this->info($logo);
$type_count++;
$filename = basename($logo);
Storage::disk('public')->put('uploads/' . $filename, file_get_contents($logo));
$this->info($type_count . '. LOGO: ' . $filename . ' was copied to ' . env('PUBLIC_AWS_URL') . '/uploads/' . $filename);
Storage::disk('public')->put('uploads/'.$filename, file_get_contents($logo));
$this->info($type_count.'. LOGO: '.$filename.' was copied to '.env('PUBLIC_AWS_URL').'/uploads/'.$filename);
}
$private_uploads['assets'] = glob('storage/private_uploads/assets'."/*.*");
$private_uploads['signatures'] = glob('storage/private_uploads/signatures'."/*.*");
$private_uploads['audits'] = glob('storage/private_uploads/audits'."/*.*");
$private_uploads['assetmodels'] = glob('storage/private_uploads/models'."/*.*");
$private_uploads['imports'] = glob('storage/private_uploads/imports'."/*.*");
$private_uploads['licenses'] = glob('storage/private_uploads/licenses'."/*.*");
$private_uploads['users'] = glob('storage/private_uploads/users'."/*.*");
$private_uploads['backups'] = glob('storage/private_uploads/backups'."/*.*");
$private_uploads['assets'] = glob('storage/private_uploads/assets'.'/*.*');
$private_uploads['signatures'] = glob('storage/private_uploads/signatures'.'/*.*');
$private_uploads['audits'] = glob('storage/private_uploads/audits'.'/*.*');
$private_uploads['assetmodels'] = glob('storage/private_uploads/models'.'/*.*');
$private_uploads['imports'] = glob('storage/private_uploads/imports'.'/*.*');
$private_uploads['licenses'] = glob('storage/private_uploads/licenses'.'/*.*');
$private_uploads['users'] = glob('storage/private_uploads/users'.'/*.*');
$private_uploads['backups'] = glob('storage/private_uploads/backups'.'/*.*');
foreach ($private_uploads as $private_type => $private_upload) {
{
$this->info('- There are ' . count($private_upload) . ' PRIVATE ' . $private_type . ' files.');
$type_count = 0;
for ($x = 0; $x < count($private_upload); $x++) {
$type_count++;
$filename = basename($private_upload[$x]);
$this->info('- There are '.count($private_upload).' PRIVATE '.$private_type.' files.');
try {
Storage::put($private_type . '/' . $filename, file_get_contents($private_upload[$i]));
$new_url = Storage::url($private_type . '/' . $filename, $filename);
$this->info($type_count . '. PRIVATE: ' . $filename . ' was copied to ' . $new_url);
} catch (\Exception $e) {
Log::debug($e);
$this->error($e);
}
$type_count = 0;
for ($x = 0; $x < count($private_upload); $x++) {
$type_count++;
$filename = basename($private_upload[$x]);
try {
Storage::put($private_type.'/'.$filename, file_get_contents($private_upload[$x]));
$new_url = Storage::url($private_type.'/'.$filename, $filename);
$this->info($type_count.'. PRIVATE: '.$filename.' was copied to '.$new_url);
} catch (\Exception $e) {
Log::debug($e);
$this->error($e);
}
}
if ($delete_local == 'true') {
$public_delete_count = 0;
$private_delete_count = 0;
@@ -160,7 +156,7 @@ class MoveUploadsToNewDisk extends Command
}
}
$this->info($public_delete_count . ' PUBLIC local files and ' . $private_delete_count . ' PRIVATE local files were deleted from your filesystem.');
$this->info($public_delete_count.' PUBLIC local files and '.$private_delete_count.' PRIVATE local files were deleted from your filesystem.');
}
}
}
+7 -7
View File
@@ -2,8 +2,8 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
use Illuminate\Console\Command;
class NormalizeUserNames extends Command
{
@@ -40,13 +40,13 @@ class NormalizeUserNames extends Command
{
$users = User::get();
$this->info($users->count() . ' users');
$this->info($users->count().' users');
foreach ($users as $user) {
$user->first_name = ucwords(strtolower($user->first_name));
$user->last_name = ucwords(strtolower($user->last_name));
$user->email = strtolower($user->email);
$user->save();
foreach ($users as $user) {
$user->first_name = ucwords(strtolower($user->first_name));
$user->last_name = ucwords(strtolower($user->last_name));
$user->email = strtolower($user->email);
$user->save();
}
}
}
+36 -24
View File
@@ -3,11 +3,10 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Illuminate\Support\Facades\Log;
use Symfony\Component\Console\Helper\ProgressIndicator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
/**
* Class ObjectImportCommand
@@ -33,6 +32,11 @@ class ObjectImportCommand extends Command
*/
protected ProgressIndicator $progressIndicator;
/**
* Logger instance with configurable log path
*/
protected $logger;
/**
* Create a new command instance.
*
@@ -50,24 +54,26 @@ class ObjectImportCommand extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); // 600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
$this->progressIndicator = new ProgressIndicator($this->output);
$filename = $this->argument('filename');
$class = title_case($this->option('item-type'));
$class = ucfirst($this->option('item-type'));
$classString = "App\\Importer\\{$class}Importer";
$importer = new $classString($filename);
$importer->setCallbacks([$this, 'log'], [$this, 'progress'], [$this, 'errorCallback'])
->setCreatedBy($this->option('user_id'))
->setUpdating($this->option('update'))
->setShouldNotify($this->option('send-welcome'))
->setUsernameFormat($this->option('username_format'));
->setCreatedBy($this->option('user_id'))
->setUpdating($this->option('update'))
->setShouldNotify($this->option('send-welcome'))
->setUsernameFormat($this->option('username_format'));
$this->logger = Log::build([
'driver' => 'single',
'path' => $this->option('logfile'),
]);
// This $logFile/useFiles() bit is currently broken, so commenting it out for now
// $logFile = $this->option('logfile');
// Log::useFiles($logFile);
$this->progressIndicator->start('======= Importing Items from '.$filename.' =========');
$importer->import();
@@ -92,17 +98,19 @@ class ObjectImportCommand extends Command
* If a warning message is passed, we'll spit it to the console as well.
*
* @author Daniel Melzter
*
* @since 3.0
* @param string $string
* @param string $level
*
* @param string $string
* @param string $level
*/
public function log($string, $level = 'info')
{
if ($level === 'warning') {
Log::warning($string);
$this->logger->warning($string);
$this->comment($string);
} else {
Log::Info($string);
$this->logger->Info($string);
if ($this->option('verbose')) {
$this->comment($string);
}
@@ -113,7 +121,9 @@ class ObjectImportCommand extends Command
* Get the console command arguments.
*
* @author Daniel Melzter
*
* @since 3.0
*
* @return array
*/
protected function getArguments()
@@ -127,20 +137,22 @@ class ObjectImportCommand extends Command
* Get the console command options.
*
* @author Daniel Melzter
*
* @since 3.0
*
* @return array
*/
protected function getOptions()
{
return [
['email_format', null, InputOption::VALUE_REQUIRED, 'The format of the email addresses that should be generated. Options are firstname.lastname, firstname, filastname', null],
['username_format', null, InputOption::VALUE_REQUIRED, 'The format of the username that should be generated. Options are firstname.lastname, firstname, filastname, email', null],
['logfile', null, InputOption::VALUE_REQUIRED, 'The path to log output to. storage/logs/importer.log by default', storage_path('logs/importer.log')],
['item-type', null, InputOption::VALUE_REQUIRED, 'Item Type To import. Valid Options are Asset, Consumable, Accessory, License, or User', 'Asset'],
['web-importer', null, InputOption::VALUE_NONE, 'Internal: packages output for use with the web importer'],
['user_id', null, InputOption::VALUE_REQUIRED, 'ID of user creating items', 1],
['update', null, InputOption::VALUE_NONE, 'If a matching item is found, update item information'],
['send-welcome', null, InputOption::VALUE_NONE, 'Whether to send a welcome email to any new users that are created.'],
['email_format', null, InputOption::VALUE_REQUIRED, 'The format of the email addresses that should be generated. Options are firstname.lastname, firstname, filastname', null],
['username_format', null, InputOption::VALUE_REQUIRED, 'The format of the username that should be generated. Options are firstname.lastname, firstname, filastname, email', null],
['logfile', null, InputOption::VALUE_REQUIRED, 'The path to log output to. storage/logs/importer.log by default', storage_path('logs/importer.log')],
['item-type', null, InputOption::VALUE_REQUIRED, 'Item Type To import. Valid Options are Asset, Consumable, Accessory, License, or User', 'Asset'],
['web-importer', null, InputOption::VALUE_NONE, 'Internal: packages output for use with the web importer'],
['user_id', null, InputOption::VALUE_REQUIRED, 'ID of user creating items', 1],
['update', null, InputOption::VALUE_NONE, 'If a matching item is found, update item information'],
['send-welcome', null, InputOption::VALUE_NONE, 'Whether to send a welcome email to any new users that are created.'],
];
}
}
+8 -9
View File
@@ -2,11 +2,10 @@
namespace App\Console\Commands;
use App\Models\Asset;
use App\Models\CustomField;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class PaveIt extends Command
{
@@ -42,9 +41,9 @@ class PaveIt extends Command
public function handle()
{
if (!$this->option('force')) {
if (! $this->option('force')) {
$confirmation = $this->confirm("\n****************************************************\nTHIS WILL DELETE ALL OF THE DATA IN YOUR DATABASE. \nThere is NO undo. This WILL destroy ALL of your data, \nINCLUDING ANY non-Snipe-IT tables you have in this database. \n****************************************************\n\nDo you wish to continue? No backsies! ");
if (!$confirmation) {
if (! $confirmation) {
$this->error('ABORTING');
exit(-1);
}
@@ -79,16 +78,16 @@ class PaveIt extends Command
foreach ($tables as $table_obj) {
$table = $table_obj['name'];
if (in_array($table, $except_tables)) {
$this->info($table. ' is SKIPPED.');
$this->info($table.' is SKIPPED.');
} else {
\DB::statement('truncate '.$table);
$this->info($table. ' is TRUNCATED.');
$this->info($table.' is TRUNCATED.');
}
}
// Leave in the demo oauth keys so we don't have to reset them every day in the demos
DB::statement('delete from oauth_clients WHERE id > 2');
DB::statement('delete from oauth_access_tokens WHERE user_id > 2');
}
}
}
+4 -4
View File
@@ -149,13 +149,13 @@ class Purge extends Command
$filenames = Actionlog::where('action_type', 'uploaded')
->where('item_id', $user->id)
->pluck('filename');
foreach($filenames as $filename) {
foreach ($filenames as $filename) {
try {
if (Storage::exists($rel_path . '/' . $filename)) {
Storage::delete($rel_path . '/' . $filename);
if (Storage::exists($rel_path.'/'.$filename)) {
Storage::delete($rel_path.'/'.$filename);
}
} catch (\Exception $e) {
Log::info('An error occurred while deleting files: ' . $e->getMessage());
Log::info('An error occurred while deleting files: '.$e->getMessage());
}
}
$this->info('- User "'.$user->username.'" deleted.');
+155
View File
@@ -0,0 +1,155 @@
<?php
namespace App\Console\Commands;
use App\Models\CheckoutAcceptance;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class PurgeEulaPDFs extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:purge-eula-pdfs
{--older-than-days= : The number of days we should delete before }
{--company-id= : Only purge acceptances for users in this company}
{--only-deleted-users : Only purge acceptances for deleted users, including soft-deleted or missing users}
{--force : Skip the interactive yes/no prompt for confirmation}
{--dryrun : Show the records that would be deleted but don\'t update the database or delete files from disk}
{--with-output : Display the results in a table in your console}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This purges signature files and EULAs from the system if they are older than the date passed with --older-than-days=.';
/**
* Execute the console command.
*/
public function handle()
{
$before = $this->option('older-than-days');
if (($before == '') || (! is_numeric($before))) {
return $this->error('ERROR: You must pass a valid number for --older-than-days (example: snipeit:purge-eula-pdfs --older-than-days=365.)');
}
$interval_date = Carbon::now()->subDays($before);
$signature_path = 'private_uploads/signatures/';
$eula_path = 'private_uploads/eula-pdfs/';
if (! Storage::exists($eula_path)) {
$this->fail('The storage directory "'.$eula_path.'" does not exist. No EULA files will be deleted.');
}
if (! Storage::exists($signature_path)) {
$this->fail('The storage directory "'.$signature_path.'" does not exist. No signature files will be deleted.');
}
if ($this->option('dryrun')) {
$this->info('This script is being run with the --dryrun option. No files or records will be deleted.');
}
$companyId = $this->option('company-id');
$query = CheckoutAcceptance::HasFiles()->where('updated_at', '<', $interval_date)
->with([
'assignedTo' => function ($query) {
$query->withTrashed();
},
]);
if ($this->option('only-deleted-users')) {
$query->where(function ($query) use ($companyId) {
$query->whereHas('assignedTo', function ($q) use ($companyId) {
$q->withTrashed()->whereNotNull('deleted_at');
if ($companyId) {
$q->where('company_id', $companyId);
}
});
$query->orWhereDoesntHave('assignedTo');
});
} else {
if ($companyId) {
$query->whereHas('assignedTo', function ($query) use ($companyId) {
$query->withTrashed()->where('company_id', $companyId);
});
}
}
$acceptances = $query->get();
if (! $this->option('force')) {
if ($this->confirm("\n****************************************************\nTHIS WILL DELETE ALL OF THE SIGNATURES AND EULA PDF FILES SINCE $interval_date. \nThere is NO undo! \n****************************************************\n\nDo you wish to continue? No backsies! [y|N]")) {
}
}
if ($acceptances->count() == 0) {
return $this->warn('There are no item acceptances with signatures or EULA PDFs from before '.$interval_date);
}
$this->info(number_format($acceptances->count()).' EULA PDFs from before '.$interval_date.' will be purged');
if (! $this->option('with-output')) {
$this->info('Run this command with the --with-output option to see the full list in the console.');
} else {
$this->table(
[
trans('general.user'),
trans('general.type'),
trans('general.item'),
trans('general.category'),
trans('general.accepted_date'),
trans('general.declined_date'),
trans('general.signature'),
trans('general.filename'),
],
$acceptances->map(fn ($acceptance) => [
trans('general.user') => $acceptance->assignedTo->display_name,
trans('general.type') => $acceptance->display_checkoutable_type,
trans('general.item') => $acceptance->checkoutable_type::find($acceptance->checkoutable_id)->display_name,
trans('general.category') => $acceptance->checkoutable_category_name,
trans('general.accepted_date') => $acceptance->accepted_at,
trans('general.declined_date') => $acceptance->declined_at,
trans('general.signature') => $acceptance->signature_filename,
trans('general.filename') => $acceptance->stored_eula_file,
])
);
}
foreach ($acceptances as $acceptance) {
$signature_file = $signature_path.$acceptance->signature_filename;
$eula_file = $eula_path.$acceptance->stored_eula_file;
if (Storage::exists($signature_file)) {
if (! $this->option('dryrun')) {
Storage::delete($signature_file);
}
} else {
$this->error('The file "'.$signature_file.'" does not exist.');
}
if (Storage::exists($eula_file)) {
if (! $this->option('dryrun')) {
Storage::delete($eula_file);
}
} else {
$this->error('The file "'.$eula_file.'" does not exist.');
}
if (! $this->option('dryrun')) {
$acceptance->delete();
}
}
}
}
@@ -82,10 +82,10 @@ class ReEncodeCustomFieldNames extends Command
if ($field->db_column == $field->convertUnicodeDbSlug() && \Schema::hasColumn('assets', $field->convertUnicodeDbSlug())) {
$this->info('-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.');
/**
* There is a mismatch between the fieldname on the assets table and
* what $field->convertUnicodeDbSlug() is *now* expecting.
*/
/**
* There is a mismatch between the fieldname on the assets table and
* what $field->convertUnicodeDbSlug() is *now* expecting.
*/
} else {
if ($field->db_column != $field->convertUnicodeDbSlug()) {
@@ -96,7 +96,6 @@ class ReEncodeCustomFieldNames extends Command
}
/** Make sure the custom_field_columns array has the ID */
if (array_key_exists($field->id, $custom_field_columns)) {
@@ -114,7 +113,6 @@ class ReEncodeCustomFieldNames extends Command
$field->db_column = $field->convertUnicodeDbSlug();
$field->save();
} else {
$this->warn('-- ✘ WARNING: There is no field on the assets table ending in '.$field->id.'. This may require more in-depth investigation and may mean the schema was altered manually.');
}
+1 -1
View File
@@ -4,8 +4,8 @@ namespace App\Console\Commands;
use App\Models\Asset;
use App\Models\Setting;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
class RegenerateAssetTags extends Command
{
+2 -2
View File
@@ -44,7 +44,7 @@ class RemoveExplicitEols extends Command
}
$endTime = microtime(true);
$executionTime = ($endTime - $startTime);
$this->info('Command executed in ' . round($executionTime, 2) . ' seconds.');
$this->info('Command executed in '.round($executionTime, 2).' seconds.');
}
private function updateAssets($assets)
@@ -55,6 +55,6 @@ class RemoveExplicitEols extends Command
$asset->save();
}
$this->info($assets->count() . ' Assets updated successfully');
$this->info($assets->count().' Assets updated successfully');
}
}
@@ -38,7 +38,7 @@ class RemoveInvalidUploadDeleteActionLogItems extends Command
return 0;
}
$this->table(['ID', 'Action Type', 'Item Type', 'Item ID', 'Created At', 'Deleted At'], $invalidLogs->map(fn($log) => [
$this->table(['ID', 'Action Type', 'Item Type', 'Item ID', 'Created At', 'Deleted At'], $invalidLogs->map(fn ($log) => [
$log->id,
$log->action_type,
$log->item_type,
@@ -48,7 +48,7 @@ class RemoveInvalidUploadDeleteActionLogItems extends Command
])->toArray());
if ($this->confirm("Do you wish to remove {$invalidLogs->count()} log items?")) {
$invalidLogs->each(fn($log) => $log->forceDelete());
$invalidLogs->each(fn ($log) => $log->forceDelete());
}
return 0;
+46 -6
View File
@@ -2,10 +2,10 @@
namespace App\Console\Commands;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class ResetDemoSettings extends Command
{
@@ -48,15 +48,17 @@ class ResetDemoSettings extends Command
$settings->auto_increment_assets = 1;
$settings->logo = 'snipe-logo.png';
$settings->alert_email = 'service@snipe-it.io';
$settings->login_note = 'Use `admin` / `password` to login to the demo.';
$settings->header_color = null;
$settings->login_note = "Use any of the following credentials to login to the demo:\n\n- `admin` / `password`\n- `assets` / `password`\n- `testuser` / `password`";
$settings->header_color = '#3c8dbc';
$settings->link_dark_color = '#5fa4cc';
$settings->link_light_color = '#296282;';
$settings->nav_link_color = '#FFFFFF';
$settings->label2_2d_type = 'QRCODE';
$settings->default_currency = 'USD';
$settings->brand = 2;
$settings->ldap_enabled = 0;
$settings->full_multiple_companies_support = 0;
$settings->label2_1d_type = 'C128';
$settings->skin = '';
$settings->email_domain = 'snipeitapp.com';
$settings->email_format = 'filastname';
$settings->username_format = 'filastname';
@@ -75,17 +77,55 @@ class ResetDemoSettings extends Command
$settings->saml_custom_settings = null;
$settings->default_avatar = 'default.png';
$settings->save();
if ($user = User::where('username', '=', 'admin')->first()) {
$user->locale = 'en-US';
$user->enable_confetti = 1;
$user->enable_sounds = 1;
$user->save();
}
$assetsUser = User::updateOrCreate(
['username' => 'assets'],
[
'first_name' => 'Assets',
'last_name' => 'User',
'password' => Hash::make('password'),
'activated' => 1,
]
);
$assetsUser->permissions = json_encode([
'assets.view' => 1,
'assets.create' => 1,
'assets.edit' => 1,
'assets.delete' => 1,
'assets.checkout' => 1,
'assets.checkin' => 1,
'assets.audit' => 1,
'assets.files' => 1,
'assets.view.requestable' => 1,
'assets.view.encrypted_custom_fields' => 1,
]);
$assetsUser->save();
$testUser = User::updateOrCreate(
['username' => 'testuser'],
[
'first_name' => 'Test',
'last_name' => 'User',
'password' => Hash::make('password'),
'activated' => 1,
]
);
$testUser->permissions = json_encode([
'self.checkout_assets' => 1,
'assets.view.requestable' => 1,
]);
$testUser->save();
\Storage::disk('public')->put('snipe-logo.png', file_get_contents(public_path('img/demo/snipe-logo.png')));
\Storage::disk('public')->put('snipe-logo-lg.png', file_get_contents(public_path('img/demo/snipe-logo-lg.png')));
}
}
+2 -2
View File
@@ -6,9 +6,9 @@ use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\License;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Illuminate\Console\Command;
class RestoreDeletedUsers extends Command
{
@@ -75,7 +75,7 @@ class RestoreDeletedUsers extends Command
DB::table('assets')
->where('id', $user_log->item_id)
->update(['assigned_to' => $user->id, 'assigned_type'=> User::class]);
->update(['assigned_to' => $user->id, 'assigned_type' => User::class]);
$this->info(' ** Asset '.$user_log->item->id.' ('.$user_log->item->asset_tag.') restored to user '.$user->id.'');
} elseif ($user_log->item_type == License::class) {
+122 -106
View File
@@ -2,14 +2,17 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use ZipArchive;
use Illuminate\Support\Facades\Log;
use enshrined\svgSanitize\Sanitizer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use ZipArchive;
class SQLStreamer {
class SQLStreamer
{
private $input;
private $output;
// embed the prefix here?
public ?string $prefix;
@@ -18,106 +21,112 @@ class SQLStreamer {
public static $buffer_size = 1024 * 1024; // use a 1MB buffer, ought to work fine for most cases?
public array $tablenames = [];
private bool $should_guess = false;
private bool $statement_is_permitted = false;
public function __construct($input, $output, string $prefix = null)
public function __construct($input, $output, ?string $prefix = null)
{
$this->input = $input;
$this->output = $output;
$this->prefix = $prefix;
}
public function parse_sql(string $line): string {
public function parse_sql(string $line): string
{
// take into account the 'start of line or not' setting as an instance variable?
// 'continuation' lines for a permitted statement are PERMITTED.
// remove *only* line-feeds & carriage-returns; helpful for regexes against lines from
// Windows dumps
$line = trim($line, "\r\n");
if($this->statement_is_permitted && $line[0] === ' ') {
return $line . "\n"; //re-add the newline
if ($this->statement_is_permitted && $line[0] === ' ') {
return $line."\n"; // re-add the newline
}
$table_regex = '`?([a-zA-Z0-9_]+)`?';
$allowed_statements = [
"/^(DROP TABLE (?:IF EXISTS )?)`$table_regex(.*)$/" => false,
"/^(CREATE TABLE )$table_regex(.*)$/" => true, //sets up 'continuation'
"/^(CREATE TABLE )$table_regex(.*)$/" => true, // sets up 'continuation'
"/^(LOCK TABLES )$table_regex(.*)$/" => false,
"/^(INSERT INTO )$table_regex(.*)$/" => false,
"/^UNLOCK TABLES/" => false,
'/^UNLOCK TABLES/' => false,
// "/^\\) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;/" => false, // FIXME not sure what to do here?
"/^\\)[a-zA-Z0-9_= ]*;$/" => false,
'/^\\)[a-zA-Z0-9_= ]*;$/' => false,
// ^^^^^^ that bit should *exit* the 'permitted' block
"/^\\(.*\\)[,;]$/" => false, //older MySQL dump style with one set of values per line
'/^\\(.*\\)[,;]$/' => false, // older MySQL dump style with one set of values per line
/* we *could* have made the ^INSERT INTO blah VALUES$ turn on the capturing state, and closed it with
a ^(blahblah);$ but it's cleaner to not have to manage the state machine. We're just going to
assume that (blahblah), or (blahblah); are values for INSERT and are always acceptable. */
"<^/\*!40101 SET NAMES '?[a-zA-Z0-9_-]+'? \*/;$>" => false, //using weird delimiters (<,>) for readability. allow quoted or unquoted charsets
"<^/\*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' \*/;$>" => false, //same, now handle zero-values
"<^/\*![0-9]{5} SET NAMES '?[a-zA-Z0-9_-]+'? \*/;$>" => false, // using weird delimiters (<,>) for readability. allow quoted or unquoted charsets
"<^/\*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' \*/;$>" => false, // same, now handle zero-values
];
foreach($allowed_statements as $statement => $statechange) {
// $this->info("Checking regex: $statement...\n");
foreach ($allowed_statements as $statement => $statechange) {
// $this->info("Checking regex: $statement...\n");
$matches = [];
if (preg_match($statement,$line,$matches)) {
if (preg_match($statement, $line, $matches)) {
$this->statement_is_permitted = $statechange;
// matches are: 1 => first part of the statement, 2 => tablename, 3 => rest of statement
// (with of course 0 being "the whole match")
if (@$matches[2]) {
// print "Found a tablename! It's: ".$matches[2]."\n";
// print "Found a tablename! It's: ".$matches[2]."\n";
if ($this->should_guess) {
@$this->tablenames[$matches[2]] += 1;
continue; //oh? FIXME
continue; // oh? FIXME
} else {
$cleaned_tablename = \DB::getTablePrefix().preg_replace('/^'.$this->prefix.'/','',$matches[2]);
$line = preg_replace($statement,'$1`'.$cleaned_tablename.'`$3' , $line);
$cleaned_tablename = \DB::getTablePrefix().preg_replace('/^'.$this->prefix.'/', '', $matches[2]);
$line = preg_replace($statement, '$1`'.$cleaned_tablename.'`$3', $line);
}
} else {
// no explicit tablename in this one, leave the line alone
}
//how do we *replace* the tablename?
// print "RETURNING LINE: $line";
return $line . "\n"; //re-add newline
// how do we *replace* the tablename?
// print "RETURNING LINE: $line";
return $line."\n"; // re-add newline
}
}
// all that is not allowed is denied.
return "";
return '';
}
//this is used in exactly *TWO* places, and in both cases should return a prefix I think?
// this is used in exactly *TWO* places, and in both cases should return a prefix I think?
// first - if you do the --sanitize-only one (which is mostly for testing/development)
// next - when you run *without* a guessed prefix, this is run first to figure out the prefix
// I think we have to *duplicate* the call to be able to run it again?
public static function guess_prefix($input):string
public static function guess_prefix($input): string
{
$parser = new self($input, null);
$parser->should_guess = true;
$parser->line_aware_piping(); // <----- THIS is doing the heavy lifting!
$check_tables = ['settings' => null, 'migrations' => null /* 'assets' => null */]; //TODO - move to statics?
//can't use 'users' because the 'accessories_checkout' table?
$check_tables = ['settings' => null, 'migrations' => null /* 'assets' => null */]; // TODO - move to statics?
// can't use 'users' because the 'accessories_checkout' table?
// can't use 'assets' because 'ver1_components_assets'
foreach($check_tables as $check_table => $_ignore) {
foreach ($check_tables as $check_table => $_ignore) {
foreach ($parser->tablenames as $tablename => $_count) {
// print "Comparing $tablename to $check_table\n";
if (str_ends_with($tablename,$check_table)) {
// print "Found one!\n";
$check_tables[$check_table] = substr($tablename,0,-strlen($check_table));
// print "Comparing $tablename to $check_table\n";
if (str_ends_with($tablename, $check_table)) {
// print "Found one!\n";
$check_tables[$check_table] = substr($tablename, 0, -strlen($check_table));
}
}
}
$guessed_prefix = null;
foreach ($check_tables as $clean_table => $prefix_guess) {
if(is_null($prefix_guess)) {
print("Couldn't find table $clean_table\n");
die();
if (is_null($prefix_guess)) {
echo "Couldn't find table $clean_table\n";
exit();
}
if(is_null($guessed_prefix)) {
if (is_null($guessed_prefix)) {
$guessed_prefix = $prefix_guess;
} else {
if ($guessed_prefix != $prefix_guess) {
print("Prefix mismatch! Had guessed $guessed_prefix but got $prefix_guess\n");
die();
echo "Prefix mismatch! Had guessed $guessed_prefix but got $prefix_guess\n";
exit();
}
}
}
@@ -130,7 +139,7 @@ class SQLStreamer {
{
$bytes_read = 0;
if (! $this->input) {
throw new \Exception("No Input available for line_aware_piping");
throw new \Exception('No Input available for line_aware_piping');
}
while (($buffer = fgets($this->input, SQLStreamer::$buffer_size)) !== false) {
@@ -142,25 +151,24 @@ class SQLStreamer {
$bytes_written = fwrite($this->output, $cleaned_buffer);
if ($bytes_written === false) {
throw new \Exception("Unable to write to pipe");
throw new \Exception('Unable to write to pipe');
}
}
}
// if we got a newline at the end of this, then the _next_ read is the beginning of a line
if($buffer[strlen($buffer)-1] === "\n") {
if ($buffer[strlen($buffer) - 1] === "\n") {
$this->reading_beginning_of_line = true;
} else {
$this->reading_beginning_of_line = false;
}
}
return $bytes_read;
}
}
class RestoreFromBackup extends Command
{
/**
@@ -202,7 +210,7 @@ class RestoreFromBackup extends Command
public function handle()
{
$dir = getcwd();
if( $dir != base_path() ) { // usually only the case when running via webserver, not via command-line
if ($dir != base_path()) { // usually only the case when running via webserver, not via command-line
Log::debug("Current working directory is: $dir, changing directory to: ".base_path());
chdir(base_path()); // TODO - is this *safe* to change on a running script?!
}
@@ -221,7 +229,7 @@ class RestoreFromBackup extends Command
return $this->error('DB_CONNECTION must be MySQL in order to perform a restore. Detected: '.config('database.default'));
}
$za = new ZipArchive();
$za = new ZipArchive;
$errcode = $za->open($filename/* , ZipArchive::RDONLY */); // that constant only exists in PHP 7.4 and higher
if ($errcode !== true) {
@@ -240,13 +248,12 @@ class RestoreFromBackup extends Command
return $this->error('Could not access file: '.$filename.' - '.array_key_exists($errcode, $errors) ? $errors[$errcode] : " Unknown reason: $errcode");
}
$private_dirs = [
'storage/private_uploads/accessories',
'storage/private_uploads/assetmodels' => 'storage/private_uploads/models', //this was changed from assetmodels => models Aug 10 2025
'storage/private_uploads/asset_maintenances' => 'storage/private_uploads/maintenances', //this was changed from asset_maintenances => maintenances Aug 10 2025
'storage/private_uploads/maintenances', //but let 'maintenances' take precedence
'storage/private_uploads/models', //and let 'models' take precedence
'storage/private_uploads/assetmodels' => 'storage/private_uploads/models', // this was changed from assetmodels => models Aug 10 2025
'storage/private_uploads/asset_maintenances' => 'storage/private_uploads/maintenances', // this was changed from asset_maintenances => maintenances Aug 10 2025
'storage/private_uploads/maintenances', // but let 'maintenances' take precedence
'storage/private_uploads/models', // and let 'models' take precedence
'storage/private_uploads/assets', // these are asset _files_, not the pictures.
'storage/private_uploads/audits',
'storage/private_uploads/components',
@@ -297,10 +304,10 @@ class RestoreFromBackup extends Command
$good_extensions = config('filesystems.allowed_upload_extensions_array');
$private_extensions = array_merge($good_extensions, ["csv", "key"]); //add csv, and 'key'
$public_extensions = array_diff($good_extensions, ["xml"]); //remove xml
$private_extensions = array_merge($good_extensions, ['csv', 'key']); // add csv, and 'key'
$public_extensions = array_diff($good_extensions, ['xml']); // remove xml
$sanitizer = new Sanitizer();
$sanitizer = new Sanitizer;
/**
* TODO: I _hate_ the "continue 3" thing we keep doing here
@@ -315,29 +322,30 @@ class RestoreFromBackup extends Command
// print_r($stat_results);
$raw_path = $stat_results['name'];
if (strpos($raw_path, '\\') !== false) { //found a backslash, swap it to forward-slash
if (strpos($raw_path, '\\') !== false) { // found a backslash, swap it to forward-slash
$raw_path = strtr($raw_path, '\\', '/');
//print "Translating file: ".$stat_results['name']." to: ".$raw_path."\n";
// print "Translating file: ".$stat_results['name']." to: ".$raw_path."\n";
}
// skip macOS resource fork files (?!?!?!)
if (strpos($raw_path, '__MACOSX') !== false && strpos($raw_path, '._') !== false) {
//print "SKIPPING macOS Resource fork file: $raw_path\n";
// print "SKIPPING macOS Resource fork file: $raw_path\n";
// $boring_files[] = $raw_path; //stop adding this to the boring files list; it's just confusing
continue;
}
if (@pathinfo($raw_path, PATHINFO_EXTENSION) == 'sql') {
Log::debug("Found a sql file!");
Log::debug('Found a sql file!');
$sqlfiles[] = $raw_path;
$sqlfile_indices[] = $i;
continue;
}
if ($raw_path[-1] == '/') {
//last character is '/' - this is a directory, and we don't need it, and we don't need to warn about it
// last character is '/' - this is a directory, and we don't need it, and we don't need to warn about it
continue;
}
if (in_array(basename($raw_path), [".gitkeep", ".gitignore", ".DS_Store"])) {
//skip these boring files silently without reporting on them; they're stupid
if (in_array(basename($raw_path), ['.gitkeep', '.gitignore', '.DS_Store'])) {
// skip these boring files silently without reporting on them; they're stupid
continue;
}
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
@@ -351,20 +359,21 @@ class RestoreFromBackup extends Command
if (is_int($dir)) {
$dir = $destdir;
}
$last_pos = strrpos($raw_path, $dir . '/');
$last_pos = strrpos($raw_path, $dir.'/');
if ($last_pos !== false) {
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $dir - last_pos+strlen(\$dir) is: ".($last_pos+strlen($dir))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
//print("We would copy $raw_path to $dir.\n"); //FIXME append to a path?
//the CSV bit, below, is because we store CSV files as "blahcsv" - without an extension
if (!in_array($extension, $allowed_extensions) && !($dir == "storage/private_uploads/imports" && substr($raw_path, -3) == "csv" && $extension == "")) {
// print("INTERESTING - last_pos is $last_pos when searching $raw_path for $dir - last_pos+strlen(\$dir) is: ".($last_pos+strlen($dir))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
// print("We would copy $raw_path to $dir.\n"); //FIXME append to a path?
// the CSV bit, below, is because we store CSV files as "blahcsv" - without an extension
if (! in_array($extension, $allowed_extensions) && ! ($dir == 'storage/private_uploads/imports' && substr($raw_path, -3) == 'csv' && $extension == '')) {
$unsafe_files[] = $raw_path;
Log::debug($raw_path . ' from directory ' . $dir . ' is being skipped');
Log::debug($raw_path.' from directory '.$dir.' is being skipped');
} else {
if ($dir != $destdir) {
Log::debug("Getting ready to save file $raw_path to new directory $destdir");
}
$interesting_files[$raw_path] = ['dest' => $destdir, 'index' => $i];
}
continue 3;
}
}
@@ -378,28 +387,30 @@ class RestoreFromBackup extends Command
foreach ($files as $file) {
$has_wildcard = (strpos($file, '*') !== false);
if ($has_wildcard) {
$file = substr($file, 0, -1); //trim last character (which should be the wildcard)
$file = substr($file, 0, -1); // trim last character (which should be the wildcard)
}
$last_pos = strrpos($raw_path, $file); // no trailing slash!
if ($last_pos !== false) {
if (!in_array($extension, $allowed_extensions)) {
if (! in_array($extension, $allowed_extensions)) {
// gathering potentially unsafe files here to return at exit
$unsafe_files[] = $raw_path;
Log::debug('Potentially unsafe file ' . $raw_path . ' is being skipped');
Log::debug('Potentially unsafe file '.$raw_path.' is being skipped');
$boring_files[] = $raw_path;
continue 3;
}
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $file - last_pos+strlen(\$file) is: ".($last_pos+strlen($file))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
//no wildcards found in $file, process 'normally'
if ($last_pos + strlen($file) == strlen($raw_path) || $has_wildcard) { //again, no trailing slash. or this is a wildcard and we just take it.
// print("INTERESTING - last_pos is $last_pos when searching $raw_path for $file - last_pos+strlen(\$file) is: ".($last_pos+strlen($file))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
// no wildcards found in $file, process 'normally'
if ($last_pos + strlen($file) == strlen($raw_path) || $has_wildcard) { // again, no trailing slash. or this is a wildcard and we just take it.
// print("FOUND THE EXACT FILE: $file AT: $raw_path!!!\n"); //we *do* care about this, though.
$interesting_files[$raw_path] = ['dest' => dirname($file), 'index' => $i];
continue 3;
}
}
}
}
$boring_files[] = $raw_path; //if we've gotten to here and haven't continue'ed our way into the next iteration, we don't want this file
$boring_files[] = $raw_path; // if we've gotten to here and haven't continue'ed our way into the next iteration, we don't want this file
} // end of pre-processing the ZIP file for-loop
// print_r($interesting_files);exit(-1);
@@ -408,12 +419,12 @@ class RestoreFromBackup extends Command
}
if (strpos($sqlfiles[0], 'db-dumps') === false) {
//return $this->error("SQL backup file is missing 'db-dumps' component of full pathname: ".$sqlfiles[0]);
//older Snipe-IT installs don't have the db-dumps subdirectory component
// return $this->error("SQL backup file is missing 'db-dumps' component of full pathname: ".$sqlfiles[0]);
// older Snipe-IT installs don't have the db-dumps subdirectory component
}
$sql_stat = $za->statIndex($sqlfile_indices[0]);
//$this->info("SQL Stat is: ".print_r($sql_stat,true));
// $this->info("SQL Stat is: ".print_r($sql_stat,true));
$sql_contents = $za->getStream($sql_stat['name']); // maybe copy *THIS* thing?
// OKAY, now that we *found* the sql file if we're doing just the guess-prefix thing, we can do that *HERE* I think?
@@ -428,27 +439,32 @@ class RestoreFromBackup extends Command
if ($this->option('sql-stdout-only')) {
$sql_importer = new SQLStreamer($sql_contents, STDOUT, $this->option('sanitize-with-prefix'));
$bytes_read = $sql_importer->line_aware_piping();
return $this->warn("$bytes_read total bytes read");
//TODO - it'd be nice to dump this message to STDERR so that STDOUT is just pure SQL,
// TODO - it'd be nice to dump this message to STDERR so that STDOUT is just pure SQL,
// which would be good for redirecting to a file, and not having to trim the last line off of it
}
//how to invoke the restore?
// how to invoke the restore?
$pipes = [];
$env_vars = getenv();
$env_vars['MYSQL_PWD'] = config('database.connections.mysql.password');
// TODO notes: we are stealing the dump_binary_path (which *probably* also has your copy of the mysql binary in it. But it might not, so we might need to extend this)
// we unilaterally prepend a slash to the `mysql` command. This might mean your path could look like /blah/blah/blah//mysql - which should be fine. But maybe in some environments it isn't?
$mysql_binary = config('database.connections.mysql.dump.dump_binary_path').\DIRECTORY_SEPARATOR.'mysql'.(\DIRECTORY_SEPARATOR == '\\' ? ".exe" : "");
if( ! file_exists($mysql_binary) ) {
$mysql_binary = config('database.connections.mysql.dump.dump_binary_path').\DIRECTORY_SEPARATOR.'mysql'.(\DIRECTORY_SEPARATOR == '\\' ? '.exe' : '');
if (! file_exists($mysql_binary)) {
return $this->error("mysql tool at: '$mysql_binary' does not exist, cannot restore. Please edit DB_DUMP_PATH in your .env to point to a directory that contains the mysqldump and mysql binary");
}
$proc_results = proc_open("$mysql_binary -h ".escapeshellarg(config('database.connections.mysql.host')).' -u '.escapeshellarg(config('database.connections.mysql.username')).' '.escapeshellarg(config('database.connections.mysql.database')), // yanked -p since we pass via ENV
[0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']],
$pipes,
null,
$env_vars); // this is not super-duper awesome-secure, but definitely more secure than showing it on the CLI, or dropping temporary files with passwords in them.
$proc_results = proc_open("$mysql_binary -h " .
escapeshellarg(config('database.connections.mysql.host')) .
' -u ' . escapeshellarg(config('database.connections.mysql.username')) . ' ' .
' -P ' . escapeshellarg(config('database.connections.mysql.port')) . ' ' .
escapeshellarg(config('database.connections.mysql.database')), // yanked -p since we pass via ENV
[0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']],
$pipes,
null,
$env_vars); // this is not super-duper awesome-secure, but definitely more secure than showing it on the CLI, or dropping temporary files with passwords in them.
if ($proc_results === false) {
return $this->error('Unable to invoke mysql via CLI');
}
@@ -462,7 +478,7 @@ class RestoreFromBackup extends Command
// should we read stdout?
// fwrite($pipes[0],config("database.connections.mysql.password")."\n"); //this doesn't work :(
//$sql_contents = fopen($sqlfiles[0], "r"); //NOPE! This isn't a real file yet, silly-billy!
// $sql_contents = fopen($sqlfiles[0], "r"); //NOPE! This isn't a real file yet, silly-billy!
// FIXME - this feels like it wants to go somewhere else?
// and it doesn't seem 'right' - if you can't get a stream to the .sql file,
@@ -477,7 +493,7 @@ class RestoreFromBackup extends Command
}
try {
if ( $this->option('sanitize-with-prefix') === null) {
if ($this->option('sanitize-with-prefix') === null) {
// "Legacy" direct-piping
$bytes_read = 0;
while (($buffer = fgets($sql_contents, SQLStreamer::$buffer_size)) !== false) {
@@ -486,7 +502,7 @@ class RestoreFromBackup extends Command
$bytes_written = fwrite($pipes[0], $buffer);
if ($bytes_written === false) {
throw new Exception("Unable to write to pipe");
throw new Exception('Unable to write to pipe');
}
}
} else {
@@ -494,37 +510,37 @@ class RestoreFromBackup extends Command
$bytes_read = $sql_importer->line_aware_piping();
}
} catch (\Exception $e) {
Log::error("Error during restore!!!! ".$e->getMessage());
Log::error('Error during restore!!!! '.$e->getMessage());
// FIXME - put these back and/or put them in the right places?!
$err_out = fgets($pipes[1]);
$err_err = fgets($pipes[2]);
Log::error("Error OUTPUT: ".$err_out);
Log::error('Error OUTPUT: '.$err_out);
$this->info($err_out);
Log::error("Error ERROR : ".$err_err);
Log::error('Error ERROR : '.$err_err);
$this->error($err_err);
throw $e;
}
if (!feof($sql_contents) || $bytes_read == 0) {
return $this->error("Not at end of file for sql file, or zero bytes read. aborting!");
if (! feof($sql_contents) || $bytes_read == 0) {
return $this->error('Not at end of file for sql file, or zero bytes read. aborting!');
}
fclose($pipes[0]);
fclose($sql_contents);
$this->line(stream_get_contents($pipes[1]));
fclose($pipes[1]);
$this->error(stream_get_contents($pipes[2]));
fclose($pipes[2]);
//wait, have to do fclose() on all pipes first?
// wait, have to do fclose() on all pipes first?
$close_results = proc_close($proc_results);
if ($close_results != 0) {
return $this->error('There may have been a problem with the database import: Error number '.$close_results);
}
//and now copy the files over too (right?)
//FIXME - we don't prune the filesystem space yet!!!!
// and now copy the files over too (right?)
// FIXME - we don't prune the filesystem space yet!!!!
if ($this->option('no-progress')) {
$bar = null;
} else {
@@ -532,16 +548,16 @@ class RestoreFromBackup extends Command
}
foreach ($interesting_files as $pretty_file_name => $file_details) {
$ugly_file_name = $za->statIndex($file_details['index'])['name'];
$migrated_file_name = $file_details['dest'] . '/' . basename($pretty_file_name);
if (strcasecmp(substr($pretty_file_name, -4), ".svg") === 0) {
$migrated_file_name = $file_details['dest'].'/'.basename($pretty_file_name);
if (strcasecmp(substr($pretty_file_name, -4), '.svg') === 0) {
$svg_contents = $za->getFromIndex($file_details['index']);
$cleaned_svg = $sanitizer->sanitize($svg_contents);
file_put_contents($migrated_file_name, $cleaned_svg);
} else {
$fp = $za->getStream($ugly_file_name);
//$this->info("Weird problem, here are file details? ".print_r($file_details,true));
if (!is_dir($file_details['dest'])) {
mkdir($file_details['dest'], 0755, true); //0755 is what Laravel uses, so we do that
// $this->info("Weird problem, here are file details? ".print_r($file_details,true));
if (! is_dir($file_details['dest'])) {
mkdir($file_details['dest'], 0755, true); // 0755 is what Laravel uses, so we do that
}
$migrated_file = fopen($migrated_file_name, 'w');
while (($buffer = fgets($fp, SQLStreamer::$buffer_size)) !== false) {
@@ -549,7 +565,7 @@ class RestoreFromBackup extends Command
}
fclose($migrated_file);
fclose($fp);
//$this->info("Wrote $ugly_file_name to $pretty_file_name");
// $this->info("Wrote $ugly_file_name to $pretty_file_name");
}
if ($bar) {
$bar->advance();
+15 -13
View File
@@ -5,10 +5,10 @@ namespace App\Console\Commands;
use App\Models\Asset;
use App\Models\CustomField;
use App\Models\Setting;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Console\Command;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Encryption\Encrypter;
use Illuminate\Support\Facades\Artisan;
class RotateAppKey extends Command
{
@@ -46,12 +46,13 @@ class RotateAppKey extends Command
*/
public function handle()
{
//make sure they specify only exactly one of --emergency, or a filename. Not neither, and not both.
if ( (!$this->option('emergency') && !$this->argument('previous_key')) || ( $this->option('emergency') && $this->argument('previous_key'))) {
$this->error("Specify only one of --emergency, or an app key value, in order to rotate keys");
// make sure they specify only exactly one of --emergency, or a filename. Not neither, and not both.
if ((! $this->option('emergency') && ! $this->argument('previous_key')) || ($this->option('emergency') && $this->argument('previous_key'))) {
$this->error('Specify only one of --emergency, or an app key value, in order to rotate keys');
return 1;
}
if ( $this->option('emergency') ) {
if ($this->option('emergency')) {
$msg = "\n****************************************************\nTHIS WILL MODIFY YOUR APP_KEY AND DE-CRYPT YOUR ENCRYPTED CUSTOM FIELDS AND \nRE-ENCRYPT THEM WITH A NEWLY GENERATED KEY. \n\nThere is NO undo. \n\nMake SURE you have a database backup and a backup of your .env generated BEFORE running this command. \n\nIf you do not save the newly generated APP_KEY to your .env in this process, \nyour encrypted data will no longer be decryptable. \n\nAre you SURE you wish to continue, and have confirmed you have a database backup and an .env backup? ";
} else {
$msg = "\n****************************************************\nTHIS WILL DE-CRYPT YOUR ENCRYPTED CUSTOM FIELDS AND RE-ENCRYPT THEM WITH YOUR\nAPP_KEY.\n\nThere is NO undo. \n\nMake SURE you have a database backup BEFORE running this command. \n\nAre you SURE you wish to continue, and have confirmed you have a database backup? ";
@@ -79,9 +80,9 @@ class RotateAppKey extends Command
$new_app_key = config('app.key');
}
$this->warn('Your app cipher is: ' . $cipher);
$this->warn('Your old APP_KEY is: ' . $old_app_key);
$this->warn('Your new APP_KEY is: ' . $new_app_key);
$this->warn('Your app cipher is: '.$cipher);
$this->warn('Your old APP_KEY is: '.$old_app_key);
$this->warn('Your new APP_KEY is: '.$new_app_key);
// Manually create an old encrypter instance using the old app key
// and also create a new encrypter instance so we can re-crypt the field
@@ -97,12 +98,13 @@ class RotateAppKey extends Command
foreach ($assets as $asset) {
try {
$asset->{$field->db_column} = $oldEncrypter->decrypt($asset->{$field->db_column});
$this->line('DECRYPTED: ' . $field->db_column);
$this->line('DECRYPTED: '.$field->db_column);
} catch (DecryptException $e) {
$this->line('Could not decrypt '. $field->db_column.' using "old key" - skipping...');
$this->line('Could not decrypt '.$field->db_column.' using "old key" - skipping...');
continue;
} catch (\Exception $e) {
$this->error("Error decrypting ".$field->db_column.", reason: ".$e->getMessage().". Aborting key rotation");
$this->error('Error decrypting '.$field->db_column.', reason: '.$e->getMessage().'. Aborting key rotation');
throw $e;
}
$asset->{$field->db_column} = $newEncrypter->encrypt($asset->{$field->db_column});
@@ -119,8 +121,8 @@ class RotateAppKey extends Command
$setting->ldap_pword = $newEncrypter->encrypt($setting->ldap_pword);
$setting->save();
$this->warn('LDAP password has been re-encrypted.');
} catch(DecryptException $e) {
$this->warn("Unable to decrypt old LDAP password; skipping");
} catch (DecryptException $e) {
$this->warn('Unable to decrypt old LDAP password; skipping');
}
}
} else {
@@ -2,8 +2,8 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\SamlNonce;
use Illuminate\Console\Command;
class SamlClearExpiredNonces extends Command
{
@@ -38,7 +38,8 @@ class SamlClearExpiredNonces extends Command
*/
public function handle()
{
SamlNonce::where('not_valid_after','<=',now())->delete();
SamlNonce::where('not_valid_after', '<=', now())->delete();
return 0;
}
}
+11 -15
View File
@@ -9,10 +9,7 @@ use App\Models\CheckoutAcceptance;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\LicenseSeat;
use App\Models\Setting;
use App\Models\User;
use App\Notifications\CheckoutAssetNotification;
use App\Notifications\CurrentInventory;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Support\Facades\Mail;
@@ -54,11 +51,11 @@ class SendAcceptanceReminder extends Command
->with([
'checkoutable' => function (MorphTo $morph) {
$morph->morphWith([
Asset::class => ['model.category', 'assignedTo', 'adminuser', 'company', 'checkouts'],
Accessory::class => ['category', 'company', 'checkouts'],
Asset::class => ['model.category', 'assignedTo', 'adminuser', 'company', 'checkouts'],
Accessory::class => ['category', 'company', 'checkouts'],
LicenseSeat::class => ['user', 'license', 'checkouts'],
Component::class => ['assignedTo', 'company', 'checkouts'],
Consumable::class => ['company', 'checkouts'],
Component::class => ['assignedTo', 'company', 'checkouts'],
Consumable::class => ['company', 'checkouts'],
]);
},
'assignedTo',
@@ -74,15 +71,15 @@ class SendAcceptanceReminder extends Command
$count = 0;
$unacceptedAssetGroups = $pending
->map(function($acceptance) {
->map(function ($acceptance) {
return ['assetItem' => $acceptance->checkoutable, 'acceptance' => $acceptance];
})
->groupBy(function($item) {
->groupBy(function ($item) {
return $item['acceptance']->assignedTo ? $item['acceptance']->assignedTo->id : '';
});
$no_email_list= [];
$no_email_list = [];
foreach($unacceptedAssetGroups as $unacceptedAssetGroup) {
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'];
@@ -90,7 +87,7 @@ class SendAcceptanceReminder extends Command
$locale = $acceptance->assignedTo?->locale;
$email = $acceptance->assignedTo?->email;
if(!$email){
if (! $email) {
$no_email_list[] = [
'id' => $acceptance->assignedTo?->id,
'name' => $acceptance->assignedTo?->display_name,
@@ -116,12 +113,11 @@ class SendAcceptanceReminder extends Command
$rows[] = [$user['id'], $user['name']];
}
if (!empty($rows)) {
$this->info("The following users do not have an email address:");
if (! empty($rows)) {
$this->info('The following users do not have an email address:');
$this->table($headers, $rows);
}
return 0;
}
}
@@ -2,6 +2,7 @@
namespace App\Console\Commands;
use App\Helpers\Helper;
use App\Models\Asset;
use App\Models\Recipients\AlertRecipient;
use App\Models\Setting;
@@ -10,7 +11,6 @@ use App\Notifications\ExpectedCheckinNotification;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Notification;
use App\Helpers\Helper;
class SendExpectedCheckinAlerts extends Command
{
@@ -49,7 +49,7 @@ class SendExpectedCheckinAlerts extends Command
$interval_date = $today->copy()->addDays($interval);
$count = 0;
if (!$this->option('with-output')) {
if (! $this->option('with-output')) {
$this->info('Run this command with the --with-output option to see the full list in the console.');
}
@@ -57,9 +57,8 @@ class SendExpectedCheckinAlerts extends Command
$this->info($assets->count().' assets must be checked on or before '.Helper::getFormattedDateObject($interval_date, 'date', false));
foreach ($assets as $asset) {
if ($asset->assignedTo && (isset($asset->assignedTo->email)) && ($asset->assignedTo->email!='') && $asset->checkedOutToUser()) {
if ($asset->assignedTo && (isset($asset->assignedTo->email)) && ($asset->assignedTo->email != '') && $asset->checkedOutToUser()) {
$asset->assignedTo->notify((new ExpectedCheckinNotification($asset)));
$count++;
}
@@ -76,13 +75,13 @@ class SendExpectedCheckinAlerts extends Command
trans('general.purchase_date'),
trans('admin/hardware/form.expected_checkin'),
],
$assets->map(fn($assets) => [
$assets->map(fn ($assets) => [
trans('general.id') => $assets->id,
trans('admin/hardware/form.tag') => $assets->asset_tag,
trans('admin/hardware/form.model') => $assets->model->name,
trans('general.model_no') => $assets->model->model_number,
trans('general.purchase_date') => $assets->purchase_date_formatted,
trans('admin/hardware/form.eol_date') => $assets->expected_checkin_formattedDate ? $assets->expected_checkin_formattedDate . ' (' . $assets->expected_checkin_diff_for_humans . ')' : '',
trans('admin/hardware/form.eol_date') => $assets->expected_checkin_formattedDate ? $assets->expected_checkin_formattedDate.' ('.$assets->expected_checkin_diff_for_humans.')' : '',
])
);
}
@@ -96,7 +95,7 @@ class SendExpectedCheckinAlerts extends Command
Notification::send($recipients, new ExpectedCheckinAdminNotification($assets));
}
$this->info('Sent checkin reminders to to '.$count.' users.');
}
+18 -20
View File
@@ -2,7 +2,6 @@
namespace App\Console\Commands;
use App\Helpers\Helper;
use App\Mail\ExpiringAssetsMail;
use App\Mail\ExpiringLicenseMail;
use App\Models\Asset;
@@ -14,11 +13,11 @@ use Illuminate\Support\Facades\Mail;
class SendExpirationAlerts extends Command
{
/**
* The console command name.
* The name and signature of the console command.
*
* @var string
*/
protected $name = 'snipeit:expiring-alerts';
protected $signature = 'snipeit:expiring-alerts {--expired-licenses}';
/**
* The console command description.
@@ -49,12 +48,14 @@ class SendExpirationAlerts extends Command
// 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))
->map(fn ($item) => trim($item)) // Trim each email
->filter(fn ($item) => ! empty($item))
->all();
// Expiring Assets
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
$assets->load(['assignedTo', 'supplier']);
if ($assets->count() > 0) {
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
@@ -70,23 +71,22 @@ class SendExpirationAlerts extends Command
trans('admin/hardware/form.eol_date'),
trans('admin/hardware/form.warranty_expires'),
],
$assets->map(fn($item) =>
[
trans('general.id') => $item->id,
$assets->map(fn ($item) => [
trans('general.id') => $item->id,
trans('admin/hardware/form.tag') => $item->asset_tag,
trans('admin/hardware/form.model') => $item->model->name,
trans('general.model_no') => $item->model->model_number,
trans('general.purchase_date') => $item->purchase_date_formatted,
trans('admin/hardware/form.eol_rate') => $item->model->eol,
trans('admin/hardware/form.eol_date') => $item->eol_date ? $item->eol_formatted_date .' ('.$item->eol_diff_for_humans.')' : '',
trans('admin/hardware/form.warranty_expires') => $item->warranty_expires ? $item->warranty_expires_formatted_date .' ('.$item->warranty_expires_diff_for_humans.')' : '',
])
);
trans('admin/hardware/form.eol_rate') => $item->model->eol,
trans('admin/hardware/form.eol_date') => $item->eol_date ? $item->eol_formatted_date.' ('.$item->eol_diff_for_humans.')' : '',
trans('admin/hardware/form.warranty_expires') => $item->warranty_expires ? $item->warranty_expires_formatted_date.' ('.$item->warranty_expires_diff_for_humans.')' : '',
])
);
}
// Expiring licenses
$licenses = License::query()->ExpiringLicenses($alert_interval)
->with('manufacturer','category')
$licenses = License::query()->ExpiringLicenses($alert_interval, $this->option('expired-licenses'))
->with('manufacturer', 'category')
->orderBy('expiration_date', 'ASC')
->orderBy('termination_date', 'ASC')
->get();
@@ -102,14 +102,14 @@ class SendExpirationAlerts extends Command
trans('mail.expires'),
trans('admin/licenses/form.termination_date'),
trans('mail.terminates')],
$licenses->map(fn($item) => [
$licenses->map(fn ($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->name,
trans('general.purchase_date') => $item->purchase_date_formatted,
trans('admin/licenses/form.expiration') => $item->expires_formatted_date,
trans('mail.expires') => $item->expires_formatted_date ? $item->expires_diff_for_humans : '',
trans('admin/licenses/form.termination_date') => $item->terminates_formatted_date,
trans('mail.terminates') => $item->terminates_diff_for_humans
trans('mail.terminates') => $item->terminates_diff_for_humans,
])
);
}
@@ -118,12 +118,10 @@ class SendExpirationAlerts extends Command
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
} else {
if ($settings->alert_email == '') {
$this->error('Could not send email. No alert email configured in settings');
} elseif (1 != $settings->alerts_enabled) {
} elseif ($settings->alerts_enabled != 1) {
$this->info('Alerts are disabled in the settings. No mail will be sent');
}
}
+1 -1
View File
@@ -59,7 +59,7 @@ class SendInventoryAlerts extends Command
} else {
if ($settings->alert_email == '') {
$this->error('Could not send email. No alert email configured in settings');
} elseif (1 != $settings->alerts_enabled) {
} elseif ($settings->alerts_enabled != 1) {
$this->info('Alerts are disabled in the settings. No mail will be sent');
}
}
@@ -49,12 +49,11 @@ class SendUpcomingAuditReport extends Command
$assets_query = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'asc')->with('supplier');
$asset_count = $assets_query->count();
$this->info(number_format($asset_count) . ' assets must be audited on or before ' . $interval_date);
if (!$this->option('with-output')) {
$this->info(number_format($asset_count).' assets must be audited on or before '.$interval_date);
if (! $this->option('with-output')) {
$this->info('Run this command with the --with-output option to see the full list in the console.');
}
if ($asset_count > 0) {
$assets_for_email = $assets_query->limit(30)->get();
@@ -63,22 +62,19 @@ class SendUpcomingAuditReport extends Command
if ($settings->alert_email != '') {
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item))
->filter(fn($item) => !empty($item))
->map(fn ($item) => trim($item))
->filter(fn ($item) => ! empty($item))
->all();
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets_for_email, $settings->audit_warning_days, $asset_count));
$this->info('Audit notification sent to: ' . $settings->alert_email);
$this->info('Audit notification sent to: '.$settings->alert_email);
} else {
$this->info('There is no admin alert email set so no email will be sent.');
}
if ($this->option('with-output')) {
// Get the full list if the user wants output in the console
$assets_for_output = $assets_query->limit(null)->get();
@@ -93,7 +89,7 @@ class SendUpcomingAuditReport extends Command
trans('mail.assigned_to'),
],
$assets_for_output->map(fn($item) => [
$assets_for_output->map(fn ($item) => [
trans('general.id') => $item->id,
trans('general.name') => $item->display_name,
trans('general.last_audit') => $item->last_audit_formatted_date,
@@ -106,10 +102,8 @@ class SendUpcomingAuditReport extends Command
}
} else {
$this->info('There are no assets due for audit in the next ' . $interval . ' days.');
$this->info('There are no assets due for audit in the next '.$interval.' days.');
}
}
}
+4 -6
View File
@@ -63,16 +63,14 @@ class SyncAssetCounters extends Command
}
} else {
$this->info('No assets to sync');
}
});
} else {
$this->info('No assets to sync');
}
});
$bar->finish();
$time_elapsed_secs = microtime(true) - $start;
$this->info("\nSync of ".$assets_count.' assets executed in '.$time_elapsed_secs.' seconds');
}
}
+6 -4
View File
@@ -3,6 +3,8 @@
namespace App\Console\Commands;
use App\Models\Asset;
use App\Models\Location;
use App\Models\User;
use Illuminate\Console\Command;
class SyncAssetLocations extends Command
@@ -57,7 +59,7 @@ class SyncAssetLocations extends Command
$bar->advance();
}
$assigned_user_assets = Asset::where('assigned_type', \App\Models\User::class)->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
$assigned_user_assets = Asset::where('assigned_type', User::class)->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
$output['info'][] = 'There are '.$assigned_user_assets->count().' assets checked out to users.';
foreach ($assigned_user_assets as $assigned_user_asset) {
if (($assigned_user_asset->assignedTo) && ($assigned_user_asset->assignedTo->userLoc)) {
@@ -73,7 +75,7 @@ class SyncAssetLocations extends Command
$bar->advance();
}
$assigned_location_assets = Asset::where('assigned_type', \App\Models\Location::class)
$assigned_location_assets = Asset::where('assigned_type', Location::class)
->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
$output['info'][] = 'There are '.$assigned_location_assets->count().' assets checked out to locations.';
@@ -90,13 +92,13 @@ class SyncAssetLocations extends Command
}
// Assigned to assets
$assigned_asset_assets = Asset::where('assigned_type', \App\Models\Asset::class)
$assigned_asset_assets = Asset::where('assigned_type', Asset::class)
->whereNotNull('assigned_to')->whereNull('deleted_at')->get();
$output['info'][] = 'Asset-assigned assets: '.$assigned_asset_assets->count();
foreach ($assigned_asset_assets as $assigned_asset_asset) {
// Check to make sure there aren't any invalid relationships
// Check to make sure there aren't any invalid relationships
if ($assigned_asset_asset->assetLoc()) {
$assigned_asset_asset->location_id = $assigned_asset_asset->assetLoc()->id;
$output['info'][] = 'Setting Asset Assigned asset '.$assigned_asset_asset->assetLoc()->id.' ('.$assigned_asset_asset->asset_tag.') location to: '.$assigned_asset_asset->assetLoc()->id;
+2 -2
View File
@@ -37,13 +37,13 @@ class SystemBackup extends Command
*/
public function handle()
{
ini_set('max_execution_time', env('BACKUP_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('max_execution_time', env('BACKUP_TIME_LIMIT', 600)); // 600 seconds = 10 minutes
if ($this->option('filename')) {
$filename = $this->option('filename');
// Make sure the filename ends in .zip
if (!ends_with($filename, '.zip')) {
if (! ends_with($filename, '.zip')) {
$filename = $filename.'.zip';
}
@@ -47,5 +47,4 @@ class TestLocationsFMCS extends Command
$this->table($header, $mismatched);
}
}
@@ -17,7 +17,6 @@ class ToggleCustomfieldEncryption extends Command
protected $signature = 'snipeit:customfield-encryption
{fieldname : the db_column_name of the field}';
/**
* The console command description.
*
@@ -61,15 +60,15 @@ class ToggleCustomfieldEncryption extends Command
$field->field_encrypted = 1;
$field->save();
// This field is already encrypted. Do nothing.
// This field is already encrypted. Do nothing.
} else {
$this->error('The custom field ' . $field->db_column.' is already encrypted. No action was taken.');
$this->error('The custom field '.$field->db_column.' is already encrypted. No action was taken.');
}
});
// No matching column name found
// No matching column name found
} else {
$this->error('No matching results for unencrypted custom fields with db_column name: ' . $fieldname.'. Please check the fieldname.');
$this->error('No matching results for unencrypted custom fields with db_column name: '.$fieldname.'. Please check the fieldname.');
}
}
+92
View File
@@ -0,0 +1,92 @@
<?php
namespace App\Console\Commands;
use App\Models\Asset;
use Illuminate\Console\Command;
use Illuminate\Support\MessageBag;
class ValidateAssets extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:validate-assets {--all : Display the valid assets in your table output as well} ';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This runs through the list of assets and checks for any validation errors that would prevent it from being updated or checked in or out. ';
/**
* Execute the console command.
*/
public function handle()
{
$showAll = (bool) $this->option('all');
$assets = Asset::query()
->whereNull('deleted_at')
->with('model')
->orderBy('assets.created_at', 'desc')
->get();
if (! $showAll) {
$this->info('Run this command with the --all option to see the full list in the console.');
}
$rows = $assets
->filter(fn (Asset $asset) => $showAll || ! $asset->isValid())
->map(fn (Asset $asset) => [
trans('general.id') => $asset->id,
trans('admin/hardware/form.tag') => $asset->asset_tag,
trans('admin/hardware/form.serial') => $asset->serial ?? '',
trans('admin/hardware/form.model') => $asset->model?->name ?? '',
trans('general.model_no') => $asset->model?->model_number ?? '',
trans('general.error') => $asset->isValid() ? '√ valid' : $this->formatValidationErrors($asset),
])
->values()
->all();
$this->table(
[
trans('general.id'),
trans('admin/hardware/form.tag'),
trans('admin/hardware/form.serial'),
trans('admin/hardware/form.model'),
trans('general.model_no'),
trans('general.error'),
],
$rows
);
return self::SUCCESS;
}
private function formatValidationErrors(Asset $asset): string
{
$errors = $asset->getErrors();
$messages = [];
if ($errors instanceof MessageBag) {
$messages = $errors->all();
} elseif (is_array($errors)) {
$messages = $errors;
} else {
$messages = [(string) $errors];
}
$prefixedMessages = collect($messages)
->map(fn ($message) => trim((string) $message))
->filter()
->map(fn (string $message) => str_starts_with($message, '✘') ? $message : '✘ '.$message)
->values()
->all();
return implode(PHP_EOL, $prefixedMessages);
}
}
+63 -52
View File
@@ -4,6 +4,9 @@ namespace App\Console\Commands;
use Illuminate\Console\Command;
use function Laravel\Prompts\info;
use function Laravel\Prompts\select;
class Version extends Command
{
/**
@@ -11,7 +14,7 @@ class Version extends Command
*
* @var string
*/
protected $signature = 'version:update {--branch=master} {--type=patch}';
protected $signature = 'version:update';
/**
* The console command description.
@@ -37,30 +40,40 @@ class Version extends Command
*/
public function handle()
{
$use_branch = $this->option('branch');
$use_type = $this->option('type');
$use_branch = select(
label: 'Which branch?',
options: ['master', 'develop'],
default: 'develop',
);
$use_type = select(
label: 'Which release type?',
options: [
'hash' => 'Hash bump',
'patch' => 'Patch release',
'minor' => 'Minor release',
'major' => 'Major release',
'pre-patch' => 'Pre-patch release',
'pre-minor' => 'Pre-minor release',
'pre-major' => 'Pre-major release',
],
default: 'hash',
scroll: 7,
);
$git_branch = trim(shell_exec('git rev-parse --abbrev-ref HEAD'));
$build_version = trim(shell_exec('git rev-list --count '.$use_branch));
$versionFile = 'config/version.php';
$full_hash_version = str_replace("\n", '', shell_exec('git describe master --tags'));
$version = explode('-', $full_hash_version);
$app_version = $current_app_version = $version[0];
$app_version = $version[0];
$hash_version = (array_key_exists('2', $version)) ? $version[2] : '';
$prerelease_version = '';
$this->line('Branch is: '.$use_branch);
$this->line('Type is: '.$use_type);
$this->line('Current version is: '.$full_hash_version);
if (count($version) == 3) {
$this->line('This does not look like an alpha/beta release.');
} else {
if (array_key_exists('3', $version)) {
$this->line('The current version looks like a beta release.');
$prerelease_version = $version[1];
$hash_version = $version[3];
}
if (array_key_exists('3', $version)) {
$prerelease_version = $version[1];
$hash_version = $version[3];
}
$app_version_raw = explode('.', $app_version);
@@ -74,54 +87,52 @@ class Version extends Command
$patch = $app_version_raw[2];
}
if ($use_type == 'major') {
if ($use_type === 'major') {
$app_version = 'v'.($maj + 1).".$min.$patch";
} elseif ($use_type == 'minor') {
} elseif ($use_type === 'minor') {
$app_version = 'v'."$maj.".($min + 1).".$patch";
} elseif ($use_type == 'pre') {
$pre_raw = str_replace('beta', '', $prerelease_version);
$pre_raw = str_replace('alpha', '', $pre_raw);
$pre_raw = str_ireplace('rc', '', $pre_raw);
$pre_raw = $pre_raw++;
$this->line('Setting the pre-release to '.$prerelease_version.'-'.$pre_raw);
$app_version = 'v'."$maj.".($min + 1).".$patch";
} elseif ($use_type == 'patch') {
} elseif ($use_type === 'pre-patch') {
$app_version = 'v'."$maj.$min.".($patch + 1).'-pre';
} elseif ($use_type === 'pre-minor') {
$app_version = 'v'."$maj.".($min + 1).'.0-pre';
} elseif ($use_type === 'pre-major') {
$app_version = 'v'.($maj + 1).'.0.0-pre';
} elseif ($use_type === 'patch') {
$app_version = 'v'."$maj.$min.".($patch + 1);
// If nothing is passed, leave the version as it is, just increment the build
} else {
$app_version = 'v'."$maj.$min.".$patch;
}
// Determine if this tag already exists, or if this prior to a release
$this->line('Running: git rev-parse master '.$current_app_version);
// $pre_release = trim(shell_exec('git rev-parse '.$use_branch.' '.$current_app_version.' 2>&1 1> /dev/null'));
if ($use_branch == 'develop') {
if ($use_branch === 'develop' && ! str_ends_with($app_version, '-pre')) {
$app_version = $app_version.'-pre';
}
$full_hash_version = str_replace($version[0], $app_version, $full_hash_version);
$full_app_version = $app_version.' - build '.$build_version.'-'.$hash_version;
$array = var_export(
[
'app_version' => $app_version,
'full_app_version' => $full_app_version,
'build_version' => $build_version,
'prerelease_version' => $prerelease_version,
'hash_version' => $hash_version,
'full_hash' => $full_hash_version,
'branch' => $git_branch, ],
true
);
$content = <<<PHP
<?php
// Construct our file content
$content = <<<CON
<?php
return $array;
CON;
return [
'app_version' => '$app_version',
'full_app_version' => '$full_app_version',
'build_version' => '$build_version',
'prerelease_version' => '$prerelease_version',
'hash_version' => '$hash_version',
'full_hash' => '$full_hash_version',
'branch' => '$git_branch',
];
PHP;
// And finally write the file and output the current version
\File::put($versionFile, $content);
$this->info('Setting NEW version: '.$full_app_version.' ('.$git_branch.')');
info('New version: '.$full_app_version.' ('.$git_branch.')');
info('Building JS/CSS assets...');
passthru('npm run prod', $exitCode);
if ($exitCode !== 0) {
$this->error('Asset build failed with exit code '.$exitCode);
} else {
info('Assets built successfully.');
}
}
}
+1 -5
View File
@@ -2,9 +2,6 @@
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;
@@ -14,12 +11,11 @@ class Kernel extends ConsoleKernel
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
if(Setting::getSettings()?->alerts_enabled === 1) {
if (Setting::getSettings()?->alerts_enabled === 1) {
$schedule->command('snipeit:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:expected-checkin')->daily();
+8 -1
View File
@@ -1,6 +1,7 @@
<?php
namespace App\Enums;
enum ActionType: string
{
// General
@@ -12,6 +13,7 @@ enum ActionType: string
// Assets/Accessories/Components/Licenses/Consumables
case Checkout = 'checkout';
case CheckinFrom = 'checkin from';
case ForceCheckin = 'force checkin';
case Requested = 'requested';
case RequestCanceled = 'request canceled';
case Accepted = 'accepted';
@@ -22,12 +24,17 @@ enum ActionType: string
// Users
case TwoFactorReset = '2FA reset';
case Merged = 'merged';
case TokenRevoked = 'token revoked';
case TokenUnrevoked = 'token unrevoked';
// Licenses
case DeleteSeats = 'delete seats';
case AddSeats = 'add seats';
// Maintenances
case MaintenanceComplete = 'completed';
// File Uploads
case Uploaded = 'uploaded';
case UploadDeleted = 'upload deleted';
}
}
-1
View File
@@ -3,7 +3,6 @@
namespace App\Events;
use App\Models\CheckoutAcceptance;
use App\Models\Contracts\Acceptable;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
-1
View File
@@ -3,7 +3,6 @@
namespace App\Events;
use App\Models\CheckoutAcceptance;
use App\Models\Contracts\Acceptable;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
+5
View File
@@ -11,10 +11,15 @@ class CheckoutableCheckedIn
use Dispatchable, SerializesModels;
public $checkoutable;
public $checkedOutTo;
public $checkedInBy;
public $note;
public $action_date; // Date setted in the hardware.checkin view at the checkin_at input, for the action log
public $originalValues;
/**
+11 -1
View File
@@ -11,22 +11,32 @@ class CheckoutableCheckedOut
use Dispatchable, SerializesModels;
public $checkoutable;
public $checkedOutTo;
public $checkedOutBy;
public $note;
public $originalValues;
public int $quantity;
public bool $signInPlace;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct($checkoutable, $checkedOutTo, User $checkedOutBy, $note, $originalValues = [])
public function __construct($checkoutable, $checkedOutTo, User $checkedOutBy, $note, $originalValues = [], $quantity = 1, bool $signInPlace = false)
{
$this->checkoutable = $checkoutable;
$this->checkedOutTo = $checkedOutTo;
$this->checkedOutBy = $checkedOutBy;
$this->note = $note;
$this->originalValues = $originalValues;
$this->quantity = $quantity;
$this->signInPlace = $signInPlace;
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Events;
use App\Models\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;
class CheckoutablesCheckedOutInBulk
{
use Dispatchable, SerializesModels;
public function __construct(
public Collection $assets,
public Model $target,
public User $admin,
public string $checkout_at,
public string $expected_checkin,
public string $note,
) {}
}
+4 -4
View File
@@ -2,9 +2,9 @@
namespace App\Events;
use App\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use App\Models\User;
class UserMerged
{
@@ -17,8 +17,8 @@ class UserMerged
*/
public function __construct(User $from_user, User $to_user, ?User $admin)
{
$this->merged_from = $from_user;
$this->merged_to = $to_user;
$this->admin = $admin;
$this->merged_from = $from_user;
$this->merged_to = $to_user;
$this->admin = $admin;
}
}
+1 -3
View File
@@ -4,6 +4,4 @@ namespace App\Exceptions;
use Exception;
class AssetNotRequestable extends Exception
{
}
class AssetNotRequestable extends Exception {}
+69 -44
View File
@@ -2,16 +2,27 @@
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use App\Helpers\Helper;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\AuthenticationException;
use ArieTimmerman\Laravel\SCIMServer\Exceptions\SCIMException;
use Illuminate\Support\Facades\Log;
use Throwable;
use JsonException;
use Carbon\Exceptions\InvalidFormatException;
use Illuminate\Http\Exceptions\ThrottleRequestsException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\ValidationException;
use Intervention\Image\Exception\NotSupportedException;
use JsonException;
use League\OAuth2\Server\Exception\OAuthServerException;
use Livewire\Exceptions\ComponentNotFoundException;
use Livewire\Exceptions\PublicPropertyNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Throwable;
class Handler extends ExceptionHandler
{
@@ -21,17 +32,19 @@ class Handler extends ExceptionHandler
* @var array
*/
protected $dontReport = [
\Illuminate\Auth\AuthenticationException::class,
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
\Intervention\Image\Exception\NotSupportedException::class,
\League\OAuth2\Server\Exception\OAuthServerException::class,
AuthenticationException::class,
AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
TokenMismatchException::class,
ValidationException::class,
NotSupportedException::class,
OAuthServerException::class,
JsonException::class,
SCIMException::class, //these generally don't need to be reported
SCIMException::class, // these generally don't need to be reported
InvalidFormatException::class,
PublicPropertyNotFoundException::class,
ComponentNotFoundException::class,
];
/**
@@ -39,7 +52,6 @@ class Handler extends ExceptionHandler
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Throwable $exception
* @return void
*/
public function report(Throwable $exception)
@@ -48,23 +60,34 @@ class Handler extends ExceptionHandler
if (class_exists(Log::class)) {
Log::error($exception);
}
return parent::report($exception);
}
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
*
* @param Request $request
* @param \Exception $e
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response
* @return JsonResponse|RedirectResponse|Response
*/
public function render($request, Throwable $e)
{
// Livewire tried to set a property that doesn't exist (e.g. stale browser state sending a bare "0" as a property name)
if ($e instanceof PublicPropertyNotFoundException) {
return response()->json(['message' => $e->getMessage()], 422);
}
// A request named a Livewire component that doesn't exist in this app (e.g. bots probing
// for Filament endpoints). Return 404 so it doesn't surface as a 500.
if ($e instanceof ComponentNotFoundException) {
return response()->json(['message' => 'Component not found.'], 404);
}
// CSRF token mismatch error
if ($e instanceof \Illuminate\Session\TokenMismatchException) {
if ($e instanceof TokenMismatchException) {
return redirect()->back()->with('error', trans('general.token_expired'));
}
@@ -78,9 +101,10 @@ class Handler extends ExceptionHandler
if ($e instanceof SCIMException) {
try {
$e->report(); // logs as 'debug', so shouldn't get too noisy
} catch(\Exception $reportException) {
//do nothing
} catch (\Exception $reportException) {
// do nothing
}
return $e->render($request); // ALL SCIMExceptions have the 'render()' method
}
@@ -98,9 +122,10 @@ class Handler extends ExceptionHandler
}
// Handle API requests that fail because the model doesn't exist
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
if ($e instanceof ModelNotFoundException) {
$className = last(explode('\\', $e->getModel()));
return response()->json(Helper::formatStandardApiResponse('error', null, $className . ' not found'), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, $className.' not found'), 200);
}
// Handle API requests that fail because of an HTTP status code and return a useful error message
@@ -111,8 +136,8 @@ class Handler extends ExceptionHandler
// API throttle requests are handled in the RouteServiceProvider configureRateLimiting() method, so we don't need to handle them here
switch ($e->getStatusCode()) {
case '404':
return response()->json(Helper::formatStandardApiResponse('error', null, $statusCode . ' endpoint not found'), 404);
case '405':
return response()->json(Helper::formatStandardApiResponse('error', null, $statusCode.' endpoint not found'), 404);
case '405':
return response()->json(Helper::formatStandardApiResponse('error', null, 'Method not allowed'), 405);
default:
return response()->json(Helper::formatStandardApiResponse('error', null, $statusCode), $statusCode);
@@ -124,19 +149,20 @@ class Handler extends ExceptionHandler
// never even get to the controller where we normally nicely format JSON responses
if ($e instanceof ValidationException) {
$response = $this->invalidJson($request, $e);
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), 200);
}
}
// 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) {
if ($e instanceof ModelNotFoundException) {
$ids = method_exists($e, 'getIds') ? $e->getIds() : [];
if (in_array('bulkedit', $ids, true)) {
$error_array = session()->get('bulk_asset_errors');
$error_array = session()->get('bulk_asset_errors');
return redirect()
->route('hardware.index')
->withErrors($error_array, 'bulk_asset_errors')
@@ -144,7 +170,7 @@ class Handler extends ExceptionHandler
}
// This gets the MVC model name from the exception and formats in a way that's less fugly
$model_name = trim(strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel()))))));
$model_name = trim(strtolower(implode(' ', preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel()))))));
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
// Sigh.
@@ -162,6 +188,8 @@ class Handler extends ExceptionHandler
$route = 'licenses.index';
} elseif (($route === 'customfieldsets.index') || ($route === 'customfields.index')) {
$route = 'fields.index';
} elseif ($route == 'actionlogs.index') {
$route = 'home';
}
return redirect()
@@ -169,28 +197,26 @@ class Handler extends ExceptionHandler
->withError(trans('general.generic_model_not_found', ['model' => $model_name]));
}
if ($this->isHttpException($e) && (isset($statusCode)) && ($statusCode == '404' )) {
if ($this->isHttpException($e) && (isset($statusCode)) && ($statusCode == '404')) {
return response()->view('layouts/basic', [
'content' => view('errors/404')
],$statusCode);
'content' => view('errors/404'),
], $statusCode);
}
return parent::render($request, $e);
}
/**
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
* @param Request $request
* @return JsonResponse|RedirectResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthorized or unauthenticated.'], 401);
return response()->json(['error' => trans('general.unauthorized')], 401);
}
return redirect()->guest('login');
@@ -201,8 +227,7 @@ class Handler extends ExceptionHandler
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors()), 200);
}
/**
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasAccessories extends ItemStillHasChildren
{
//
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasAssetModels extends ItemStillHasChildren
{
//
+1 -5
View File
@@ -2,8 +2,4 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasAssets extends ItemStillHasChildren
{
}
class ItemStillHasAssets extends ItemStillHasChildren {}
+3 -3
View File
@@ -6,9 +6,9 @@ use Exception;
class ItemStillHasChildren extends Exception
{
//public function __construct($message, $code = 0, Exception $previous = null, $parent, $children)
//{
// public function __construct($message, $code = 0, Exception $previous = null, $parent, $children)
// {
// trans()
//
//}
// }
}
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasComponents extends ItemStillHasChildren
{
//
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasConsumables extends ItemStillHasChildren
{
//
-2
View File
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasLicenses extends ItemStillHasChildren
{
//
@@ -2,8 +2,6 @@
namespace App\Exceptions;
use Exception;
class ItemStillHasMaintenances extends ItemStillHasChildren
{
//
+1 -4
View File
@@ -4,7 +4,4 @@ namespace App\Exceptions;
use Exception;
class UserDoestExistException extends Exception
{
}
class UserDoestExistException extends Exception {}
+487 -288
View File
File diff suppressed because it is too large Load Diff
+96 -14
View File
@@ -4,17 +4,24 @@ namespace App\Helpers;
class IconHelper
{
public static function icon($type) {
public static function icon($type)
{
switch ($type) {
case 'apple':
return 'fa-brands fa-apple';
case 'google':
return 'fa-brands fa-google';
case 'checkout':
return 'fa-solid fa-rotate-left';
case 'checkin':
return 'fa-solid fa-rotate-right';
case 'edit':
case 'update':
return 'fas fa-pencil-alt';
case 'clone':
return 'far fa-clone';
case 'upload':
return 'fa-solid fa-file-circle-plus';
case 'delete':
case 'upload deleted':
return 'fas fa-trash';
@@ -36,6 +43,8 @@ class IconHelper
return 'fa-solid fa-user';
case 'users':
return 'fas fa-users';
case 'supplier':
return 'fa-solid fa-store';
case 'restore':
return 'fa-solid fa-trash-arrow-up';
case 'external-link':
@@ -46,6 +55,8 @@ class IconHelper
return 'fa-regular fa-envelope';
case 'phone':
return 'fa-solid fa-phone';
case 'fax':
return 'fa-solid fa-fax';
case 'mobile':
return 'fas fa-mobile-screen-button';
case 'long-arrow-right':
@@ -53,7 +64,7 @@ class IconHelper
case 'download':
return 'fas fa-download';
case 'checkmark':
return 'fas fa-check icon-white';
return 'fas fa-check';
case 'x':
return 'fas fa-times';
case 'logout':
@@ -67,6 +78,7 @@ class IconHelper
case 'angle-right':
return 'fas fa-angle-right';
case 'warning':
case 'alert':
return 'fas fa-exclamation-triangle';
case 'kits':
return 'fas fa-object-group';
@@ -85,8 +97,11 @@ class IconHelper
case 'licenses':
case 'license':
return 'far fa-save';
case 'requests':
case 'requestable':
return 'fas fa-laptop';
case 'request':
case 'requested':
return 'fa-solid fa-bell-concierge';
case 'reports':
return 'fas fa-chart-bar';
case 'heart':
@@ -106,13 +121,14 @@ class IconHelper
case 'password':
return 'fa-solid fa-key';
case 'api-key':
return 'fa-solid fa-user-secret';
return 'fas fa-user-secret';
case 'nav-toggle':
return 'fas fa-bars';
case 'dashboard':
return 'fas fa-tachometer-alt';
case 'info-circle':
return 'fas fa-info-circle';
case 'info':
return 'fas fa-info-circle';
case 'caret-right':
return 'fa fa-caret-right';
case 'caret-up':
@@ -130,19 +146,29 @@ class IconHelper
case 'paperclip':
return 'fas fa-paperclip';
case 'files':
return 'fa-regular fa-file';
return 'fa-solid fa-file-contract';
case 'contact-card':
return 'fa-regular fa-id-card';
case 'eula':
case 'eulas':
return 'fa-regular fa-handshake';
case 'star':
case 'vip':
return 'fa-solid fa-star';
case 'remote':
return 'fa-solid fa-house-laptop';
case 'more-info':
case 'help':
case 'support':
return 'far fa-life-ring';
case 'calendar':
return 'fas fa-calendar';
case 'plus':
return 'fas fa-plus';
case 'history':
return 'fas fa-history';
return 'fa-solid fa-timeline';
case 'more-files':
return 'fa-solid fa-laptop-file';
case 'maintenances':
return 'fas fa-wrench';
return 'fa-solid fa-screwdriver-wrench';
case 'seats':
return 'far fa-list-alt';
case 'globe-us':
@@ -188,11 +214,11 @@ class IconHelper
return 'fas fa-crosshairs';
case 'oauth':
return 'fas fa-user-secret';
case 'employee_num' :
case 'employee_num':
return 'fa-regular fa-id-card';
case 'department' :
case 'department':
return 'fa-solid fa-building-user';
case 'home' :
case 'home':
return 'fa-solid fa-house';
case 'note':
case 'notes':
@@ -201,6 +227,62 @@ class IconHelper
return 'fa-solid fa-lightbulb';
case 'highlight':
return 'fa-solid fa-highlighter';
case 'manager':
return 'fa-solid fa-user-tie';
case 'company':
return 'fa-regular fa-building';
case 'parent':
return 'fa-solid fa-building-flag';
case 'number':
return 'fa-solid fa-hashtag';
case 'depreciation':
return 'fa-solid fa-arrows-down-to-line';
case 'calendar':
return 'fas fa-calendar';
case 'depreciation-calendar':
case 'expiration':
case 'terminates':
return 'fa-regular fa-calendar-xmark';
case 'deleted-date':
case 'end_date':
return 'fa-solid fa-calendar-xmark';
case 'expected_checkin':
case 'start_date':
return 'fa-solid fa-calendar-check';
case 'eol':
return 'fa-regular fa-calendar-days';
case 'manufacturer':
return 'fa-solid fa-industry';
case 'fieldset':
return 'fa-regular fa-rectangle-list';
case 'category':
return 'fa-solid fa-icons';
case 'cost':
return 'fa-solid fa-money-bills';
case 'available':
return 'fa-solid fa-box';
case 'checkedout':
return 'fa-solid fa-box-open';
case 'purchase_order':
return 'fa-solid fa-file-invoice-dollar';
case 'order':
return 'fa-solid fa-file-invoice';
case 'checkout-all':
return 'fa-solid fa-arrows-down-to-people';
case 'checkin-all':
return 'fa-solid fa-arrows-turn-right';
case 'square-right':
return 'fa-regular fa-square-caret-right';
case 'square-left':
return 'fa-regular fa-square-caret-left';
case 'square':
return 'fa-solid fa-square';
case 'models':
case 'model':
return 'fa-solid fa-boxes-stacked';
case 'min-qty':
return 'fa-solid fa-chart-pie';
}
}
}
+22 -43
View File
@@ -2,32 +2,39 @@
namespace App\Helpers;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Response;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
class StorageHelper
{
public static function downloader($filename, $disk = 'default') : BinaryFileResponse | RedirectResponse | StreamedResponse
public static function downloader($filename, $disk = 'default'): BinaryFileResponse|RedirectResponse|StreamedResponse
{
if ($disk == 'default') {
$disk = config('filesystems.default');
}
switch (config("filesystems.disks.$disk.driver")) {
case 'local':
return response()->download(Storage::disk($disk)->path($filename)); //works for PRIVATE or public?!
case 'local':
return response()->download(Storage::disk($disk)->path($filename)); // works for PRIVATE or public?!
case 's3':
return redirect()->away(Storage::disk($disk)->temporaryUrl($filename, now()->addMinutes(5))); //works for private or public, I guess?
case 's3':
Storage::disk($disk)->temporaryUrl(
$filename,
now()->addMinutes(5),
[
'ResponseContentType' => 'application/octet-stream',
'ResponseContentDisposition' => 'attachment; filename=download-file',
]
);
default:
return Storage::disk($disk)->download($filename);
default:
return Storage::disk($disk)->download($filename);
}
}
public static function getMediaType($file_with_path) {
public static function getMediaType($file_with_path)
{
// Get the file extension and determine the media type
if (Storage::exists($file_with_path)) {
@@ -64,6 +71,7 @@ class StorageHelper
return $extension; // Default for unknown types
}
}
return null;
}
@@ -72,8 +80,9 @@ class StorageHelper
* to determine that they are safe to display inline.
*
* @author <A. Gianotto> [<snipe@snipe.net]>
*
* @since v7.0.14
* @param $file_with_path
*
* @return bool
*/
public static function allowSafeInline($file_with_path)
@@ -96,11 +105,11 @@ class StorageHelper
'webp',
];
// The file exists and is allowed to be displayed inline
if (Storage::exists($file_with_path) && (in_array(pathinfo($file_with_path, PATHINFO_EXTENSION), $allowed_inline))) {
return true;
}
return false;
}
@@ -116,34 +125,4 @@ class StorageHelper
return null;
}
/**
* Decide whether to show the file inline or download it.
*/
public static function showOrDownloadFile($file, $filename)
{
$headers = [];
if (request('inline') == 'true') {
$headers = [
'Content-Disposition' => 'inline',
];
// This is NOT allowed as inline - force it to be displayed as text in the browser
if (self::allowSafeInline($file) != true) {
$headers = array_merge($headers, ['Content-Type' => 'text/plain']);
}
}
// Everything else seems okay, but the file doesn't exist on the server.
if (Storage::missing($file)) {
throw new FileNotFoundException();
}
return Storage::download($file, $filename, $headers);
}
}
@@ -7,11 +7,11 @@ use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Models\Accessory;
use App\Models\Company;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log;
/** This controller handles all actions related to Accessories for
* the Snipe-IT Asset Management application.
@@ -25,12 +25,14 @@ class AccessoriesController extends Controller
* the content for the accessories listing, which is generated in getDatatable.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @see AccessoriesController::getDatatable() method that generates the JSON response
* @since [v1.0]
*/
public function index() : View
public function index(): View
{
$this->authorize('index', Accessory::class);
return view('accessories.index');
}
@@ -39,43 +41,42 @@ class AccessoriesController extends Controller
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function create() : View
public function create(): View
{
$this->authorize('create', Accessory::class);
$category_type = 'accessory';
return view('accessories/edit')->with('category_type', $category_type)
->with('item', new Accessory);
->with('item', new Accessory);
}
/**
* Validate and save new Accessory from form post
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param ImageUploadRequest $request
*/
public function store(ImageUploadRequest $request) : RedirectResponse
public function store(ImageUploadRequest $request): RedirectResponse
{
$this->authorize(Accessory::class);
// create a new model instance
$accessory = new Accessory();
$accessory = new Accessory;
// Update the accessory data
$accessory->name = request('name');
$accessory->category_id = request('category_id');
$accessory->location_id = request('location_id');
$accessory->min_amt = request('min_amt');
$accessory->company_id = Company::getIdForCurrentUser(request('company_id'));
$accessory->order_number = request('order_number');
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->created_by = auth()->id();
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');
$accessory->name = request('name');
$accessory->category_id = request('category_id');
$accessory->location_id = request('location_id');
$accessory->min_amt = request('min_amt');
$accessory->company_id = Company::getIdForCurrentUser(request('company_id'));
$accessory->order_number = request('order_number');
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->created_by = auth()->id();
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');
if ($request->has('use_cloned_image')) {
$cloned_model_img = Accessory::select('image')->find($request->input('clone_image_from_id'));
@@ -90,10 +91,10 @@ class AccessoriesController extends Controller
$accessory = $request->handleImages($accessory);
}
if($request->get('redirect_option') === 'back'){
if ($request->input('redirect_option') === 'back') {
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->get('redirect_option')]);
session()->put(['redirect_option' => $request->input('redirect_option')]);
}
// Was the accessory created?
@@ -110,11 +111,14 @@ class AccessoriesController extends Controller
* Return view for the Accessory update form, prepopulated with existing data
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $accessoryId
*
* @param int $accessoryId
*/
public function edit(Accessory $accessory) : View | RedirectResponse
public function edit(Accessory $accessory): View|RedirectResponse
{
$this->authorize('update', Accessory::class);
$this->authorize('update', $accessory);
session()->put('url.intended', url()->previous());
return view('accessories.edit')->with('item', $accessory)->with('category_type', 'accessory');
}
@@ -122,13 +126,15 @@ class AccessoriesController extends Controller
* Returns a view that presents a form to clone an accessory.
*
* @author [J. Vinsmoke]
* @param int $accessoryId
*
* @param int $accessoryId
*
* @since [v6.0]
*/
public function getClone(Accessory $accessory) : View | RedirectResponse
public function getClone(Accessory $accessory): View|RedirectResponse
{
$this->authorize('create', Accessory::class);
$this->authorize('create', $accessory);
$cloned = clone $accessory;
$accessory_to_clone = $accessory;
$cloned->id = null;
@@ -137,24 +143,24 @@ class AccessoriesController extends Controller
return view('accessories/edit')
->with('cloned_model', $accessory_to_clone)
->with('item', $cloned);
}
/**
* Save edited Accessory from form post
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param ImageUploadRequest $request
* @param int $accessoryId
*
* @param int $accessoryId
*/
public function update(ImageUploadRequest $request, Accessory $accessory) : RedirectResponse
public function update(ImageUploadRequest $request, Accessory $accessory): RedirectResponse
{
$this->authorize('update', $accessory);
if ($accessory = Accessory::withCount('checkouts as checkouts_count')->find($accessory->id)) {
$this->authorize($accessory);
$validator = Validator::make($request->all(), [
"qty" => "required|numeric|min:$accessory->checkouts_count"
'qty' => "required|numeric|min:$accessory->checkouts_count",
]);
if ($validator->fails()) {
@@ -163,8 +169,6 @@ class AccessoriesController extends Controller
->withInput();
}
// Update the accessory data
$accessory->name = request('name');
$accessory->location_id = request('location_id');
@@ -182,10 +186,10 @@ class AccessoriesController extends Controller
$accessory = $request->handleImages($accessory);
if($request->get('redirect_option') === 'back'){
if ($request->input('redirect_option') === 'back') {
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->get('redirect_option')]);
session()->put(['redirect_option' => $request->input('redirect_option')]);
}
if ($accessory->save()) {
@@ -203,51 +207,48 @@ class AccessoriesController extends Controller
* Delete the given accessory.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $accessoryId
*
* @param int $accessoryId
*/
public function destroy($accessoryId) : RedirectResponse
public function destroy(Accessory $accessory): RedirectResponse
{
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('delete', $accessory);
$accessory->loadCount('checkouts as checkouts_count');
$this->authorize($accessory);
if ($accessory->checkouts_count > 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/general.delete_disabled'));
}
if ($accessory->image) {
try {
Storage::disk('public')->delete('accessories'.'/'.$accessory->image);
} catch (\Exception $e) {
Log::debug($e);
if ($accessory->isDeletable()) {
if ($accessory->image) {
try {
Storage::disk('public')->delete('accessories'.'/'.$accessory->image);
} catch (\Exception $e) {
Log::debug($e);
}
}
$accessory->delete();
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.delete.success'));
}
$accessory->delete();
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.delete.success'));
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/general.delete_disabled'));
}
/**
* Returns a view that invokes the ajax table which contains
* the content for the accessory detail view, which is generated in getDataView.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $accessoryID
*
* @param int $accessoryID
*
* @see AccessoriesController::getDataView() method that generates the JSON response
* @since [v1.0]
*/
public function show(Accessory $accessory) : View | RedirectResponse
public function show(Accessory $accessory): View|RedirectResponse
{
$accessory->loadCount('checkouts as checkouts_count');
$accessory->load(['adminuser' => fn($query) => $query->withTrashed()]);
$this->authorize('view', $accessory);
$accessory->loadCount('checkouts as checkouts_count');
$accessory->load(['adminuser' => fn ($query) => $query->withTrashed()]);
return view('accessories.view', compact('accessory'));
}
}
@@ -7,10 +7,10 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
class AccessoryCheckinController extends Controller
{
@@ -18,25 +18,26 @@ class AccessoryCheckinController extends Controller
* Check the accessory back into inventory
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param Request $request
* @param int $accessoryUserId
* @param string $backto
*
* @param Request $request
* @param int $accessoryUserId
* @param string $backto
*/
public function create($accessoryUserId = null, $backto = null) : View | RedirectResponse
public function create($accessoryUserId = null, $backto = null): View|RedirectResponse
{
if (is_null($accessory_user = DB::table('accessories_checkout')->find($accessoryUserId))) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.not_found'));
}
$accessory = Accessory::find($accessory_user->accessory_id);
$this->authorize('checkin', $accessory);
//based on what the accessory is checked out to the target redirect option will be displayed accordingly.
// 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', 'target_option'))->with('backto', $backto);
@@ -46,17 +47,20 @@ class AccessoryCheckinController extends Controller
* Check in the item so that it can be checked out again to someone else
*
* @uses Accessory::checkin_email() to determine if an email can and should be sent
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param null $accessoryCheckoutId
* @param string $backto
*
* @param null $accessoryCheckoutId
* @param string $backto
*/
public function store(Request $request, $accessoryCheckoutId = null, $backto = null) : RedirectResponse
public function store(Request $request, $accessoryCheckoutId = null, $backto = null): RedirectResponse
{
if (is_null($accessory_checkout = AccessoryCheckout::find($accessoryCheckoutId))) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
$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) {
@@ -65,7 +69,6 @@ class AccessoryCheckinController extends Controller
'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')) {
@@ -76,11 +79,12 @@ class AccessoryCheckinController extends Controller
if ($accessory_checkout->delete()) {
event(new CheckoutableCheckedIn($accessory, $accessory_checkout->assignedTo, auth()->user(), $request->input('note'), $checkin_at));
session()->put(['redirect_option' => $request->get('redirect_option')]);
session()->put(['redirect_option' => $request->input('redirect_option')]);
return Helper::getRedirectOption($request, $accessory->id, 'Accessories')
->with('success', trans('admin/accessories/message.checkin.success'));
}
// Redirect to the accessory management page with error
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkin.error'));
}

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