Compare commits

..

2804 Commits

Author SHA1 Message Date
snipe
dffff07436 Removed codacy config 2026-03-13 18:29:21 +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
0d257d956f Undo json encode 2026-03-12 14:54:18 +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
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
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
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
9317d6551d Fixed #18653 - “select company” to “company” in user edit 🙄 2026-03-10 20:25:53 +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
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
Marcus Moore
3fc8b976fc Merge branch 'develop' into form-macros
# Conflicts:
#	resources/macros/macros.php
2026-03-10 10:12:31 -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
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
d0dbd1e561 Link parent company 2026-03-10 11:40:03 +00:00
snipe
e7eb4f0e80 More display_name 2026-03-10 10:25:01 +00:00
snipe
676a995889 Use update check for files controller api 2026-03-10 10:22:39 +00:00
snipe
a44fe14de1 Use display_name in more places 2026-03-10 10:14:27 +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
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
b886e11670 Fixed user API tests 2026-03-07 20:50:18 +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
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
45ddaf1b72 Temp comment out location observer 2026-03-06 20:14:56 +00:00
snipe
7595c922fa Fixed #18043 - added location logging 2026-03-06 14:03:37 +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
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
420ba5f261 Fixed #18341 - remove action button from user profile view 2026-03-06 06:45:46 +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
c4aa10baf8 Added user company to custom asset report 2026-03-06 05:59:11 +00:00
snipe
86f647e714 Improved bulk audit bg 2026-03-06 05:39:09 +00:00
snipe
64f5d40fd9 Removed duplicate code 2026-03-06 05:21:59 +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
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
Marcus Moore
93bf91869b Fix checkin all seats button 2026-03-03 14:57:43 -08: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
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
378d9e008e Removed truncate that ran after maintenance seeder 2026-02-25 19:46:09 +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
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
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
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
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
7b7e6c7971 Fixed maintence image display 2026-02-25 12:39:29 +00:00
snipe
025fb30335 Added user email to exportable field in custom report 2026-02-25 12:03:23 +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
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
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
a86ffc29d1 Added display name to search term in advanced search 2026-02-23 14:43:55 +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
f82cdabccd More info anel refinements 2026-02-23 11:41:45 +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
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
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
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
10aee6bb5f Fixed tab pane name 2026-02-20 13:10:14 +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
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
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
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
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
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
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
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
c31f1d2cce Nicer row selected color 2026-02-19 11:42:45 +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
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
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
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
snipe
05f3bf633e Fixed typeError for isManagerOf in manager view of EULAs 2026-02-12 20:21:15 +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
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
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
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
24d5969ce8 Bump versions of our branch of laravel-scim-server to reduce reollbar usage 2026-01-14 14:37:47 +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
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
snipe
58a47cb52b Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2025-11-24 12:32:17 +00:00
snipe
c7cb4674f5 Bumped version 2025-11-24 12:31:50 +00:00
snipe
523df21d83 Merge remote-tracking branch 'origin/develop' 2025-11-24 12:30:22 +00:00
snipe
82314076a9 Updated translations 2025-11-24 12:30:07 +00:00
snipe
d04bf2e8f2 Merge remote-tracking branch 'origin/develop' 2025-11-24 11:37:44 +00:00
snipe
a1c67b5154 Fixed user details toggle 2025-11-24 11:37:14 +00:00
snipe
3e343fe8b7 Merge pull request #18236 from grokability/dependabot/github_actions/develop/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-11-24 08:33:46 +00:00
dependabot[bot]
e288c942ee Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 08:04:19 +00:00
snipe
7a1ccb0d53 Nicer query 2025-11-23 14:09:55 +00:00
snipe
89656c7e65 Merge remote-tracking branch 'origin/develop' 2025-11-23 14:05:39 +00:00
snipe
7f76198139 Fixed RB-20501 - correctly return error response when license+seat don’t match
TypeError: App\Http\Transformers\LicenseSeatsTransformer::transformLicenseSeat(): Argument #1 ($seat) must be of type App\Models\LicenseSeat, bool given, called in /snipe-it/app/Http/Controllers/Api/LicenseSeatsController.php on line 92
2025-11-23 14:05:24 +00:00
snipe
5ff813f9b7 Merge pull request #18233 from grokability/develop
Merging from dev
2025-11-22 14:24:36 +00:00
snipe
69994e0c11 Merge pull request #18232 from grokability/check-for-valid-json-on-filter
Added filter form request to validate JSON
2025-11-22 14:22:33 +00:00
snipe
aa959fbe92 Added filter form request to validate JSON 2025-11-22 14:03:58 +00:00
snipe
948b7cda15 Merge remote-tracking branch 'origin/develop' 2025-11-22 12:04:28 +00:00
snipe
644ef040d0 Merge pull request #18226 from Godmartinz/audit-notification-rb-19608
Fixes RB-19608 adds safe guards, adds Audit notification for google workspace, adds tests
2025-11-22 11:41:57 +00:00
snipe
33839d7244 Re-added the horizontal class 2025-11-22 11:14:59 +00:00
Godfrey M
48270cb9b4 url trim 2025-11-21 10:11:28 -08:00
Godfrey M
cd42760b68 notes 2025-11-20 14:25:13 -08:00
Godfrey M
1116da389e add google chat to audit notification test 2025-11-20 14:24:03 -08:00
Godfrey M
24d7ae4a2f added google chat to audit notifications" 2025-11-20 14:22:08 -08:00
Godfrey M
e598ef6e05 adds tests, webhook enable settings 2025-11-20 13:51:14 -08:00
snipe
6601e73069 Merge remote-tracking branch 'origin/develop' 2025-11-20 20:15:44 +00:00
snipe
7f2a80552b Fixed form layout for SAML 2025-11-20 20:15:34 +00:00
Godfrey M
eceeb4aa3b return if there is no item for the audit notification 2025-11-20 10:56:43 -08:00
snipe
b5c7f374f3 Merge remote-tracking branch 'origin/develop' 2025-11-20 13:44:19 +00:00
snipe
9d08e2d297 Clearer language 2025-11-20 13:44:09 +00:00
snipe
f2303ae2dc Merge remote-tracking branch 'origin/develop' 2025-11-20 13:28:00 +00:00
snipe
4d44fd47c3 Merge pull request #18217 from Godmartinz/unaccepted-row-null-fix
Fixes FD-52005 Adds null safe operators to unacceptable items report
2025-11-20 13:27:24 +00:00
snipe
88635cb6c3 Merge pull request #18223 from grokability/#18114-fixed-declined-notification-added-x-header
Fixed #18114 - include declined item name, added app headers
2025-11-20 13:27:01 +00:00
snipe
1687fcc035 Small subject tweaks 2025-11-20 13:23:17 +00:00
snipe
39e7937458 Fixed #18114 - include declined item name, added app headers 2025-11-20 12:58:53 +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
Godfrey M
60ff2970f0 safeguard null rows by filtering rows in query 2025-11-19 11:35:24 -08:00
Godfrey M
212cd026a3 add null safe operators to company and csv plain values 2025-11-18 12:36:07 -08:00
snipe
cf47f8fea9 Merge pull request #18216 from Godmartinz/fix-license-patch-to-allow-update-of-other-fields
Fixed #18024 License Seat update/patch method
2025-11-18 20:29:18 +00:00
akemidx
c797472bcc migration, and front end 2025-11-18 15:03:28 -05:00
Godfrey M
4b45ffd841 updating fields of checkout now works 2025-11-18 11:35:26 -08:00
snipe
69a57b77c9 Merge remote-tracking branch 'origin/develop' 2025-11-18 13:13:48 +00:00
snipe
5daba6034d Merge pull request #18213 from grokability/#18202-copy-to-clipboard-spaces
Fixed #18202 - copy to clipboard adding spaces in FF
2025-11-18 13:13:29 +00:00
snipe
4e5c19e932 Fixed #18202 - copy to clipboard adding spaces in FF 2025-11-18 13:11:40 +00:00
snipe
5eb73baf5e Removed duplicate formatter 2025-11-18 12:54:21 +00:00
snipe
d819f31bdd Merge remote-tracking branch 'origin/develop' 2025-11-18 12:01:01 +00:00
snipe
a97c453706 Small fixes for user profiles 2025-11-18 11:59:54 +00:00
snipe
5ee955a713 Merge remote-tracking branch 'origin/develop' 2025-11-18 11:40:23 +00:00
snipe
57224f7304 Fixed #18209 - translate asset filters 2025-11-18 11:40:15 +00:00
snipe
270d145466 Merge remote-tracking branch 'origin/develop' 2025-11-18 11:15:31 +00:00
snipe
c564ee6093 Fixed #18211 - limit regex field to 191 characters 2025-11-18 11:15:15 +00:00
snipe
caaa9ab23e Merge pull request #18122 from chruoss/master
Renamed L6009 -> L4736 and added correct L6009
2025-11-17 21:40:08 +00:00
snipe
b6d2c6d28c Merge pull request #18208 from marcusmoore/fixes/null-array-filter
Fixed potential exception while filtering in users index endpoint
2025-11-17 21:39:08 +00:00
Marcus Moore
c36c8968d3 Avoid passing null to array_filter in user controller 2025-11-17 10:26:29 -08:00
snipe
b019af1851 Merge remote-tracking branch 'origin/develop' 2025-11-17 17:50:30 +00:00
snipe
bcd32da2bc Remove loading user count since we don’t use it for depts 2025-11-17 17:34:43 +00:00
snipe
6f97a40372 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-11-17 13:37:16 +00:00
snipe
c56c7ddd03 Merge pull request #18201 from grokability/#18185-added-tag-color-to-companies
Added #18185 added tag color to companies
2025-11-17 13:33:17 +00:00
snipe
9a0dd604c9 Small layout tweaks 2025-11-17 13:21:01 +00:00
snipe
a1dec176a1 Added mobile 2025-11-17 13:09:13 +00:00
snipe
67032d068d Removed space 2025-11-17 13:09:08 +00:00
snipe
401c83945d Updated gate check on presenters 2025-11-17 13:07:28 +00:00
snipe
ed6d020edb Fixed permission name for locations 2025-11-17 12:31:18 +00:00
snipe
8eb5600b1e Fixed manufacturer link 2025-11-17 12:19:27 +00:00
snipe
9c4cd69106 Updated checkout blades 2025-11-17 12:15:38 +00:00
snipe
64cbe0c960 Use dept presenter 2025-11-17 12:15:25 +00:00
snipe
be70b217d9 Updated presenters 2025-11-17 12:11:38 +00:00
snipe
b4f5260dda Updated controllers to use tag_color 2025-11-17 11:36:11 +00:00
snipe
83e446f99c Updated formatters to use tag_color if given 2025-11-17 11:18:38 +00:00
snipe
767139cf0b Updated select2 to use tag_color if available 2025-11-17 11:18:21 +00:00
snipe
e3ac60111f Added tag_color to factories 2025-11-17 11:18:02 +00:00
snipe
c694c11724 Added presenter reference 2025-11-15 14:58:02 +00:00
snipe
b50765a151 Added more to the views 2025-11-15 14:50:51 +00:00
snipe
590f77bdb4 Updated controllers and presenters 2025-11-14 17:58:27 +00:00
snipe
09575e5312 Added tag color to transformer 2025-11-14 15:58:07 +00:00
snipe
1693825dd0 Added translations 2025-11-14 15:57:57 +00:00
snipe
5a89056112 Added migration 2025-11-14 15:57:47 +00:00
snipe
2ee51bb282 Added tag color to transformer 2025-11-14 15:57:39 +00:00
snipe
ea7cffc1a3 Made tag_color fillable 2025-11-14 15:57:27 +00:00
snipe
c20d1b82ae Added tag color to controllers 2025-11-14 15:57:18 +00:00
snipe
607781382f Merge remote-tracking branch 'origin/develop' 2025-11-14 14:10:05 +00:00
snipe
4e8c1e853b Fixed markdown in upcoming audits email 2025-11-14 14:09:53 +00:00
snipe
2c6869501e Merge remote-tracking branch 'origin/develop' 2025-11-13 16:46:32 +00:00
snipe
4509e1d1dc Merge pull request #18195 from grokability/#18189-day-of-week
Fixed #18189 - added option to pick the day the week starts on
2025-11-13 16:46:15 +00:00
snipe
6b9d4941be Language tweaks 2025-11-13 16:35:40 +00:00
snipe
308cd6b91d Fixed #18189 - added option to pick the day the week starts on 2025-11-13 16:33:08 +00:00
snipe
23b54de8bd Merge remote-tracking branch 'origin/develop' 2025-11-13 15:37:42 +00:00
snipe
bd742aec9c Merge pull request #18192 from Godmartinz/fix-requestable-asset-model-query
Fixes FD51910 requestable asset model available quantity count
2025-11-13 15:37:24 +00:00
snipe
d2ab3071a6 Merge pull request #18193 from ubc-cpsc/bugfix/CVE-2025-64500
Fixes CVE-2025-64500: Incorrect parsing of PATH_INFO can lead to limited authorization
2025-11-13 09:52:50 +00:00
Joël Pittet
1dd4c161f0 Fixes CVE-2025-64500 2025-11-12 18:09:37 -08:00
Godfrey M
5e48dd45b2 remove unnecessary code 2025-11-12 16:27:04 -08:00
Godfrey M
601d6e7377 fixes requestable models query 2025-11-12 16:25:08 -08:00
snipe
3934b40282 Merge remote-tracking branch 'origin/develop' 2025-11-12 20:59:15 +00:00
snipe
d43be271e6 Small tweaks to user group listings 2025-11-12 20:59:06 +00:00
snipe
d3c9963051 Merge remote-tracking branch 'origin/develop' 2025-11-12 20:25:00 +00:00
snipe
92a3bdf4e9 Merge pull request #18191 from grokability/limit-adding-users-to-group-if-over-limit
Set a limit on number of users for group user loading
2025-11-12 20:24:24 +00:00
snipe
fa2aafe41f Set a limit on number of users for group user loading 2025-11-12 20:19:52 +00:00
snipe
bc5da2532c Merge remote-tracking branch 'origin/develop' 2025-11-12 16:02:01 +00:00
snipe
a7be1acbd8 Merge pull request #18190 from grokability/improved-checkin-reminders
Improved overdue checkin alert
2025-11-12 16:01:32 +00:00
snipe
fbe2ae03ff Use due_checkin_days setting instead of audit warning days 2025-11-12 15:52:16 +00:00
snipe
d1a492f953 Improved overdue checkin alert 2025-11-12 15:38:47 +00:00
snipe
ac6ea8bdcc Merge remote-tracking branch 'origin/develop' 2025-11-11 18:43:54 +00:00
snipe
352807c2d7 Fixed RB-20498 - Check that logo file exists on acceptance 2025-11-11 18:43:39 +00: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
snipe
dc4cf8496a Merge remote-tracking branch 'origin/develop' 2025-11-11 14:01:54 +00:00
snipe
3aa046bfa7 Include trashed in other acceptance tasks 2025-11-11 14:00:48 +00:00
snipe
ed79d21e1b Merge remote-tracking branch 'origin/develop' 2025-11-11 13:53:55 +00:00
snipe
9454ff677b Get deleted objects in unaccepted asset report 2025-11-11 13:53:43 +00:00
snipe
743d340bca Merge remote-tracking branch 'origin/develop' 2025-11-11 13:18:18 +00:00
snipe
a5c7b8f609 Small unaccepted items report fixes 2025-11-11 13:17:56 +00:00
snipe
3d1398ab97 Merge remote-tracking branch 'origin/develop' 2025-11-11 12:29:44 +00:00
snipe
9365d1adc6 Merge pull request #18164 from Godmartinz/fix-accessories-redirect-previous-page
Fixes #18138 redirect to Previous Page from accessories edit screen
2025-11-11 12:29:23 +00:00
snipe
ddd2a96ac5 Clearer message on no inventory to report 2025-11-11 11:52:05 +00:00
Godfrey M
6faf171007 update asset_deployable translation 2025-11-10 16:58:42 -08:00
snipe
7a680ce4ff Merge remote-tracking branch 'origin/develop' 2025-11-10 21:31:28 +00:00
snipe
bf8ff51234 Make suppliers notes nullable by default 2025-11-10 21:31:14 +00:00
snipe
2ac4456f4e Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2025-11-10 20:58:15 +00:00
snipe
7891f52bd4 Merge pull request #18177 from grokability/add-files-to-suppliers
Fixed #12451: Add file upload support to suppliers, changed notes field to text (from varchar)
2025-11-10 20:57:21 +00:00
snipe
baa4a8a461 Migration to change notes on suppliers to text from varchar 2025-11-10 20:53:21 +00:00
snipe
34daffcdf4 Added supplier file uploads 2025-11-10 20:47:45 +00:00
snipe
21baea27a8 Merge pull request #18141 from uberbrady/actiontype_enum_redux
Actiontype enum redux
2025-11-10 18:55:01 +00:00
snipe
e1d3714445 Add @MarvelousAnything as a contributor 2025-11-10 14:15:10 +00:00
snipe
8b7e0a0d78 Add @mohammad-ahmadi1 as a contributor 2025-11-10 14:15:01 +00:00
snipe
a1cc427c9c Add @smarsching as a contributor 2025-11-10 14:14:51 +00:00
snipe
391aa30da2 Bumped version 2025-11-10 13:49:26 +00:00
snipe
5dc675040d Bumped version 2025-11-10 13:48:59 +00:00
snipe
1258eb6533 Merge pull request #17913 from Godmartinz/add_types_to_unaccepted_asset_report
Fixed #15664 - Adds Accessories, Components, Consumables, and Licenses to Unaccepted Assets report
2025-11-10 12:24:13 +00:00
snipe
f92f76b48a Merge remote-tracking branch 'origin/develop' 2025-11-07 13:42:04 +00:00
snipe
83abfc9ca6 Updated language files 2025-11-07 13:41:46 +00:00
snipe
61b6d4dc47 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	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-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-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-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-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-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-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.css.map
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-11-07 13:26:23 +00:00
snipe
b42d6677cc Updated assets 2025-11-07 13:25:45 +00:00
snipe
e8c644a600 Merge pull request #18165 from Godmartinz/border-color-create-new-button-fix
Fixes #18140 Changes border color of create New in Dark modes
2025-11-07 13:21:52 +00:00
snipe
aa041e39eb Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-11-06 21:12:42 +00:00
snipe
9f6a73b290 Merge pull request #18170 from grokability/fix-for-groups
Fixed #18157 - only partial information stored on group save if lower `max_input_vars` and/or `max_multipart_body_parts`
2025-11-06 21:09:42 +00:00
snipe
4d38bd1c62 Renamed variable 2025-11-06 21:07:52 +00:00
snipe
138262114d Added enctype back in 2025-11-06 21:04:55 +00:00
snipe
4073c9e638 Updated ordering 2025-11-06 21:01:20 +00:00
snipe
f1b4877a98 A few small tweaks for new groups 2025-11-06 20:36:51 +00:00
snipe
c39c92d0d7 Mash the ids into a string, fixed disclosure arrows 2025-11-06 20:12:25 +00:00
snipe
90fc48d959 Shim workaround to avoid max_input_vars and max_multipart_body_parts limits
max_input_vars = 2000
max_multipart_body_parts = 2048
2025-11-06 18:17:40 +00:00
Godfrey M
7f10a53105 dark blue 2025-11-05 12:47:10 -08:00
Godfrey M
7ae1b7a765 change border-color of create new 2025-11-05 12:40:29 -08:00
Godfrey M
22a43a0463 adds redirect option fix to accessories update method 2025-11-05 12:19:18 -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
snipe
dea399398a Merge pull request #18161 from Godmartinz/TZE_24mm_E_adjustment
FD-50838: Fixes 24mm_E label sizing
2025-11-05 18:50:42 +00:00
Godfrey M
7434dd9458 final adjustments to 24mm_E label 2025-11-05 09:32:21 -08:00
snipe
723abca34a Merge remote-tracking branch 'origin/develop' 2025-11-05 15:28:40 +00:00
snipe
88e532dbc4 Fixed #18157 - reports permission glitch 2025-11-05 15:24:15 +00:00
snipe
32b28327e9 Merge remote-tracking branch 'origin/develop' 2025-11-04 21:42:05 +00:00
snipe
c5ad451c39 Merge pull request #18156 from grokability/#18119-fix-double-helpering-on-dates-for-asset-acceptance
Fixed #18119 - double formatting for acceptance/decline date
2025-11-04 21:40:58 +00:00
snipe
44bfceeb0f Fixed #18119 - double formatting for acceptance/decline date 2025-11-04 21:36:27 +00:00
snipe
c30131275f Merge remote-tracking branch 'origin/develop' 2025-11-04 21:23:14 +00:00
snipe
37eb63837b Merge pull request #18155 from grokability/#18021-fix-patch-api-with-unique-serial
Override unique_undeleted in the form request
2025-11-04 21:23:00 +00:00
snipe
4ada47e3b0 Use new setting variable since we already have it 2025-11-04 21:12:49 +00:00
snipe
e5c55c9ab3 Fixed typo in the comment 2025-11-04 21:11:54 +00:00
snipe
547b3df7b4 Added more commentary on why we’re intefering with the request 2025-11-04 21:08:48 +00:00
snipe
4100f2600c Override unique_undeleted in the form request 2025-11-04 20:43:31 +00:00
snipe
56218dfcb2 Merge remote-tracking branch 'origin/develop' 2025-11-04 19:39:52 +00:00
snipe
a9574e8fd6 Fixed #18133 - make the disabled toggle JS so it’s clearer 2025-11-04 19:39:35 +00:00
snipe
0d2a75db0a Merge remote-tracking branch 'origin/develop' 2025-11-04 19:04:25 +00:00
snipe
c6269d6bbc Merge pull request #18151 from MarvelousAnything/fixes/test_webhook_content_type
Fix Content-Type Header not being set correctly for testWebhook
2025-11-04 19:03:53 +00:00
snipe
eb9d066844 Merge remote-tracking branch 'origin/develop' 2025-11-04 18:56:15 +00:00
snipe
c1204a5301 Merge pull request #18152 from grokability/#18020-rework-pr
Re-apply #18020, fixed #15107 (mostly) - added prefix and more options to 2D barcodes
2025-11-04 18:55:54 +00:00
snipe
cc5ac65909 Re-apply #18020, fixed #15107 (mostly) - added prefix and more options to label 2D tags 2025-11-04 18:43:35 +00:00
Owen Voskuhl Hayes
9ddc48e3d7 fix the headers field for Guzzle request 2025-11-04 12:03:21 -05:00
snipe
029f3030a7 Merge remote-tracking branch 'origin/develop' 2025-11-04 16:06:35 +00:00
snipe
4a39d7c67a Use transformer for dept update responses 2025-11-04 16:06:19 +00:00
snipe
b7a6706591 Merge pull request #18150 from grokability/#18148-dept-api-request-user-count
Fixed #18148 and #17451 - return int for user_count, fixed validation
2025-11-04 16:05:42 +00:00
snipe
ddb031f091 Fixed #18148 and #17451 - return int for user_count, fixed validation 2025-11-04 15:56:23 +00:00
snipe
e906d25776 Merge pull request #16973 from spencerrlongg/bug/sc-29245
Adds Form Request for Creating Departments
2025-11-04 15:09:38 +00:00
Brady Wetherington
27d7449459 Fix comment to properly reflext the current state of the database 2025-11-04 14:04:37 +00:00
snipe
8c59a8d405 Merged clipboard PR and generated prod assets 2025-11-03 17:39:41 +00:00
snipe
5d8905c997 Merge pull request #18143 from grokability/#18101-make-copy-to-clipboard-more-consistent
Fixed #18101: Make copy to clipboard alignment more consistent
2025-11-03 17:36:54 +00:00
snipe
517f4ce121 Fixed #18101: Make copy to clipboard alignment more consistent 2025-11-03 17:29:39 +00:00
snipe
6809bbd3d5 Merge pull request #18142 from grokability/#18136-copy-asset-name
Fixed #18136 - adds copy to clipbpard to asset name
2025-11-03 15:48:59 +00:00
snipe
ab555d05e1 Fixed #18136 - adds copy to clipbpard to asset name 2025-11-03 15:47:32 +00:00
Brady Wetherington
f7bc538fdf Intorduce ActionType enum and ensure all logactions are using it 2025-11-03 15:39:31 +00:00
Brady Wetherington
2de66ad5db Merge branch 'fix_incorrect_action_types' into actiontype_enum_redux 2025-11-03 15:31:14 +00:00
snipe
30e16b6213 Added int 2025-11-03 14:10:36 +00:00
snipe
92b50ca7ae Addresses #17994, #16925 2025-11-03 14:10:27 +00:00
snipe
9ee36df979 Merge pull request #18139 from grokability/#18082-add-company-to-seat-view
Fixed #18082: Added user company to checked out licenses
2025-11-03 12:51:29 +00:00
snipe
46d1c14e1a Added user company to checked out licenses 2025-11-03 12:45:33 +00:00
snipe
61895011fb Merge pull request #18131 from Godmartinz/fix-inventory-alert-notification-misfire
Adds a null check for items and threshold in inventory alert notification
2025-10-30 20:11:24 +00:00
Godfrey M
32d43034bd add a null check for items and threshold in inventory alert notification 2025-10-30 10:47:17 -07:00
snipe
dfc6cdc127 Merge pull request #18128 from marcusmoore/fixes/17738-category-edit-form-fix
Fixed #17738 - accurately represent checkbox on category edit screen
2025-10-30 16:43:17 +00:00
snipe
16e93f9e18 Merge remote-tracking branch 'origin/master' into develop 2025-10-30 14:03:23 +00:00
snipe
7395b1a4eb Track permission changes 2025-10-30 13:40:24 +00:00
snipe
fa98557225 Check that the permissions are really an array
This accounts for weird data in the permissions column
2025-10-30 13:34:50 +00:00
Marcus Moore
894606b62e Remove old tests 2025-10-29 13:16:03 -07:00
Marcus Moore
f0a6a0026a Improve phrasing 2025-10-29 13:03:37 -07:00
Marcus Moore
070e0c93be Improve phrasing 2025-10-29 12:46:26 -07:00
Marcus Moore
2b27b733e5 Improve wording 2025-10-29 12:45:45 -07:00
Marcus Moore
0355c2b642 Dynamically adjust checkbox wording 2025-10-29 12:44:34 -07:00
Marcus Moore
3bad19fb56 Improve translation key name 2025-10-29 12:40:39 -07:00
Marcus Moore
0f84d51a48 Improve property name 2025-10-29 12:37:17 -07:00
Marcus Moore
2e8572d9c5 Use v3 syntax for computed properties 2025-10-29 12:35:30 -07:00
Marcus Moore
df53d5d966 Skip computing sendCheckInEmail 2025-10-29 12:32:01 -07:00
Marcus Moore
23838959ca Never disable email checkbox 2025-10-29 12:27:12 -07:00
snipe
6dbb836a01 Merge pull request #18125 from grokability/form-row-again
Added form row component
2025-10-29 16:33:15 +00:00
snipe
3426afe5a8 Account for input styles 2025-10-29 16:15:22 +00:00
snipe
4bbf923eb6 Smaller default row for textarea 2025-10-29 16:11:56 +00:00
snipe
e2c3480194 Apply form rows to manufacturers 2025-10-29 16:11:47 +00:00
snipe
73159076f6 Better handle input groups in js validator 2025-10-29 16:11:37 +00:00
snipe
90d040573d Added regular link icon 2025-10-29 16:07:16 +00:00
chruoss
6904ad02a2 Renamed L6009.php -> L4736.php
Renamed L6009_A.php -> L4736_A.php
Added correct L6009.php
Added correct L6009_A.php
2025-10-29 15:13:12 +01:00
snipe
155481a442 Merge pull request #18120 from grokability/small-form-fixes-settings
Fixed form label alignments in settings section
2025-10-29 11:16:59 +00:00
snipe
2f31bfc5fe Fixed some HTML labels in settings 2025-10-29 11:13:07 +00:00
snipe
8d0c88dc74 Merge pull request #18116 from akemidx/auditwarningthreshold
Fixed #17329 Audit Warning Threshold could be negative
2025-10-28 20:44:58 +00:00
snipe
07256fd833 Merge pull request #18044 from mohammad-ahmadi1/ISSUE-17004-fix-db-dump-ssl-issue
fix: update mysqldump options to use --ssl-mode=DISABLED for modern versions
2025-10-28 20:37:08 +00:00
snipe
776cd43a58 Change text string for item (versus asset) 2025-10-28 20:36:05 +00:00
akemidx
acb5309aab min = 0 2025-10-28 16:32:21 -04:00
snipe
c68f81db3c Merge pull request #18113 from Godmartinz/customfieldvalue-in-importer-fix
Adds #17433  `is_null` check to import handler for custom fields
2025-10-28 20:27:22 +00:00
snipe
ac8e341b37 Merge pull request #18115 from marcusmoore/fixes/rb-20449-remove-admin-from-acceptance-email
Fixed #18112 - fix consumable and license acceptances
2025-10-28 20:26:59 +00:00
snipe
36122b3966 Added BACKUP_TIME_LIMIT to env example 2025-10-28 20:26:23 +00:00
akemidx
79bcf472f0 greater than or equal to zero 2025-10-28 16:13:33 -04:00
Marcus Moore
55d86da846 Remove references to administrator in acceptance notification 2025-10-28 13:07:00 -07:00
Godfrey M
e4f8c1ba3f fix custom field value conditional check 2025-10-28 12:24:35 -07:00
Godfrey M
c36236b7dc add is_null acheck to import hanlder for custom fields 2025-10-28 11:37:38 -07:00
snipe
63994333d0 Merge pull request #18111 from grokability/#16914-better-ldap-sync-phrasing
Fixed #16914: better ldap sync phrasing
2025-10-28 15:51:10 +00:00
snipe
da4c7d8934 One more tweak 2025-10-28 15:47:56 +00:00
snipe
186721eca0 Added breadcrumbs 2025-10-28 15:42:59 +00:00
snipe
f53d939c86 Better explanation for location sync, nicer look 2025-10-28 15:42:53 +00:00
snipe
23e6909708 Merge pull request #18110 from grokability/#18107-normalize-to-strings
Fixed #18107: normalize "to" strings
2025-10-28 15:03:16 +00:00
snipe
cf421fe1c1 Added user-specific “to” 2025-10-28 15:02:15 +00:00
snipe
4d80e806e4 Use “-“ instead of “to” string, added placeholders 2025-10-28 15:02:03 +00:00
snipe
60a7b7f7ff Merge pull request #18109 from grokability/audit-improvements
Limit the upcoming audit email to 30 records, added optional --with-output
2025-10-28 14:31:55 +00:00
snipe
90263eab06 Added note for —with-option flag 2025-10-28 14:20:40 +00:00
snipe
9d8f251fc4 Limit the email to 30 records, added optional --with-output 2025-10-28 14:15:15 +00:00
snipe
2b4986571c Merge pull request #18108 from uberbrady/fix_ldap_tests
Fixed - LDAP test needs to be fixed to match new behavior
2025-10-28 12:49:11 +00:00
Brady Wetherington
890d13bd52 LDAP test needs to be fixed to match new behavior 2025-10-28 12:30:30 +00:00
snipe
e698e71137 Merge pull request #18100 from marcusmoore/fixes/20318-license-seat-display-name
Added null safe operator in case of missing license
2025-10-28 09:29:25 +00:00
snipe
d064a5530a Merge remote-tracking branch 'origin/master' into develop 2025-10-28 02:10:07 +00:00
snipe
ab4fbf6c19 Merge pull request #18105 from grokability/ldap-fast-find-and-bind
Possible fix for 504 gateway timeout on unreachable LDAP server
2025-10-28 02:09:41 +00:00
snipe
728afa8361 Possible fix for 504 gateway timeout on unreachable LDAP server 2025-10-27 23:45:12 +00:00
snipe
b77019c16e Merge remote-tracking branch 'origin/develop' 2025-10-27 19:32:28 +00:00
snipe
6703448b80 Merge pull request #18102 from marcusmoore/fixes/rb-20434-undefined-permissions-variable
Fixed issue when viewing user that does not have permissions set
2025-10-27 19:31:54 +00:00
Marcus Moore
776ba19a1f Define default permissions array 2025-10-27 12:28:55 -07:00
Marcus Moore
1f499e0d44 Add null safe operator in case of missing license 2025-10-27 10:47:55 -07:00
snipe
0a6eb61103 Merge remote-tracking branch 'origin/develop' 2025-10-27 13:20:18 +00:00
snipe
32a2eed5ec Fixed #18075 - make require_serial boolean in API transformer 2025-10-27 13:19:37 +00:00
snipe
40a70d39d0 Merge remote-tracking branch 'origin/develop' 2025-10-27 12:42:40 +00:00
snipe
5697054e98 Merge pull request #18099 from grokability/fix-cjk-for-acceptance-translated-strings
Fixed #18097 - check for CJK in field labels as well as content
2025-10-27 12:41:59 +00:00
snipe
def5969e1c Fixed #18097 - check for CJK in field labels as well as content 2025-10-27 12:34:30 +00:00
snipe
78a418630d Merge remote-tracking branch 'origin/develop' 2025-10-27 12:21:25 +00:00
snipe
6d76e7b2d4 Added dumb pverride for reports :( 2025-10-27 12:21:16 +00:00
snipe
f052c8b44c Merge pull request #18076 from uberbrady/move_traits_into_directories
Moved Traits into its directory and modify the FCO's to point to them
2025-10-27 11:43:31 +00:00
snipe
0e6991d56d Merge remote-tracking branch 'origin/develop' 2025-10-27 11:42:05 +00:00
snipe
06eab5f8a4 Merge pull request #18093 from Godmartinz/fix-warranty-part-of-expiring-asset-query
Fixed expiring warranties not being included in the expiring alerts notification
2025-10-27 11:41:51 +00:00
snipe
4a481e79c4 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-10-27 11:14:05 +00:00
snipe
ee4abbcbaa Updated dev assets 2025-10-27 11:12:13 +00:00
snipe
dcc82d742f Fixed RB-20430 - 500 on LDAP if baseDN is not set 2025-10-27 11:09:24 +00:00
snipe
19cb2089d7 Merge pull request #18098 from grokability/dependabot/github_actions/develop/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-10-27 10:47:59 +00:00
snipe
04923b06b0 Merge pull request #18078 from grokability/groups-ui-improvements
Groups UI improvements, ability to add users from the group edit screen
2025-10-27 10:47:11 +00:00
dependabot[bot]
e16755d491 Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 08:19:26 +00:00
snipe
742b0769a4 Use translation string 2025-10-26 12:10:08 +00:00
snipe
df68dca9dc Warn if user has individual permission overrides 2025-10-25 18:57:17 +01:00
snipe
4a5bf78d58 Merge branch 'develop' into groups-ui-improvements 2025-10-25 18:31:22 +01:00
snipe
7947237489 Double check the admin status when toggling the superadmin 2025-10-25 18:29:52 +01:00
snipe
1115205164 Normalize the JS 2025-10-25 18:20:22 +01:00
snipe
d5d01136c4 Fixed js errors 2025-10-25 17:57:59 +01:00
snipe
3d47277614 Added cursor style 2025-10-25 17:57:44 +01:00
snipe
b937bea04f Working, but there’s a bit of a jitter I need to fix 2025-10-25 15:59:47 +01:00
snipe
fff14632bc 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
2025-10-25 14:59:31 +01:00
snipe
9bdf1a620f Built assets 2025-10-25 14:58:27 +01:00
snipe
60099aa989 FAFOing on disclosure arrows being remembered 2025-10-25 14:56:01 +01: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
snipe
f3976e5dd8 Merge pull request #18094 from Godmartinz/custom_field_color_fixx
Fixed fieldset colors on dark themes
2025-10-23 20:32:05 +01:00
Marcus Moore
476611b70f Remove redundant test 2025-10-23 12:27:20 -07:00
Godfrey M
d7d6893304 fix Custom Fields section header font color 2025-10-23 12:05:13 -07:00
Godfrey M
99549ce805 rewrite query for expired warranties on assets, concat queries" 2025-10-23 11:01:51 -07:00
snipe
7eb15fe04d Merge pull request #18091 from uberbrady/fix_backup_durations
Moved import time limit inside class, added new backup time limit
2025-10-23 18:51:35 +01:00
Godfrey M
e2019a13ab rewrite expired assets collection query 2025-10-23 10:49:58 -07:00
Brady Wetherington
4b7a06761a Moved import time limit inside class, added new backup time limit 2025-10-23 16:05:09 +01:00
Brady Wetherington
b96e2fb52c Added migration to fix incorrect action_type in action_log 2025-10-23 15:40:54 +01:00
snipe
8f4a1f5801 Moved JS and styles into js and css files 2025-10-23 13:24:26 +01:00
snipe
891bec9cdb Styling fixes 2025-10-23 13:06:45 +01: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
Godfrey M
c5252ea583 skip in one more spot 2025-10-22 12:23:14 -07:00
Godfrey M
82d553c180 skip test if sqllite 2025-10-22 12:19:13 -07:00
Godfrey M
71e34355b9 remove unwanted changes 2025-10-22 11:51:00 -07:00
Godfrey M
2bad8c72e4 fixes warranty part of expiring alerts query 2025-10-22 11:43:54 -07:00
Godfrey M
6134ca01ac Merge remote-tracking branch 'origin/develop' into develop 2025-10-22 10:48:05 -07:00
snipe
be8193ebff Fixed inherit permissions 2025-10-22 15:00:04 +01:00
snipe
430ee46645 Small tweaks to inherit js 2025-10-22 13:41:59 +01:00
snipe
76fbbf29e8 Replace generate text with icon button 2025-10-22 13:37:45 +01:00
snipe
3108159d95 Jitter CSS tweaks 2025-10-22 12:37:39 +01:00
snipe
f282a1ead7 Removed duplicated permissions js code 2025-10-22 12:03:55 +01:00
snipe
324bc4957d Merge pull request #18080 from Godmartinz/add-null-safe-operator-to-manager
Fixes admin alerts when a location doesnt have a manager
2025-10-22 11:56:59 +01:00
snipe
c3b5c4dfae Moved the logic into the permissions partial, added translations 2025-10-21 22:10:09 +01:00
Godfrey M
4ab5d97e86 add nullsafe operator to location manager 2025-10-21 14:06:08 -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
Godfrey M
b4696ef11e added alert_email to send conditional in listener 2025-10-21 13:11:21 -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
snipe
294ffb72a4 Translations!!! 2025-10-21 20:36:09 +01: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
snipe
8c534d29d3 WTF tower?? 2025-10-21 19:36:28 +01:00
snipe
d6cb262f9d Bumped version 2025-10-21 19:22:36 +01:00
snipe
5211e2ae20 Some UI refinement 2025-10-21 19:22:36 +01:00
snipe
90832fd1ad Checked check 2025-10-21 19:22:36 +01:00
snipe
889cbc69e1 Starter improvements - needs testing 2025-10-21 19:22:36 +01:00
snipe
15948370d4 Updated assets 2025-10-21 19:22:24 +01:00
snipe
63c5177b37 Merge pull request #18077 from Godmartinz/acceptance-notif-fixes-pt2
Adds admin to decline notification, fix asset and model name translations on asset notification
2025-10-21 18:31:28 +01:00
Godfrey M
4fbfaf6b9f add admin to decline, fix asset and model name translations 2025-10-21 10:22:34 -07:00
Brady Wetherington
9e68497b63 Moved Traits into directory and modify the users to point to them 2025-10-21 16:45:58 +01:00
snipe
0b9e13bf1e Merge remote-tracking branch 'origin/develop' 2025-10-21 12:58:06 +01:00
snipe
485d343e0f Merge pull request #18058 from uberbrady/ldap_fetch_dn_before_login_FIXED
FIXED - perform Ldap fetch for dn (Distinguished Name) before logging-in (fixed)
2025-10-21 12:56:31 +01:00
snipe
07f0e8a3be Merge pull request #18070 from Godmartinz/fix-admin-in-user-acceptance-notif
Fixes `admin` parameter acceptance notifications
2025-10-21 12:54:03 +01:00
snipe
cc5afb1cd8 Merge pull request #18074 from grokability/smaller-audit-image-fix
Fixed audit images not displaying inline
2025-10-21 12:51:20 +01:00
snipe
c69f1c0890 Smaller fix for missing audit images 2025-10-21 12:43:59 +01: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
Godfrey M
a8733bdedf remove nullsafe operator 2025-10-20 11:01:38 -07:00
Godfrey M
4222e4eb51 add nullsafe operator after admin 2025-10-20 11:00:59 -07:00
Godfrey M
5db4441f5c fix admin param in user accepted notification 2025-10-20 10:51:24 -07:00
snipe
2bcfe97211 Merge remote-tracking branch 'origin/develop' 2025-10-20 16:03:55 +01:00
snipe
4e74c97c84 Merge pull request #18066 from smarsching/issue-18065
Fixed #18065: Ensure that private_key_bits is always an int
2025-10-20 13:51:42 +01:00
Sebastian Marsching
71a46c9bd6 Fixed #18065: ensure that private_key_bits is always an int. 2025-10-18 18:39:43 +02:00
snipe
1a7c7fdebf 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/mix-manifest.json
2025-10-17 18:37:18 +01:00
snipe
65ff3d414a Bumped version 2025-10-17 18:34:54 +01:00
snipe
9fa38b70c8 Bumped version 2025-10-17 18:26:44 +01:00
snipe
470172f53f Re-run assets 2025-10-17 18:26:05 +01:00
snipe
81261d9e36 Put the session check back in - possible fix for #18004 2025-10-17 18:25:50 +01:00
snipe
3ab2e20119 Merge remote-tracking branch 'origin/develop' 2025-10-17 17:12:47 +01:00
snipe
b773d576ea Updated cipher-base library 2025-10-17 17:12:31 +01:00
snipe
23feb64b5a Fixed potential XSS on locations 2025-10-17 17:07:57 +01:00
snipe
87fe9d9d3d 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/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-contrast.css
#	public/css/dist/skins/skin-contrast.css.map
#	public/css/dist/skins/skin-contrast.min.css
#	public/mix-manifest.json
2025-10-17 17:00:10 +01:00
snipe
b1ef3f51cb Merge pull request #18064 from grokability/new-fieldsets
Use new fieldset component
2025-10-17 16:58:17 +01:00
snipe
e1b6488f8e Use new fieldset component 2025-10-17 16:55:36 +01:00
snipe
a472dede2b Merge pull request #18063 from grokability/improved-fieldset-UI-and-better-help-test-for-ldap-mapping
New legend styles and additional help hints for LDAP
2025-10-17 15:45:05 +01:00
snipe
263cc3f7a1 New styles and additional help hints for LDAP 2025-10-17 15:29:24 +01:00
Marcus Moore
0e87843446 WIP: start testing 2025-10-16 14:30:48 -07:00
Brady Wetherington
598612d4bf Got tests to pass? Not very happy about it, tbh. 2025-10-16 19:11:49 +01:00
Brady Wetherington
a07d83e583 Improved find-and-bind for complex LDAP directory structures 2025-10-16 19:11:49 +01:00
snipe
d355812433 Updated assets 2025-10-16 19:06:22 +01:00
snipe
1afc14f5ab Merge remote-tracking branch 'origin/develop' 2025-10-16 19:04:30 +01:00
snipe
8947b667ae Fixed status labels skin for visited link buttons 2025-10-16 19:04:15 +01:00
snipe
6b41796d44 Fixed restore button on asset view page 2025-10-16 19:04:01 +01:00
snipe
6efe8eb55b Small fix for high contrast skin 2025-10-16 18:33:33 +01:00
snipe
4c8f8918e8 Merge remote-tracking branch 'origin/develop' 2025-10-16 15:49:59 +01:00
snipe
4cb5bb1855 Merge pull request #18057 from grokability/user-selector-fix
Fixed #18053 - user selector missing on page load without cookies
2025-10-16 15:49:39 +01:00
snipe
eb007e025a Fixed #18053 - user selector missing on page load without cookies 2025-10-16 15:47:25 +01:00
snipe
18aefa9dee Merge remote-tracking branch 'origin/develop' 2025-10-16 15:10:29 +01:00
snipe
2ec540bd36 Updated language translations 2025-10-16 15:10:17 +01:00
snipe
1374ec408a Merge pull request #18019 from akemidx/emdashcharfix
Fixed #17363 - Emdash Character Encoding error
2025-10-16 15:07:31 +01:00
snipe
8f8fed2b79 Merge remote-tracking branch 'origin/develop' 2025-10-16 14:33:30 +01:00
snipe
a1e6f01fe9 Fixed updating notes in bulk edit 2025-10-16 14:33:21 +01:00
snipe
d7496f22e5 Merge remote-tracking branch 'origin/develop' 2025-10-16 14:04:44 +01:00
snipe
7de25a1c37 Merge pull request #18056 from grokability/add-expected-checkin-to-view-assets
Added expected_checkin to user’s View Assigned page
2025-10-16 14:04:31 +01:00
snipe
78da89340c Added expected_checkin to user’s View Assigned page 2025-10-16 13:59:59 +01:00
snipe
60606115fe Merge remote-tracking branch 'origin/develop' 2025-10-16 12:46:47 +01:00
snipe
57b49fc31c Check for array key for license report/formatters 2025-10-16 12:46:17 +01:00
snipe
6e90c8f6e6 Bumped hash for master 2025-10-16 11:28:37 +01:00
snipe
a7ff2595a5 Bumped hash 2025-10-16 11:28:01 +01:00
snipe
1edea6abef Fixed RB-20347 - ambigious field in custom fields 2025-10-16 11:27:25 +01:00
snipe
a3bd58bda6 Foundation 2025-10-16 11:17:48 +01:00
snipe
3339d1999f Merge remote-tracking branch 'origin/develop' 2025-10-16 11:12:56 +01:00
akemidx
df3e8ec0f3 cleaning up notes 2025-10-15 17:35:25 -04:00
snipe
2dbec867d9 Merge pull request #18038 from boteroTradebe/develop
Fixed LDAP sync not syncing all user fields
2025-10-15 17:25:33 +01: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
Mohammad Ahmadi
3fc651d659 fix: update mysqldump options to use --ssl-mode=DISABLED for modern versions 2025-10-15 00:30:53 +02:00
Marcus Moore
6ed93f4a4f Add asset details 2025-10-14 14:02:21 -07:00
snipe
b91d23023d Fix blade template syntax for accessory fields 2025-10-14 13:45:58 +01:00
boteroTradebe
cc234c60b8 Update LdapSync.php to populate/update user fields
Added missing IF statements for address, city, state, and ZIP code. Previously, this information would be pulled via LDAP sync but would not update the user data due to the missing IF statements for these attributes.
2025-10-13 13:42:11 -05:00
snipe
f1883c8004 Merge remote-tracking branch 'origin/develop' 2025-10-13 14:48:46 +01:00
snipe
79f6ddc8ee Merge pull request #18036 from grokability/better-messaging-for-bulk-deletes
Fixed #18034 - Shows success message on partial bulk delete success
2025-10-13 14:30:26 +01:00
snipe
89f439a18d Shows success message on partial bulk delete success 2025-10-13 14:25:05 +01:00
snipe
79eb5bfad9 Merge pull request #18035 from grokability/fixes-bulk-error-notification
Fixed bulk error display to be more consistent and correct HTML
2025-10-13 14:02:11 +01:00
snipe
3a36b7dafd Fixed display to be more consistent and correct HTML 2025-10-13 13:57:04 +01:00
snipe
1fe2fd9891 Merge pull request #17573 from spencerrlongg/feature/8709-bulk-deletion-of-asset-categories-suppliers-manufacturers
Fixed #8709 - Bulk Deletion of Categories, Suppliers, Manufa...
2025-10-13 13:20:13 +01:00
snipe
5fdb999ece Merge branch 'develop' into feature/8709-bulk-deletion-of-asset-categories-suppliers-manufacturers 2025-10-13 13:07:53 +01:00
snipe
5a38d9c2b6 Merge pull request #18029 from grokability/dependabot/github_actions/develop/github/codeql-action-4
Bump github/codeql-action from 3 to 4
2025-10-13 12:00:49 +01:00
snipe
b1c7dc6cbb Merge remote-tracking branch 'origin/develop' 2025-10-13 11:32:19 +01:00
snipe
b21b2ac41c Merge pull request #18032 from grokability/move-asset-private-files
Added migration to move asset model private uploads
2025-10-13 11:31:55 +01:00
snipe
1396c597ef Move files 2025-10-13 11:19:25 +01:00
dependabot[bot]
46af72ee4e 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>
2025-10-13 08:19:22 +00:00
snipe
e3e8f553c8 Merge remote-tracking branch 'origin/develop' 2025-10-09 18:39:13 +01:00
snipe
549928d3d1 Updated assets 2025-10-09 18:38:59 +01:00
snipe
abefec9628 Upgraded jdpdf to ^3.0.3 2025-10-09 18:37:59 +01:00
snipe
b483eeded4 Merge remote-tracking branch 'origin/develop' 2025-10-09 11:24:47 +01:00
snipe
fab85dafa8 Added employee number and email to acceptance PDF 2025-10-09 11:24:16 +01:00
snipe
955faed919 Merge pull request #18018 from grokability/advanced-user-search
Normalize advanced search
2025-10-09 11:04:28 +01:00
snipe
3ff516180d Merge remote-tracking branch 'origin/develop' 2025-10-09 10:56:08 +01:00
snipe
0c8ca6d6b0 Search on status label name 2025-10-09 10:54:11 +01:00
snipe
a5de077e04 Merge pull request #17975 from marcusmoore/replace-date-and-time-display-macros
Removed date and time display format form macros
2025-10-09 04:54:05 +01:00
akemidx
c0a99d6b52 notes 2025-10-08 19:20:32 -04: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
a1e65cd897 Merge branch 'develop' into replace-date-and-time-display-macros
# Conflicts:
#	resources/macros/macros.php
2025-10-08 13:10:56 -07:00
snipe
5d65f1ffc5 Merge pull request #17976 from marcusmoore/17204-replace-form-digit-separator
Fixed #17204 - replace Form::digit_separator macro
2025-10-08 21:01:11 +01:00
snipe
b7193a06fd Normalize advanced search 2025-10-08 20:51:35 +01:00
akemidx
cba090f8eb notes 2025-10-08 15:50:00 -04:00
snipe
0d6baa1081 Merge remote-tracking branch 'origin/develop' 2025-10-08 15:29:02 +01:00
snipe
bc60d796a3 Fixed RB-20329 - ambiguous clause on deleted_at 2025-10-08 15:28:48 +01:00
snipe
85a208526b Merge remote-tracking branch 'origin/develop' 2025-10-08 10:38:08 +01:00
snipe
c3ac0a750d Added licenses checkin permission 2025-10-08 10:37:58 +01:00
snipe
0f111127a5 Merge pull request #18005 from marcusmoore/fixes/drop-index-migration
Fixed exception when rolling back migrations
2025-10-08 05:26:22 +01:00
snipe
cd266a6bef Merge remote-tracking branch 'origin/develop' 2025-10-08 05:13:14 +01:00
snipe
0f4945621c Merge pull request #18009 from grokability/#18002-audit-image-location
Fixed #18002 - use correct path for audit images to determine validity
2025-10-08 05:12:54 +01:00
snipe
9a477f227b Fixed #18002 - use correct path for audit images to determine validity 2025-10-08 05:09:04 +01:00
akemidx
3c81257325 fix? 2025-10-07 20:23:46 -04:00
Marcus Moore
218fe9ebdc Allow Laravel to calculate index name 2025-10-07 16:04:12 -07:00
spencerrlongg
24bb45ab97 change translation 2025-10-07 13:26:08 -05:00
snipe
85f39de540 Merge pull request #18001 from grokability/#17670-fixes-advanced-search-on-assets
Fixed #17670 - advanced search on relationships not working
2025-10-07 17:35:05 +01:00
snipe
5cc3277e2d Merge pull request #18003 from uberbrady/fix_file_upload_base64
Fixed [FD-50921] - base64-encoded image files for asset creation was broken
2025-10-07 17:34:53 +01:00
snipe
d5ef7f3204 Merge remote-tracking branch 'origin/develop' 2025-10-07 17:29:24 +01:00
snipe
cb47d01f51 Fixed variable name in location print 2025-10-07 17:29:12 +01:00
Brady Wetherington
ee499c1385 Fix base64-encoded image files for asset creation; add test 2025-10-07 16:00:16 +01:00
snipe
4ae4af5c10 Fixed #17670 - advanced search on relationships not working 2025-10-07 15:39:09 +01:00
snipe
b0f5fe7e25 Merge remote-tracking branch 'origin/develop' 2025-10-07 14:32:33 +01:00
snipe
fd32585efc Added notes back to audit email 2025-10-07 14:32:24 +01:00
snipe
c675bb7252 Merge remote-tracking branch 'origin/develop' 2025-10-07 14:29:21 +01:00
snipe
e65d11d71e Pulled incorrect button label 2025-10-07 14:29:10 +01:00
snipe
c2680334f1 Clearer title on maintenances within asset context 2025-10-07 14:28:38 +01:00
snipe
1217a02ec1 Merge pull request #17992 from marcusmoore/17963-undelete-files-command
Added command to remove invalid "upload deleted" entries from the action log
2025-10-07 14:17:56 +01:00
snipe
143a091f45 Merge remote-tracking branch 'origin/develop' 2025-10-07 14:15:59 +01:00
snipe
49ecc93dbe Merge pull request #17999 from grokability/updated-audit-report
Improved upcoming audit email layout and cli feedback
2025-10-07 14:15:44 +01:00
snipe
1735fb6bed Improved audit email 2025-10-07 14:08:33 +01:00
snipe
8fefc11b4d Merge remote-tracking branch 'origin/develop' 2025-10-07 12:09:32 +01:00
snipe
1a3b22171c Merge pull request #17997 from grokability/#17924-add-url-to-maintenances
Fixed #17924 - added url to maintenances
2025-10-07 12:09:06 +01:00
snipe
5e773be260 Enhanced tests 2025-10-07 12:05:37 +01:00
snipe
c317a1dc8b Added url to factory 2025-10-07 12:03:35 +01:00
snipe
9401ffc83c Added link to view 2025-10-07 11:55:32 +01:00
snipe
479a852446 Fixed #17924 - added url to maintenances 2025-10-07 11:49:10 +01:00
snipe
9188fb03f0 Merge remote-tracking branch 'origin/develop' 2025-10-07 10:49:59 +01:00
snipe
36bb91cbc3 Merge pull request #17995 from grokability/#17910-show-counts-on-mobile
Fixed #17910 - added counts to mobile view for assets
2025-10-07 10:47:41 +01:00
snipe
56e5ab8bc6 Fixed #17910 - added counts to mobile view for assets 2025-10-07 10:41:03 +01:00
snipe
607eb6ca03 Merge remote-tracking branch 'origin/develop' 2025-10-07 09:42:59 +01:00
snipe
ad745cc84b Fixed #17911 - updated language string 2025-10-07 09:42:30 +01:00
Marcus Moore
5a13d5ea6f Update command description 2025-10-06 15:23:55 -07:00
Marcus Moore
0b065eb7fe Improve command 2025-10-06 15:20:43 -07:00
Marcus Moore
e2c0e4bc66 WIP build out command 2025-10-06 15:14:15 -07:00
Marcus Moore
655b0e6778 Scaffold command 2025-10-06 14:59:25 -07:00
Marcus Moore
cd785c9fc3 Remove name_display_format macro that was accidentally re-added 2025-10-06 13:06:52 -07:00
Marcus Moore
23885f5166 Merge branch 'develop' into 17204-replace-form-digit-separator
# Conflicts:
#	resources/macros/macros.php
2025-10-06 13:04:34 -07:00
snipe
44ef39e419 Merge remote-tracking branch 'origin/develop' 2025-10-06 20:53:14 +01:00
snipe
e05a0ef565 Merge pull request #17967 from marcusmoore/fixes/17963-delete-file-via-api-fix
Fixed #17963 - over eager deletion of asset files via api
2025-10-06 20:52:57 +01:00
snipe
0ea9c0647f Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2025-10-06 15:14:56 +01:00
snipe
00b9ba2b75 Merge pull request #17989 from grokability/fixes-tcpdf-png-handling
Fixed #17940 - pngs not showing in acceptance PDFs
2025-10-06 15:13:58 +01:00
snipe
f1e3bc9531 Fixed #17940 - use base64encoding on images in acceptance PDF 2025-10-06 15:02:53 +01:00
snipe
7360e093b2 Bumped version 2025-10-06 10:41:15 +01:00
snipe
5f639bc24f Updated translations 2025-10-06 10:39:04 +01:00
snipe
884d2a9552 Merge remote-tracking branch 'origin/develop' 2025-10-04 14:09:54 +01:00
snipe
fd8a8b29b1 Added inactive and expired to licenses table listing 2025-10-04 13:18:51 +01:00
snipe
4e1ef40c05 Updated active button colors 2025-10-04 13:16:46 +01:00
snipe
00af0ddff5 Merge pull request #17982 from grokability/expiring-alerts-improvements
Small expiring alerts improvements
2025-10-04 01:11:03 +01:00
snipe
2467e823a5 Reordered buttons 2025-10-04 01:06:56 +01:00
snipe
224642fcb5 Removed funky search cookie 2025-10-04 01:04:25 +01:00
snipe
59518ca2c5 Small style updates 2025-10-04 00:31:17 +01:00
snipe
dfb7c73069 Added column search to users 2025-10-04 00:31:06 +01:00
snipe
70eccceab3 Updated button class for add new 2025-10-04 00:18:09 +01:00
snipe
3f69b70367 Moved btn methods closer to the BS table 2025-10-03 23:54:38 +01:00
snipe
94a0a2f8be Fixed dropdown toggle 2025-10-03 23:50:40 +01:00
snipe
7e23596ab8 Translate export to CSV 2025-10-03 23:09:33 +01:00
snipe
3c58a5dd3d Fixed column selector 2025-10-03 20:36:52 +01:00
snipe
51789ccbf3 Got tooltips to work on built-in buttons! 2025-10-03 18:54:05 +01:00
snipe
6ae4a9aa1a Added tooltips to custom btn methods 2025-10-03 17:14:47 +01:00
snipe
0aebd669b2 Fixed accessor for console view 2025-10-03 16:25:31 +01:00
snipe
2a92c4899d Don’t use parenthases unless a manufacturer is given 2025-10-03 16:19:00 +01:00
snipe
530089895a Added category and manufacturer to expiring license report 2025-10-03 16:13:00 +01:00
snipe
ae8289fc8c Eager load cagory and manufacturer 2025-10-03 16:12:40 +01:00
snipe
90f4dfb48b Use regular blade syntax 2025-10-03 16:03:03 +01:00
snipe
ec2eddf538 Add order scope to query 2025-10-03 16:02:07 +01:00
snipe
44d31d4b39 Moved date fields closer together 2025-10-03 16:01:49 +01:00
snipe
4934e7666c Added text string 2025-10-03 16:01:38 +01:00
snipe
35bf0d020e Added breadcrumb to expiring 2025-10-03 16:01:27 +01:00
snipe
4934dc85ac Reverse expires diff direction 2025-10-03 16:00:58 +01:00
snipe
5ceb50d7e5 Added expiring licenses to API and UI 2025-10-03 16:00:23 +01:00
snipe
ae7ccbb7bd Fixed icons 2025-10-03 15:59:55 +01:00
snipe
1cd9fc47aa Use diff_in_days instead 2025-10-03 15:03:14 +01:00
snipe
013c50607a Put old setter back because reasons? 2025-10-03 14:46:32 +01:00
snipe
d7bf9b7f2e Added more accessors and mutators 2025-10-03 14:38:37 +01:00
snipe
4702fdddc6 Nicer output in console command 2025-10-03 14:38:08 +01:00
snipe
dd06a530c0 Added Terminates string 2025-10-03 14:37:43 +01:00
snipe
c36125dc95 Added CSS to the message blade 2025-10-03 14:37:25 +01:00
snipe
ae43f93d0a Improved expiring assets and licenses email 2025-10-03 14:37:12 +01:00
snipe
8918b17f77 Updated test 2025-10-03 14:36:16 +01:00
snipe
dfd05e8b5b Refactored scope 2025-10-03 14:13:58 +01:00
snipe
3daa6dd051 Added accessors for termination date 2025-10-03 14:13:28 +01:00
snipe
14e43192e6 Merge remote-tracking branch 'origin/develop' 2025-10-03 09:17:35 +01:00
snipe
6cf88b1792 Merge pull request #17978 from marcusmoore/17205-replace-form-email-format
Fixed #17205 - replace Form:: email_format
2025-10-03 09:15:49 +01:00
snipe
6b9839367f Merge pull request #17973 from marcusmoore/fixes/17972-update-last-checkin-upon-edit
Fixed #17972 - set last_checkin if asset is checked in during an update
2025-10-03 09:15:35 +01:00
snipe
34fcf5d616 Merge pull request #17974 from marcusmoore/replace-form-checkbox
Replaced Form::checkbox with raw html
2025-10-03 09:15:12 +01:00
snipe
1cf3c74e67 Merge pull request #17979 from akemidx/term-date-on-license-report
Fixed #17977: Term date on license report
2025-10-03 09:14:07 +01:00
snipe
16b57b931e Merge pull request #17980 from marcusmoore/17206-replace-name-display-format-macro
Fixed #17206 - replace Form::name_display_format macro
2025-10-03 09:13:23 +01:00
Marcus Moore
3457e7d617 Remove Form::name_display_format macro 2025-10-02 16:08:37 -07:00
Marcus Moore
edbe8001e6 Replace Form::name_display_format 2025-10-02 16:08:16 -07:00
akemidx
71644c1cbe added term date 2025-10-02 19:00:18 -04:00
Marcus Moore
03fd8df8bd Remove Form::email_format 2025-10-02 15:52:09 -07:00
Marcus Moore
71d622b6dd Replace Form:: email_format 2025-10-02 15:51:41 -07:00
Marcus Moore
689d5a2d58 Remove digit_separator form macro 2025-10-02 15:39:28 -07:00
Marcus Moore
b2e9eb866c Replace digit_separator form macro
Fixes #17204
2025-10-02 15:38:59 -07:00
Marcus Moore
c8b7782d1d Remove date_display_format and time_display_format macros 2025-10-02 15:27:20 -07:00
Marcus Moore
673f936689 Replace Form:: time_display_format on localization screen 2025-10-02 15:26:31 -07:00
Marcus Moore
2ca0d39e51 Replace Form:: date_display_format on localization screen 2025-10-02 15:21:51 -07:00
Marcus Moore
908c8bc397 Remove Form::checkbox on user create screen 2025-10-02 14:33:48 -07:00
Marcus Moore
93082e1e87 Set last_checkin if asset checked in during update 2025-10-02 13:56:42 -07:00
Marcus Moore
ef0a6aa25e Add failing condition 2025-10-02 13:53:19 -07:00
spencerrlongg
b9f4dc1e9d translation 2025-10-02 12:00:52 -05:00
snipe
90afec864e Fixed info text help block class 2025-10-02 08:07:54 +01:00
akemidx
b082fb6692 investigation and notes 2025-10-01 18:21:25 -04:00
Marcus Moore
4bbbd786cd Constrain to "uploaded" action_type 2025-10-01 14:37:36 -07:00
snipe
0c1b2a54e7 Merge remote-tracking branch 'origin/develop' 2025-10-01 22:27:06 +01:00
snipe
a6ded20ede Merge pull request #17966 from uberbrady/fix_filetype_validation
Cleanups and improvements to output on snipeit:restore command
2025-10-01 22:26:49 +01:00
Brady Wetherington
9b96314371 Cleanups and improvements to output on snipeit:restore command 2025-10-01 22:07:45 +01:00
snipe
85e16ecd51 Merge remote-tracking branch 'origin/develop' 2025-10-01 21:34:50 +01:00
snipe
2ac36cdfd6 Fixed alignment on create-new dropdown in header 2025-10-01 21:32:28 +01:00
snipe
e40c532354 Merge remote-tracking branch 'origin/develop' 2025-10-01 12:13:08 +01:00
snipe
9404dff79c Added note about markdown 2025-10-01 12:12:56 +01:00
snipe
55b324d8d6 Merge remote-tracking branch 'origin/develop' 2025-10-01 11:49:15 +01:00
snipe
3ed2e2d79e Added link to docs for common issues in upgrading script 2025-10-01 11:49:05 +01:00
snipe
3152d9eadd Merge remote-tracking branch 'origin/develop' 2025-10-01 11:24:33 +01:00
snipe
f1266ab5d6 Check if telescope tables already exist 2025-10-01 11:24:20 +01:00
snipe
e70f1408aa Merge remote-tracking branch 'origin/develop' 2025-10-01 11:19:35 +01:00
snipe
664e3984e3 Merge pull request #17877 from grokability/label-cjk-fix
Fixed CJK on labels
2025-10-01 11:16:55 +01:00
snipe
665c13e238 Merge pull request #17957 from marcusmoore/fixes/17956-handle-force-deleted-model-in-asset-edit
Fixed #17956 - handle accessing deleted model during asset update
2025-10-01 11:10:11 +01:00
snipe
8a667b20c2 Merge branch 'develop' into fixes/17956-handle-force-deleted-model-in-asset-edit 2025-10-01 11:09:40 +01:00
snipe
3693241292 Merge pull request #17959 from marcusmoore/fixes/17958-handle-force-deleted-model-in-bulk-edit
Fixes #17958 - handle accessing deleted model during bulk asset update
2025-10-01 11:06:32 +01:00
Marcus Moore
3c42acebf0 Scaffold new listener 2025-09-30 15:11:12 -07:00
akemidx
a384245368 investigation and notes 2025-09-30 16:33:33 -04: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
Marcus Moore
3c3acff79b Fix more attempted access of deleted model 2025-09-30 12:22:26 -07:00
Marcus Moore
e15de83a95 Fix attempted access of deleted model 2025-09-30 12:19:12 -07:00
Marcus Moore
636fccbf97 Add failing test 2025-09-30 12:18:51 -07:00
Marcus Moore
7d8ed399a8 Fix accessing force deleted model 2025-09-30 11:27:56 -07:00
Marcus Moore
272385db6c Add failing test 2025-09-30 11:27:38 -07:00
akemidx
64d0e3928c clean erroneous added space 2025-09-30 13:11:38 -04:00
snipe
9334b8df47 Improve Bug Report template details
Updated version placeholders and descriptions for clarity.
2025-09-30 11:57:06 +01:00
snipe
e0bc2ae86f Add PHP and Composer version fields to bug report 2025-09-30 11:45:55 +01:00
snipe
2f019bb033 Merge remote-tracking branch 'origin/develop' 2025-09-30 11:40:34 +01:00
snipe
291be64aa0 Refined remnaining asset count for archived 2025-09-30 11:40:21 +01:00
snipe
75c83236ff Merge remote-tracking branch 'origin/develop' 2025-09-30 11:20:44 +01:00
snipe
72be171917 Added archived to model view 2025-09-30 11:20:33 +01:00
snipe
4ddee4ac40 Merge remote-tracking branch 'origin/develop' 2025-09-30 10:55:00 +01:00
snipe
43cd0d7eb3 Use min_amt formatter 2025-09-30 10:54:43 +01:00
snipe
6b693e2644 Merge remote-tracking branch 'origin/develop' 2025-09-30 10:51:35 +01:00
snipe
eeea69d8f2 Make available_assets_count sortable 2025-09-30 10:51:25 +01:00
snipe
72cf921a4b Merge remote-tracking branch 'origin/develop' 2025-09-30 10:46:12 +01:00
spencerrlongg
32882f81e7 replace box-default 2025-09-29 15:52:43 -05:00
spencerrlongg
36f5099932 added new counts and throw new exceptions and catch them 2025-09-29 15:16:41 -05:00
snipe
bec88a0441 Merge pull request #17950 from grokability/#17932-fix-remaining-counts-in-model-listing
Fixed #17932 - incorrect number for remaining assets in asset models
2025-09-29 20:55:52 +01:00
snipe
6e67e3a8a0 Fixed #17932 - incorrect number for remaining assets in asset models 2025-09-29 20:55:06 +01:00
snipe
4dc3c30354 Merge remote-tracking branch 'origin/develop' 2025-09-29 19:04:42 +01:00
snipe
947ccf911d Merge pull request #17868 from Godmartinz/adds-Tze_24mm-variant
Adds Brother Label TZe_24mm_E variant
2025-09-29 15:48:10 +01:00
snipe
06f313febe Merge pull request #17869 from marcusmoore/api-components-assigned-to-asset
Added api endpoint for retrieving components checked out to asset
2025-09-29 15:47:53 +01:00
snipe
b387136b8f Merge pull request #17883 from akemidx/purchasepricereportfilter
FEATURE: Purchase Cost Report Filter
2025-09-29 15:37:39 +01:00
snipe
31614c5da1 Merge pull request #17888 from marcusmoore/fixes/bulk-checkout-extra-requests
Fixed excessive api requests on bulk checkout page
2025-09-29 14:46:19 +01:00
snipe
146b5a3085 Merge pull request #17933 from marcusmoore/17914-bulk-checkout-error-ux
Fixed #17914 - Improve UX around attempted bulk checkout of assigned assets
2025-09-29 14:44:20 +01:00
snipe
397cc1754a Merge remote-tracking branch 'origin/develop' 2025-09-29 11:05:45 +01:00
snipe
ff1297cac5 Merge pull request #17945 from kingspride/develop
with --no-interactive, make composer non-interactive aswell
2025-09-29 11:04:30 +01:00
William Kirstaedter
8af3cf4056 with --no-interactive, make composer non-interactive aswell 2025-09-29 11:39:23 +02: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
Marcus Moore
9edec9e212 Extract translation 2025-09-25 11:09:27 -07:00
Godfrey Martinez
ca44ee94a4 Merge pull request #28 from Godmartinz/add_types_to_command
update the snipeit reminder command
2025-09-25 10:44:53 -07:00
Godfrey M
3ae7a77032 update the snipeit reminder command 2025-09-25 10:43:41 -07:00
snipe
be4362c59a Merge pull request #17925 from Godmartinz/fix-factory-auto-gen-action-logs
Adds option to disable auto generating action log from acceptance factory
2025-09-25 11:10:34 +01:00
Marcus Moore
8461b147de Link to removed assets 2025-09-24 16:38:48 -07:00
Godfrey M
881c789a75 add usuage of withoutactionlog 2025-09-24 15:45:01 -07:00
Godfrey M
fea0189479 Merge branch 'fix-factory-auto-gen-action-logs' into add_types_to_unaccepted_asset_report 2025-09-24 15:43:27 -07:00
Godfrey M
82bdd43168 renamed variable 2025-09-24 15:38:30 -07:00
Godfrey M
533d82d4d8 remove unnecessary changes 2025-09-24 15:34:02 -07:00
Godfrey M
6f990dd1de adds an option to disable Auto assigned an actionlogs in factories 2025-09-24 15:27:16 -07:00
Marcus Moore
be848598e3 Keep removed asset out of scope of partial 2025-09-24 14:32:25 -07:00
Godfrey M
6ca0e19819 uncomment code 2025-09-24 13:50:41 -07:00
Godfrey M
bf6964ee62 tests passing, CheckoutAcceptance Factory needs eyes though 2025-09-24 13:41:04 -07:00
Godfrey M
9ac2ea2a52 fix test to check all mailable types for reminders 2025-09-24 13:22:33 -07:00
snipe
62a58fa23b Merge remote-tracking branch 'origin/develop' 2025-09-24 14:52:55 +01:00
snipe
7d0742054f Merge pull request #17923 from uberbrady/fix_checkout_type_selector2
Fixed #17919 - correct the behavior of the checkout type selector
2025-09-24 14:52:05 +01:00
Brady Wetherington
dcf7e83507 Remove extra pointless class="active" 2025-09-24 14:47:13 +01:00
Brady Wetherington
407c2bf0c8 Switch to ?: from ?? to better handle empty strings 2025-09-24 14:45:43 +01:00
Brady Wetherington
c46227ee94 Fix to the checkout-selector issue 2025-09-24 14:28:49 +01:00
Godfrey M
0ce20c1edd fix send reminder method to handle other types 2025-09-23 18:40:03 -07:00
Godfrey M
d31d99b40f remove else and blank lines 2025-09-23 17:00:08 -07:00
Godfrey M
3527c357cc whoops 2025-09-23 16:57:06 -07:00
Godfrey M
2b5254e68f fixed, eager loading, variable names, clean up 2025-09-23 16:55:10 -07:00
Godfrey M
6f3323c195 fix data in view model 2025-09-23 12:50:26 -07:00
Godfrey M
5af85bfe7d further clean up 2025-09-23 12:10:50 -07:00
Godfrey M
20adad3c6b fix company name link, clean up query 2025-09-23 12:09:21 -07:00
Godfrey M
ca8eae4064 updated the csv values to be plain 2025-09-23 11:40:29 -07:00
Godfrey M
7077faaf4a updated the postassetAcceptanceReport query and rows 2025-09-23 11:08:37 -07:00
snipe
d8171eb056 Remove duplicate PUT route for hardware assets
Removed duplicate route definition for updating hardware assets.
2025-09-23 13:24:56 +01:00
snipe
c67ca500db Clarify descriptions for multiple company support 2025-09-23 13:06:33 +01:00
snipe
0081e7b731 Revise demo reproduction question in Bug Report template 2025-09-23 13:05:26 +01:00
snipe
4e6483d3ed Enhance Bug Report template with required validations
Make fields required
2025-09-23 13:04:19 +01:00
snipe
0ddf0002c4 Change dropdown options to single quotes in Bug Report
Fixed quotes
2025-09-23 13:02:36 +01:00
snipe
ad0daf33b9 Add dropdown options to Bug Report template
Added additional fields to bug report template related to FMCS
2025-09-23 13:01:37 +01:00
Marcus Moore
c614c44d4c Remove assigned assets from bulk checkout 2025-09-22 16:04:29 -07:00
Godfrey M
ab30df10ff remove sorter from blade 2025-09-22 12:20:32 -07:00
Godfrey M
a6cb75c481 remove sorter, didnt work 2025-09-22 12:19:34 -07:00
snipe
8a46579588 Merge pull request #17887 from marcusmoore/fixes/17404-prevent-bulk-checkout-across-companies
Fixed #17404 - Disallow bulk checkout of assets across companies
2025-09-22 18:57:43 +01:00
Marcus Moore
fb9fb9c097 Merge branch 'develop' into fixes/17404-prevent-bulk-checkout-across-companies
# Conflicts:
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php
2025-09-22 10:52:04 -07:00
snipe
d9399534ce Merge pull request #17909 from spacjalex/17908-fix-typo
Fix #17908: typo in storage location of backups
2025-09-22 14:28:05 +01:00
spacjalex
17a749bbed fix typo 2025-09-22 15:23:14 +02:00
snipe
0b60c6a939 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
2025-09-19 12:44:49 +01:00
snipe
25ce63f00b Merge pull request #17904 from grokability/#17804-searchable-columns
Fixed #17804 - make columns searchable in column picker
2025-09-19 12:43:46 +01:00
snipe
2462bc05b3 Added column search to additional views 2025-09-19 12:41:30 +01:00
snipe
c3748da0b1 Fixed #17804 - make columns searchable in column picker 2025-09-19 12:16:56 +01:00
snipe
90c242a441 Merge pull request #17897 from marcusmoore/fixes/17896-prevent-bulk-checkout-of-checked-out-assets
Fixed #17896 - Prevent assigned assets from being bulk checked out
2025-09-19 07:03:43 +01:00
Marcus Moore
52239a88b5 Improve test name 2025-09-18 17:27:17 -07:00
Marcus Moore
7a3596c86d Test against other types 2025-09-18 17:21:27 -07:00
Marcus Moore
ac8a9e38f0 Implement fix 2025-09-18 17:18:27 -07:00
Marcus Moore
5c08f3a27e Add failing test 2025-09-18 17:14:33 -07:00
Marcus Moore
2dc11a84bf Fix test name 2025-09-18 17:05:08 -07:00
Marcus Moore
2960ea15f5 Consolidate to data provider 2025-09-18 14:29:12 -07:00
Marcus Moore
17aab4c490 Implement test 2025-09-18 14:20:05 -07:00
Marcus Moore
59d0f0d292 Re-order assertions 2025-09-18 14:05:13 -07:00
Marcus Moore
27d13a113a Implement test 2025-09-18 14:01:44 -07:00
Marcus Moore
c58e999fbb Scaffold tests 2025-09-18 13:11:06 -07:00
Marcus Moore
a02a96d5c4 Extract translation string 2025-09-18 12:57:56 -07:00
Marcus Moore
47e9e4704d Improve error message 2025-09-18 12:56:36 -07:00
Marcus Moore
b2ad9d404e Fix re-population of assets 2025-09-18 12:38:11 -07:00
Godfrey M
51ce570eb3 attempt to sort chronologically, can not resort still 2025-09-18 11:01:40 -07:00
snipe
925d48640d Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2025-09-18 14:49:56 +01:00
snipe
5216dd75bf Bumped version 2025-09-18 14:49:15 +01:00
snipe
028b4e7b79 Merge remote-tracking branch 'origin/develop' 2025-09-18 13:59:25 +01:00
snipe
b8b45d2d81 Merge pull request #17892 from grokability/#17891-fixes-maintenance-file-route
Fixed #17891 - missing maintenance file deletion route
2025-09-18 13:59:10 +01:00
snipe
4b2b2cb68e Fixed #17891 - missing maintenance file deletion route 2025-09-18 13:58:30 +01:00
snipe
625a46a2c2 Merge remote-tracking branch 'origin/develop' 2025-09-18 13:52:08 +01:00
snipe
be4ace293e Use trans_choice for user acceptance 2025-09-18 13:51:57 +01:00
snipe
ebc1e27c22 Merge remote-tracking branch 'origin/develop' 2025-09-18 13:40:07 +01:00
snipe
764b363bbc A few small tweaks to acceptance screen design 2025-09-18 13:38:37 +01:00
Marcus Moore
705474dc14 Avoid pre-loading all assets on page load 2025-09-17 16:56:37 -07:00
Marcus Moore
e639d7726b Disallow bulk checkout across companies 2025-09-17 14:32:27 -07:00
snipe
357e85d358 Merge remote-tracking branch 'origin/develop' 2025-09-17 22:02:11 +01:00
snipe
9da9166442 Merge pull request #17886 from grokability/small-tweaks-to-acceptance-pdf
Small adjustments for acceptance PDF layout
2025-09-17 22:01:41 +01:00
snipe
8ea339f0ef More small tweaks 2025-09-17 22:00:49 +01:00
Marcus Moore
e29b0aa6a4 Add todo 2025-09-17 13:55:54 -07:00
Marcus Moore
d2157868f2 Populate failing test 2025-09-17 13:49:32 -07:00
snipe
89b36ba63f Derp. Uncomment the acceptance. 2025-09-17 21:43:40 +01:00
snipe
1d3dfa1fa4 Pull the acceptance stuff into the model 2025-09-17 21:43:17 +01:00
Marcus Moore
89cfafd933 Scaffold test 2025-09-17 13:40:34 -07:00
snipe
ca567eec8a Small adjustments for layout 2025-09-17 21:08:13 +01:00
snipe
75cfcb83aa Merge remote-tracking branch 'origin/develop' 2025-09-17 14:05:06 +01:00
snipe
41da31c379 Merge pull request #17885 from grokability/#8859-show-cost-footer-on-models
Fixed #8859 - adds purchase sums on model view
2025-09-17 14:04:38 +01:00
snipe
e81f63f46b Fixed #8859 - adds purchase sums on model view 2025-09-17 14:03:48 +01:00
snipe
ade03e4827 Merge pull request #17882 from Godmartinz/add-total-cost-columns
Adds total cost to Accessories, Consumables, Components
2025-09-17 13:56:08 +01:00
snipe
63a4d1ad33 Merge remote-tracking branch 'origin/develop' 2025-09-17 11:44:41 +01:00
snipe
33a4c88c3a Added table to deleted_at clauses to resolve ambiguity 2025-09-17 11:44:28 +01:00
akemidx
69c5dbfc23 formatting 2025-09-17 05:39:45 -04:00
Godfrey M
dcbb09bbd7 added checkoutable class 2025-09-16 15:59:53 -07:00
Godfrey M
58eac619ea add checkoutable class, rework blade for unaccepted items 2025-09-16 15:52:41 -07:00
akemidx
cf1bccfd65 prep for val 2025-09-16 15:24:44 -04:00
akemidx
99acf018f1 validation rule & query 2025-09-16 15:17:59 -04:00
snipe
f04d6f37e5 Merge remote-tracking branch 'origin/develop' 2025-09-16 19:22:06 +01:00
snipe
1f79776b8f Pull HTML tags out before converting markdown 2025-09-16 19:21:39 +01:00
Godfrey M
11e5f851f0 typo 2025-09-16 10:49:33 -07:00
Godfrey M
4ca1db8a1b remove footer formatter from consumable purchase cost 2025-09-16 10:43:02 -07:00
Godfrey M
14b829aa30 add total cost to components and consumables 2025-09-16 10:37:32 -07:00
Godfrey M
384652b3df add total cost to accessories 2025-09-16 10:10:49 -07:00
snipe
469069b471 Merge remote-tracking branch 'origin/develop' 2025-09-16 14:33:57 +01:00
snipe
9db65c6ae9 Merge pull request #17881 from grokability/#17873-eula-tab-on-users
Fixed #17873 - Added EULA tab to user view
2025-09-16 14:28:50 +01:00
snipe
1346e33e99 Check that the person trying to download can see both the user and the target 2025-09-16 14:21:03 +01:00
snipe
ab9cc447aa Use more specific filename 2025-09-16 14:20:20 +01:00
akemidx
cb63c12d2f i think this is gonna need livewire to validate lol 2025-09-16 08:24:22 -04:00
snipe
fe9e0444b4 Added EULA tab to user view 2025-09-16 13:20:50 +01:00
akemidx
6ce0fd20ce works, needs error handling 2025-09-16 08:11:42 -04:00
snipe
a18957dbe9 Include output even if there is nothing to send 2025-09-16 12:33:06 +01:00
snipe
13d5b724ee Fixed tests 2025-09-16 12:16:18 +01:00
snipe
b383cd9493 Fixed CJK on labels 2025-09-16 12:10:01 +01:00
snipe
c7d8203da9 Merge pull request #17866 from grokability/_reworked_tcpdf
Fixed #14744 and #17808 - Added CJK and Arabic font support for asset acceptance
2025-09-16 12:04:15 +01:00
snipe
96b5c1d8e1 Merge pull request #17876 from uberbrady/add_users_location_index
Add new index to users over deleted_at and location_id
2025-09-16 12:03:45 +01:00
Brady Wetherington
882ee80424 Add new index to users over deleted_at and location_id 2025-09-16 11:54:24 +01:00
snipe
e977771fe4 One more query tweak 2025-09-16 11:50:50 +01:00
snipe
4339e4552e Fixed nesting in orWhere 2025-09-16 11:50:50 +01:00
snipe
9bca5912d9 Merge remote-tracking branch 'origin/develop' 2025-09-16 11:39:12 +01:00
snipe
b54d222943 One more query tweak 2025-09-16 11:39:02 +01:00
snipe
23756ba1c7 Merge remote-tracking branch 'origin/develop' 2025-09-16 11:27:27 +01:00
snipe
e4e613550a Merge pull request #17875 from grokability/fixed-eol-query
Fixed nesting in orWhere
2025-09-16 11:27:07 +01:00
snipe
d1207444db Fixed nesting in orWhere 2025-09-16 11:20:49 +01:00
Marcus Moore
06f060161d Apply offset and limit 2025-09-15 15:43:54 -07:00
Marcus Moore
73e0628124 Populate test 2025-09-15 15:26:30 -07:00
Marcus Moore
7393c4170b Apply first pass and scaffold additional test 2025-09-15 15:22:35 -07:00
Marcus Moore
73e185bf9d Scaffold route and tests 2025-09-15 15:12:05 -07:00
snipe
0bad75b263 Fixed declined asset name 2025-09-15 20:56:57 +01:00
snipe
74b98083e2 Override the getEula() method at the SnipeModel level 2025-09-15 20:05:35 +01:00
snipe
9034b5ec11 Slightly nicer display 2025-09-15 20:04:17 +01:00
Godfrey M
77153c3e78 adds Tze_24mm variant 2025-09-15 11:20:35 -07:00
snipe
927f557672 Fixed sorting on updated/created at 2025-09-15 18:13:46 +01:00
snipe
86fb089901 Remove unused blades 2025-09-15 18:13:32 +01:00
snipe
630ea05e17 A little more cleanup 2025-09-15 17:16:05 +01:00
snipe
7df5196083 A little cleanup 2025-09-15 16:09:49 +01:00
snipe
01f7b5d709 Added CJK and Arabic font support 2025-09-15 14:46:11 +01:00
snipe
07227887f6 Merge remote-tracking branch 'origin/develop' 2025-09-15 14:42:08 +01:00
snipe
ec47ee3573 Merge pull request #17850 from Godmartinz/change-purchase-cost-to-unit
Rewords Purchase cost to Unit Cost for Accessories, Components, Consumables
2025-09-15 14:20:04 +01:00
snipe
13d3b103f1 Merge remote-tracking branch 'origin/develop' 2025-09-15 13:43:23 +01:00
snipe
7062962cc8 Show warnings on the dates if expired or terminated 2025-09-15 13:43:08 +01:00
snipe
fde447846a Merge pull request #17865 from grokability/show-inactive-licenses
Show inactive licenses
2025-09-15 13:42:22 +01:00
snipe
319cb1bd1e Removed logging 2025-09-15 13:23:44 +01:00
snipe
58cda5ae6d Added scopes 2025-09-15 13:22:25 +01:00
snipe
251a3db880 Fixed factory 2025-09-15 13:20:34 +01:00
snipe
30b6dcd767 Added status to breadcrumbs 2025-09-15 13:13:50 +01:00
snipe
05f6622912 Added status to URL 2025-09-15 13:13:32 +01:00
snipe
36183ac19d Fixed url and tooltip text 2025-09-15 13:13:18 +01:00
snipe
f6a823e0a8 Escape text 2025-09-15 13:13:04 +01:00
snipe
312353551d Changed button color 2025-09-15 13:11:58 +01:00
snipe
4bdfd0e115 Merge remote-tracking branch 'origin/develop' 2025-09-15 10:32:08 +01:00
snipe
fd5c9cee38 Merge pull request #17863 from grokability/added-status-label-to-asset-view
Added status label to asset view
2025-09-15 10:31:54 +01:00
snipe
84bf71802c Added status label to asset view 2025-09-15 10:31:06 +01:00
snipe
786b20708e Merge remote-tracking branch 'origin/develop' 2025-09-15 08:38:56 +01:00
snipe
35739c2eef Merge pull request #17835 from marcusmoore/feature/10052-assigned-assets-via-api
Fixed #10052 - Added api endpoint for retrieving assets checked out to asset
2025-09-15 08:38:35 +01:00
snipe
1914a71623 Merge pull request #17851 from marcusmoore/fixes/qty-in-component-email
Fixed potentially incorrect qty in component checkout email
2025-09-15 08:37:48 +01:00
snipe
dcc53886d9 Merge pull request #17857 from uberbrady/fix_client_tls_ldap
Fixed #17414 - client-side TLS certificate didn't work in Google LDAP
2025-09-15 08:37:14 +01:00
Brady Wetherington
21ef87ef09 Merge branch 'develop' into fix_client_tls_ldap 2025-09-12 18:52:43 +01:00
snipe
0e957cad84 Merge remote-tracking branch 'origin/develop' 2025-09-12 18:08:15 +01:00
snipe
b67f808da9 Fixed fieldname 2025-09-12 18:07:40 +01:00
snipe
ad69447b53 Merge pull request #17858 from grokability/ignore-expiring-licenses-with-past-termination-date
Ignore expiring licenses with past termination date
2025-09-12 17:55:14 +01:00
snipe
b4614df88c Removed awkward period 2025-09-12 17:39:52 +01:00
snipe
7171247cdc Updated tests 2025-09-12 17:37:36 +01:00
snipe
6d0084f108 Nicer alert layout for expiring asset report 2025-09-12 17:37:27 +01:00
snipe
29359f42ae Added table printout 2025-09-12 17:37:12 +01:00
snipe
cf875bf872 Changed verbiage 2025-09-12 17:37:03 +01:00
snipe
13c0d335d3 Refactor alert query 2025-09-12 17:36:51 +01:00
snipe
ceb33409b5 Removed duplicate array key 2025-09-12 17:36:33 +01:00
Brady Wetherington
83597d4a8b Possible fix to client-side TLS certificate issue for google LDAP 2025-09-12 17:12:35 +01:00
Marcus Moore
81eefc5448 Merge branch 'develop' into fixes/qty-in-component-email 2025-09-11 14:14:42 -07:00
Marcus Moore
082bc3ece4 Use correct qty in component checkout email 2025-09-11 14:10:31 -07:00
snipe
b2406b61fb Merge pull request #17826 from marcusmoore/fixes/17585-accessory-checkout-amount-in-subject
Fixed #17585 - Display accessory checkout qty in subject line and intro text
2025-09-11 21:55:20 +01:00
Marcus Moore
15698d7694 Update introduction lines with qty 2025-09-11 13:50:48 -07:00
Godfrey M
990cd82f97 change purchase cost to unit cost in several places 2025-09-11 10:46:20 -07:00
snipe
c87829b3e8 Merge pull request #17849 from Godmartinz/rollbar-unreassignablecount-fix
Fixed typo in UnreassignableCount
2025-09-11 18:43:07 +01:00
Godfrey M
6799c41d65 fixed typo 2025-09-11 10:23:53 -07:00
snipe
80c059be58 Skip terminated licenses in alert 2025-09-11 13:14:53 +01:00
snipe
aa3f896538 Merge pull request #17842 from Godmartinz/expiration-and-termination-license-enhancement
Adds #8799 Prevention of checkout of expired or terminated licenses
2025-09-11 11:46:15 +01:00
snipe
85c728f313 Merge remote-tracking branch 'origin/develop' 2025-09-11 11:40:26 +01:00
snipe
d8c17a8a5e One more small tweak to language 2025-09-11 11:40:15 +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
50e210b2db fixing naming convention to match 2025-09-10 17:35:09 -04:00
Godfrey M
850939367c adds translation warning message 2025-09-10 12:59:35 -07:00
Marcus Moore
bf4fef9bf7 Merge branch 'develop' into fixes/17585-accessory-checkout-amount-in-subject 2025-09-10 12:49:41 -07:00
Godfrey M
d5175961a4 adds a seperate formatter for checking out on license index, fix interactions 2025-09-10 12:42:10 -07:00
snipe
ba3fb8cd66 Merge remote-tracking branch 'origin/develop' 2025-09-10 20:19:55 +01:00
snipe
e7e1d6a232 Small tweaks to language 2025-09-10 20:17:33 +01:00
snipe
712345f3a0 Added link to discussions and discord 2025-09-10 20:14:19 +01:00
snipe
54c9bc3dcb Merge pull request #17840 from marcusmoore/issue-template
Made install method required in issue template
2025-09-10 20:14:10 +01:00
Godfrey M
e796c0da4a disallows checkout of expired or terminated licenses 2025-09-10 12:08:14 -07:00
Marcus Moore
cf8ff0f43e Add note on English 2025-09-10 10:41:20 -07:00
Marcus Moore
e67ce23a7c Require installation method 2025-09-10 10:23:22 -07:00
snipe
d9fb7dc754 Merge remote-tracking branch 'origin/develop' 2025-09-10 15:48:31 +01:00
snipe
a66bb95a81 A few more tweaks 2025-09-10 15:48:21 +01:00
snipe
2249dad9d7 Merge remote-tracking branch 'origin/develop' 2025-09-10 15:43:21 +01:00
snipe
c66fa33b2e Have I mentioned how much I hate YAML? 2025-09-10 15:43:09 +01:00
snipe
5c4fa630ae Merge remote-tracking branch 'origin/develop' 2025-09-10 15:40:24 +01:00
snipe
56eebb9db4 Small tweaks to templates 2025-09-10 15:40:12 +01:00
snipe
ede74ad24e Merge remote-tracking branch 'origin/develop' 2025-09-10 15:38:30 +01:00
snipe
d9773f107e Added feature request form
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:38:19 +01:00
snipe
27542a8f91 Okay, I guess we can’t require that field :(
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:34:30 +01:00
snipe
5dc07b94aa Merge remote-tracking branch 'origin/develop' 2025-09-10 15:33:20 +01:00
snipe
e09112f46a Require installation type
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:33:06 +01:00
snipe
d7acf721ae Merge remote-tracking branch 'origin/develop' 2025-09-10 15:30:54 +01:00
snipe
50a17a82b6 Sigh
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:30:42 +01:00
snipe
eff5232828 Merge remote-tracking branch 'origin/develop' 2025-09-10 15:26:14 +01:00
snipe
7eb032d646 Rename issue template (I guess?)
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:25:51 +01:00
snipe
3eb29b1cdb Merge remote-tracking branch 'origin/develop' 2025-09-10 15:21:05 +01:00
snipe
e065f22f8e Merge pull request #17838 from grokability/issue-form
New GH issue form
2025-09-10 15:20:51 +01:00
snipe
c1b4ba1f85 Last one for now
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:20:27 +01:00
snipe
eeaec471f0 Dunno if this will work
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:19:29 +01:00
snipe
0d3c8678d8 Moved text
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:17:16 +01:00
snipe
bbddf5f95b Still a few more tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:15:09 +01:00
snipe
3b8c8b3af9 Nicer markdown
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:12:38 +01:00
snipe
84753aa13f Added browser console
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:08:37 +01:00
snipe
90b84451d8 Fixed indenting
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:07:04 +01:00
snipe
54c8ae41cc Still hate YAML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:06:03 +01:00
snipe
7d32b1a724 God I hate YAML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:05:27 +01:00
snipe
69ffd63ca6 Removed backticks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:02:50 +01:00
snipe
4857c19eb6 More tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 15:02:07 +01:00
snipe
d535e23da0 More template tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:51:33 +01:00
snipe
30e02544ab Try renaming so I can preview
via https://github.com/orgs/community/discussions/7039#discussioncomment-5327083

Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:43:16 +01:00
snipe
ee53925bd2 Starter for preview
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 14:40:38 +01:00
snipe
c9961f63b4 Merge remote-tracking branch 'origin/develop' 2025-09-10 13:53:21 +01:00
snipe
40495b8a17 Small demo tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-09-10 12:33:33 +01:00
akemidx
b1de98f05d first front end 2025-09-09 19:18:29 -04:00
Marcus Moore
6bc9a82a7a Formatting 2025-09-09 14:51:22 -07:00
snipe
09e843a800 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# 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
2025-09-09 22:34:33 +01:00
Marcus Moore
6504ee37bd Remove dump 2025-09-09 13:09:52 -07:00
Marcus Moore
082bff2fa8 Add and use query scope helper 2025-09-09 13:04:14 -07:00
Marcus Moore
ab7bd86336 Improve assertions 2025-09-09 13:01:59 -07:00
Marcus Moore
eada0b0bb5 Implement test 2025-09-09 11:58:43 -07:00
Marcus Moore
f221f9f22a Implement test 2025-09-09 11:50:41 -07:00
snipe
6731e44a0d Merge pull request #17828 from marcusmoore/fixes/17586-acceptance-banner-qty
Fixed #17586 - Display accurate quantity in banner
2025-09-09 19:38:34 +01:00
Marcus Moore
acc37045e4 Implement test 2025-09-09 11:34:50 -07:00
Marcus Moore
a7c5899c16 Implement test 2025-09-09 11:33:54 -07:00
Marcus Moore
80b02635a9 Add test stub 2025-09-09 10:10:53 -07:00
snipe
f90de5ec67 Merge pull request #17833 from grokability/tighter-controls-on-licenses
Tighter controls on license deletion, also fixes #16227 adding more tables to location print
2025-09-09 15:35:12 +01:00
snipe
9a3e046530 Fixed HTML
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:30:34 +01:00
snipe
7f56e461fe Added child location icon
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:19:00 +01:00
snipe
1da37e0d38 Added child location count
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:47 +01:00
snipe
0004d4936c Cleaned up print view
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:28 +01:00
snipe
7a6fdc4e0a Added parent ID to location API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 15:18:09 +01:00
snipe
2eb727bd0c Added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 13:51:56 +01:00
snipe
57af507170 Added deleted button to locations, check for additional relations
Signed-off-by: snipe <snipe@snipe.net>
2025-09-09 12:20:34 +01:00
snipe
e37f87465c Merge pull request #17827 from Godmartinz/duplicate-emails-fix
Fixed #17756 - Duplicate checkout emails
2025-09-09 09:33:03 +01:00
Marcus Moore
324070f345 Begin to build out test 2025-09-08 17:20:22 -07:00
Marcus Moore
e1aa843b6d Scaffold test 2025-09-08 17:05:14 -07:00
Godfrey M
e652a7fd61 fix tests 2025-09-08 14:56:15 -07:00
Marcus Moore
2397bfbad0 Improve variable name 2025-09-08 14:51:19 -07:00
Marcus Moore
7e2bc8e452 Display accurate quantity in banner 2025-09-08 14:48:11 -07:00
Godfrey M
00e8fd0483 cloned mailable 2025-09-08 14:44:58 -07:00
Marcus Moore
6d8bf2c665 Display accessory checkout qty in subject line 2025-09-08 14:25:56 -07:00
snipe
77b79dbd95 Merge remote-tracking branch 'origin/develop' 2025-09-08 15:04:42 +01:00
snipe
72466f1aab Revert "Merge pull request #17823 from grokability/#17822-fix-n+1-in-topmenu"
This reverts commit 6901deccbf, reversing
changes made to 6b87c90e02.

Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 15:04:28 +01:00
snipe
dafc6c5136 Merge remote-tracking branch 'origin/develop' 2025-09-08 14:34:16 +01:00
snipe
6901deccbf Merge pull request #17823 from grokability/#17822-fix-n+1-in-topmenu
Fixed #17822 - n+1 in top menu check
2025-09-08 14:33:47 +01:00
snipe
5a9c906eb9 Added filter to assets loading
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 14:32:58 +01:00
snipe
b95b60b49e Use eager-loaded model assets
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 14:07:49 +01:00
snipe
14408ef18f Fixed n+1 in top menu check
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 13:55:22 +01:00
snipe
c790147a5c Merge remote-tracking branch 'origin/develop' 2025-09-08 13:33:29 +01:00
snipe
6b87c90e02 Use scope for assets for show in sidebar
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 13:33:19 +01:00
snipe
80c39c5ef3 Merge remote-tracking branch 'origin/develop' 2025-09-08 12:17:41 +01:00
snipe
2b4d5222eb Made “add new” buttons clearer on table headers
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 12:17:29 +01:00
snipe
9604ecebad Fixed jobtitle in advanced search
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 12:01:59 +01:00
snipe
9a3e84d84c Merge remote-tracking branch 'origin/develop' 2025-09-08 09:27:51 +01:00
snipe
0d67970a45 Update @swift2512 as a contributor 2025-09-08 09:27:34 +01:00
snipe
913b9f0c40 Reworks PR #15490 - adds location to inventory email
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 09:26:36 +01:00
snipe
610a5745f0 Merge pull request #17818 from grokability/dependabot/github_actions/develop/actions/stale-10
Bump actions/stale from 9 to 10
2025-09-08 09:17:19 +01:00
dependabot[bot]
dff12324c6 Bump actions/stale from 9 to 10
Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 08:16:24 +00:00
snipe
f340390fc8 Merge pull request #17703 from marcusmoore/17369-accessory-checkout-qty-scaffold
Fixed issues around accessory acceptance
2025-09-08 09:09:26 +01:00
snipe
643960c829 Merge remote-tracking branch 'origin/develop' 2025-09-08 08:25:08 +01:00
snipe
be81e74921 Shifted log meta position
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 08:24:50 +01:00
snipe
1737018325 Merge remote-tracking branch 'origin/develop' 2025-09-08 08:14:45 +01:00
snipe
2bee8729e4 Better escaping for display_name in API controller
Signed-off-by: snipe <snipe@snipe.net>
2025-09-08 08:14:33 +01:00
snipe
5d03038734 Use auto-direction for <p> in preview
Signed-off-by: snipe <snipe@snipe.net>
2025-09-05 15:12:38 +01:00
snipe
75b11de0f4 Bumped composer packages
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 19:55:30 +01:00
snipe
484d5ba76e Merge remote-tracking branch 'origin/develop' 2025-09-04 17:15:53 +01:00
snipe
c5bede8594 More small display_name fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 17:15:06 +01:00
snipe
798685d0b8 Merge remote-tracking branch 'origin/develop' 2025-09-04 16:56:55 +01:00
snipe
cd9ea6ae3b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:56:43 +01:00
snipe
cb7654ae90 Merge remote-tracking branch 'origin/develop' 2025-09-04 16:55:57 +01:00
snipe
113b762ec7 Fix for null location in locations print
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:55:44 +01:00
snipe
78704d8b85 Fixed #17803 - checked out to name in custom report
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:51:10 +01:00
snipe
1109db76fe Merge pull request #17797 from grokability/#17796-search-on-model-name-and-number
Fixed #17796 - search on model name and number on importer
2025-09-04 16:35:43 +01:00
snipe
b1b390febf Removed flaky test
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:30:02 +01:00
snipe
be451fa0c0 Removed asset model from original factory
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:14:27 +01:00
snipe
1fa553c785 Use nths
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:04:16 +01:00
snipe
905f61371d Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 16:02:40 +01:00
snipe
7da5210a01 Switched to nth from fetchOne in CSV reader
Signed-off-by: snipe <snipe@snipe.net>
2025-09-04 12:50:12 +01:00
snipe
18172d3896 Merge pull request #17752 from marcusmoore/fixes/existing-assets-report
Improve expiring alerts notification layout
2025-09-04 12:33:32 +01:00
snipe
c28e78b9e2 Merge pull request #16063 from Godmartinz/checkin_non_reassignable_license
Allows check-ins of unreassignable licenses
2025-09-04 11:22:17 +01:00
snipe
e7827a3847 Merge pull request #17800 from marcusmoore/chore/test-action-logs
Upload log file in GitHub Action tests
2025-09-04 10:20:12 +01:00
Marcus Moore
039564e74c Wrap migration in check 2025-09-03 12:52:46 -07:00
Marcus Moore
e164595a0f Fall back to displaying 1 2025-09-03 12:35:18 -07:00
Marcus Moore
d29e09a3ff Merge branch 'develop' into 17369-accessory-checkout-qty-scaffold
# Conflicts:
#	resources/views/account/accept/create.blade.php
#	resources/views/account/accept/index.blade.php
2025-09-03 12:26:43 -07:00
Godfrey M
db9f85e9da Merge branch 'develop' into checkin_non_reassignable_license
# Conflicts:
#	app/Models/License.php
#	resources/views/licenses/view.blade.php
#	tests/Feature/Checkins/Api/LicenseCheckInTest.php
2025-09-03 11:09:51 -07:00
Marcus Moore
27022954b1 Inline icon 2025-09-03 10:44:19 -07:00
Marcus Moore
30362c924f Upload log as artifact 2025-09-03 10:13:01 -07:00
snipe
bf63b15b46 Merge pull request #17799 from grokability/#17798-adds-require-serial-to-importer
Fixed #17798 - added `require_serial` to model importer
2025-09-03 15:32:42 +01:00
snipe
19aea4bd6c Fixed #17798 - added require_serial to model importer
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:25:56 +01:00
snipe
090890e9c6 Fixed #17796 - search on model name and number on importer
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:15:29 +01:00
snipe
00c394345a Merge remote-tracking branch 'origin/develop' 2025-09-03 15:09:42 +01:00
snipe
605022a9e3 Merge pull request #17795 from grokability/#17791-larger-currency-field
Fixed #17791 - increase size of purchase cost field
2025-09-03 15:09:28 +01:00
snipe
b06c58fe7b Switch to older style rules for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:06:27 +01:00
snipe
f5c8b3eb04 Fixed #17791 - increase size of purchase cost field
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 15:03:49 +01:00
snipe
739980aa09 Merge pull request #16947 from Godmartinz/add-require-serial-to-models
Adds require serial as Asset Model option
2025-09-03 14:53:15 +01:00
snipe
afde5943e3 Fixed typo - #17784
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 14:39:59 +01:00
snipe
32300cb42c Merge pull request #17788 from grokability/add-delete-log-instead-of-soft-deleting-the-log-itself
Fixed #17777 - Log upload deletion
2025-09-03 14:37:32 +01:00
snipe
dffcb62fa1 Merge remote-tracking branch 'origin/develop' 2025-09-03 14:35:31 +01:00
snipe
de3b1697c8 Merge pull request #17760 from Godmartinz/fix-translation-string-in-notifications
Fixes #17759 translation used in asset check in/out notifications
2025-09-03 14:33:57 +01:00
snipe
8c668b72b7 Merge remote-tracking branch 'origin/develop' 2025-09-03 08:45:20 +01:00
snipe
a18fb10b5a Merge pull request #17783 from marcusmoore/fixes/company-in-location-print
Fixed company name reference in location print
2025-09-03 08:44:40 +01:00
snipe
52140dbe06 Log upload deletion
Signed-off-by: snipe <snipe@snipe.net>
2025-09-03 08:37:42 +01:00
Marcus Moore
db5bb1928e Merge branch 'develop' into fixes/existing-assets-report
# Conflicts:
#	resources/views/notifications/markdown/report-expiring-assets.blade.php
2025-09-02 15:07:23 -07:00
Marcus Moore
65b66beb07 Make icon more prominent 2025-09-02 14:55:46 -07:00
Marcus Moore
c83504b4e7 Use display_name in place of presenter 2025-09-02 12:57:40 -07:00
Godfrey M
cd2e7ee31d fix google and slack notifications 2025-09-02 10:53:42 -07:00
Godfrey M
c3a0a0415a fix MS Teams Notifications 2025-09-02 10:48:02 -07:00
snipe
709f4672b7 Merge pull request #17771 from grokability/#10107-remember-checkout-to-type
Fixed #10107 - remember checkout to type
2025-09-02 13:46:13 +01:00
snipe
b54ecd4da0 Merge remote-tracking branch 'origin/develop' 2025-09-02 13:45:41 +01:00
snipe
e6c030b050 Merge pull request #17781 from grokability/#17780-add-withtrashed-to-files
Fixed #17780 - Added `withTrashed()` to allow viewing files on deleted objects
2025-09-02 13:45:18 +01:00
snipe
7bd3a791a1 Added withTrashed() to allow viewing files on deleted objects
Signed-off-by: snipe <snipe@snipe.net>
2025-09-02 13:39:35 +01:00
snipe
87a7e3501b Merge remote-tracking branch 'origin/develop' 2025-09-02 11:30:44 +01:00
snipe
b9cfc03b4f display name fix
Signed-off-by: snipe <snipe@snipe.net>
2025-09-02 11:30:34 +01:00
snipe
daefec3013 Merge remote-tracking branch 'origin/develop' 2025-09-01 20:32:57 +01:00
snipe
131327a64d Fixed “undefined” error on status labels in BS tables
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 20:32:42 +01:00
snipe
183a9742c4 Merge remote-tracking branch 'origin/develop' 2025-09-01 17:08:43 +01:00
snipe
77d002a158 Use null for role as well
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:43:05 +01:00
snipe
94699893ac Updated fieldname in user API request
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:17:39 +01:00
snipe
9f81989bdd Return null instead of blank for display_name in API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 16:06:28 +01:00
snipe
15abe36c53 More tweaks to display
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:58:02 +01:00
snipe
3094e007ee Set session to remember checkout type
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:28:07 +01:00
snipe
eb259aee22 Set asset selector to true for components since it will always be required
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 13:18:58 +01:00
snipe
04b83f8176 Merge remote-tracking branch 'origin/develop' 2025-09-01 12:28:40 +01:00
snipe
c05c8defb9 Merge pull request #17769 from grokability/#9978-add-pivot-to-accessories-api
Fixes #9978 - Added payload to accessories API
2025-09-01 12:28:08 +01:00
snipe
bf5668a42e Added payload to accessories API
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 12:23:39 +01:00
snipe
335ab3f064 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/build/app.css
#	public/css/build/app.css.map
#	public/css/dist/all.css
#	public/mix-manifest.json
2025-09-01 11:57:07 +01:00
snipe
ec310bc8fb Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 11:56:01 +01:00
snipe
db477421b2 Bumped to 8.3.1
Signed-off-by: snipe <snipe@snipe.net>
2025-09-01 11:54:53 +01:00
snipe
30a9496cf5 Merge pull request #17748 from Godmartinz/parent-location-in-asset-view
Adds #10969 Parent location to Asset Checked out to info
2025-09-01 11:49:42 +01:00
snipe
6cefa0d0b3 Merge pull request #17745 from Godmartinz/dropdown-link-color-fix
Fixes #17488 (Part 2) Nav dropdown link color and skin names
2025-09-01 11:48:29 +01:00
snipe
9284984265 Merge pull request #17768 from Speedyduck300000/develop
Fixed #17742: don't delete random actionlog when trying to delete a file
2025-09-01 11:40:06 +01:00
Speedyduck300000
53b96168a9 fixed uploadfilescontroller to use the file_id to delete the correct
entry.
2025-09-01 07:34:18 +02:00
Godfrey M
eadce51f10 fixes check in check out translations for assets in notiications 2025-08-29 11:12:05 -07:00
snipe
7dd493da35 Merge remote-tracking branch 'origin/develop' 2025-08-29 10:17:26 +01:00
snipe
b3c583b6dc Few more ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-29 10:17:16 +01:00
snipe
560bd6da92 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	resources/views/notifications/markdown/report-expiring-assets.blade.php
2025-08-29 10:08:56 +01:00
snipe
28abeab31d Fixed a few more display_name instances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-29 10:06:58 +01:00
snipe
a5824ccc5f Merge pull request #17754 from marcusmoore/fixes/name-in-expiring-assets-master
Patch #17751 to master take 2
2025-08-29 01:25:46 +01:00
Marcus Moore
830a7964a4 Use display_name in place of name() 2025-08-28 17:23:56 -07:00
snipe
12a649ec4b Merge pull request #17751 from marcusmoore/fixes/name-in-expiring-assets
Fixed user display name in expiring asset notification
2025-08-29 01:11:05 +01:00
Marcus Moore
35b79e4d14 Remove old comments 2025-08-28 16:56:40 -07:00
Marcus Moore
751dad7f2e Inline days 2025-08-28 16:56:12 -07:00
Marcus Moore
b08d86220a First pass at moving to table structure 2025-08-28 16:53:13 -07:00
Marcus Moore
3a27ecc475 Use display_name in place of name() 2025-08-28 16:22:24 -07:00
Godfrey M
da6fab5d43 adds parent location to checked out to location 2025-08-28 13:37:40 -07:00
snipe
ca95b29cd6 Add telescope tables to the excepted tables
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 19:52:56 +01:00
Godfrey M
c5c68e9dd5 fix dropdown link color and skin names 2025-08-28 11:49:37 -07:00
snipe
44fbde26fa Merge pull request #17743 from grokability/normalize-trait-locations
Moved model traits into proper directory
2025-08-28 18:52:43 +01:00
snipe
6e2bcd6aa9 Merge pull request #17680 from grokability/added-telescope
Added laravel telescope for dev environment
2025-08-28 18:52:18 +01:00
snipe
b1359c3277 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-08-28 18:34:14 +01:00
snipe
9c0202e5ce Bumped to 8.3.0
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:33:46 +01:00
snipe
39ef353073 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:32:07 +01:00
snipe
7b5d90dd81 Moved model traits into proper directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:23:26 +01:00
snipe
0ba8f5cc5a Merge remote-tracking branch 'origin/develop' 2025-08-28 18:06:29 +01:00
snipe
d1129081df Asset nothing is sent if send_welcome is not checked/passed
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 18:05:40 +01:00
snipe
315a812df5 Fixed typos
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 16:41:56 +01:00
snipe
6fb9e2c38e Merge remote-tracking branch 'origin/develop' 2025-08-28 16:12:18 +01:00
snipe
cfc979acf0 Merge pull request #17432 from oolivero45/patch-1
Fixed #17431: EULA not displaying on asset acceptance page
2025-08-28 16:09:36 +01:00
snipe
d7407d70a3 Merge pull request #17741 from grokability/improved-user-create-tests
Improved user create tests
2025-08-28 13:32:46 +01:00
snipe
8ccd2e97a8 Improved user create tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 13:27:08 +01:00
snipe
988204619f Merge pull request #17740 from grokability/renamed-user-test
Renamed the test for consistency
2025-08-28 13:05:05 +01:00
snipe
cad6cc3007 Renamed the test for consistency
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 13:02:01 +01:00
snipe
eebc2ab8be Merge remote-tracking branch 'origin/develop' 2025-08-28 07:30:15 +01:00
snipe
b303875f1d Merge pull request #17734 from grokability/#17726-add-welcome-email-to-new-user-form
Fixed #17726: add welcome email to new user form
2025-08-28 07:29:56 +01:00
snipe
d5cc61f378 Added send to API call for creating users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 07:28:51 +01:00
snipe
0d7ec43262 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:19:41 +01:00
snipe
d3747f4daa Added welcome email to controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:12:01 +01:00
snipe
af695e7dc8 Added help to user importer
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:52 +01:00
snipe
1edbfd87df Added welcome email checkbox to user create form
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:40 +01:00
snipe
454be01a6c Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-28 06:11:23 +01:00
snipe
b65b3151ee Merge remote-tracking branch 'origin/develop' 2025-08-28 05:29:48 +01:00
snipe
745fc515f1 Merge pull request #17713 from Godmartinz/fix-localization-for-email-notifications
Adds #5554 locale for acceptance notifications and checkin/out emails
2025-08-28 05:29:28 +01:00
snipe
715b9c1182 Merge pull request #17730 from Godmartinz/update-asset-accepance-with-category
Adds #9000 Item type to Account Asset Acceptance index
2025-08-28 05:22:54 +01:00
spencerrlongg
1d24b7985b another translation change 2025-08-27 17:25:17 -05:00
spencerrlongg
526bb2c650 more translation changes 2025-08-27 17:23:46 -05:00
spencerrlongg
c450c0ddb8 lots of translation changes 2025-08-27 17:17:18 -05:00
Godfrey M
95be847d87 renamed attribute 2025-08-27 14:10:51 -07:00
Godfrey M
c1a6546eba change column header 2025-08-27 14:09:13 -07:00
Godfrey M
648c25a0a7 adds item type to Accept asset index 2025-08-27 14:06:10 -07:00
Godfrey M
f2ec7f2975 fix tests 2025-08-27 13:22:35 -07:00
Godfrey M
f518af6d61 fix class name 2025-08-27 13:09:05 -07:00
snipe
13a0f49f5f Merge remote-tracking branch 'origin/develop' 2025-08-27 16:36:05 +01:00
snipe
b11c6a5c06 Updated depreciation translation with more information.
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 16:35:49 +01:00
snipe
5822e4e692 Merge pull request #17729 from grokability/exit-early-if-ldap-troubleshooter-cannot-decrypt-ldap-pw
Put LDAP troubleshooter's decrypt in a try/catch to avoid crashing if it cannot decrypt the password
2025-08-27 15:47:22 +01:00
snipe
e4f06b0ca8 One last time
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:43:48 +01:00
snipe
2f093c0e82 Added early exist on step 4 as well
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:41:39 +01:00
snipe
5d9dc0e74d Put decrypt in a try/catch
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 15:33:26 +01:00
snipe
199eefafa1 Merge remote-tracking branch 'origin/develop' 2025-08-27 14:38:47 +01:00
snipe
adc3a34929 Fixed copy for encrypted custom fields
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 14:38:36 +01:00
snipe
cb2ffe6b3f Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 14:02:39 +01:00
snipe
c5b58f9ecc Merge remote-tracking branch 'origin/develop' 2025-08-27 13:32:25 +01:00
snipe
b3e3d01672 Fixed LDAP icon spacing
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 13:32:02 +01:00
snipe
6b68fe4de6 Merge remote-tracking branch 'origin/develop' 2025-08-27 13:30:19 +01:00
snipe
4a6520fc78 Fixed address field
Signed-off-by: snipe <snipe@snipe.net>
2025-08-27 13:30:07 +01:00
snipe
75ab6c9b13 Merge pull request #17723 from uberbrady/improve_ldap_certificate_ignoring
Improve ldap certificate ignoring
2025-08-27 13:29:33 +01:00
snipe
2f77fcb526 Merge pull request #17724 from Godmartinz/checkout2location_email_fix
Fixes #17642 Checkouts to location email for Assets and Accessories
2025-08-27 13:02:57 +01:00
snipe
3461bbfdb3 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# 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
2025-08-27 12:28:22 +01:00
Brady Wetherington
60604c3481 With the new SSL stuff, we are calling ldap_set_option() one more time now 2025-08-27 12:25:39 +01:00
spencerrlongg
51f6927076 add details block for more than 3 errors to notification 2025-08-26 21:50:08 -05:00
Godfrey M
671c113cd2 add coma to translation" 2025-08-26 16:07:04 -07:00
Godfrey M
8a74d21ede fixes checkout emails to location for assets and accessories" 2025-08-26 16:00:26 -07:00
Godfrey M
75995b2109 fix checkout to location email 2025-08-26 15:34:38 -07:00
akemidx
e1de57384e field for number choice 2025-08-26 18:03:47 -04:00
Marcus Moore
4298aad008 Merge branch 'develop' into 17369-accessory-checkout-qty-scaffold
# Conflicts:
#	app/Http/Controllers/Account/AcceptanceController.php
#	resources/views/notifications/markdown/asset-acceptance.blade.php
2025-08-26 11:39:52 -07:00
Marcus Moore
823c67400d Fix indent 2025-08-26 11:34:10 -07:00
Marcus Moore
3160d1064d Remove unused import 2025-08-26 11:32:38 -07:00
snipe
d1eefc3fea Merge pull request #17692 from grokability/#17387-make-saml-key-size-an-env
Fixed #17386 - Added SAML key size to env - possible alternative to #17387
2025-08-26 16:28:27 +01:00
Brady Wetherington
16795382fc Many cleanups to default-mode of LDAP troubleshooter 2025-08-26 15:53:18 +01:00
snipe
eb17974adc Merge pull request #17722 from grokability/#17704-retain-linebreaks
Fixed #17704 -  retain linebreaks on custom field clipboard copy
2025-08-26 15:44:38 +01:00
snipe
22852c27f8 Use generic length for asterisks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:38:56 +01:00
snipe
f4a94d975d Fixes #17704 - retain linebreaks in clipboard for multi-line custom field copying
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:33:19 +01:00
snipe
7a36bbbd1e Merge pull request #17721 from grokability/small-ldap-preview-display-tweaks
Improved LDAP field sync preview
2025-08-26 15:26:09 +01:00
snipe
2b401b965b Fixed casing
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:22:00 +01:00
snipe
314bc5b44f Added manager
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:14:29 +01:00
snipe
76374f0d5a Updated text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:14:22 +01:00
snipe
264efb015e Fixed jobtitle field mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 15:05:05 +01:00
Brady Wetherington
e74460aefc Merge branch 'develop' into improve_ldap_certifcate_ignoring 2025-08-26 15:01:11 +01:00
Brady Wetherington
55a5a12b30 Formalize the 'double-barrel' method of setting TLS cert ignores 2025-08-26 15:00:33 +01:00
snipe
58944a38eb Make screen and table wider
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:59:11 +01:00
snipe
469e3bd475 Nicer ldap preview layout, show all mapped fields
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:51:34 +01:00
snipe
17650c5735 Changed field title
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 14:03:11 +01:00
Brady Wetherington
15e64155b5 Add version checking to LDAP troubleshooter, clean up ldap model 2025-08-26 13:57:25 +01:00
snipe
39955ac760 Add @akaspeh1 as a contributor 2025-08-26 12:42:20 +01:00
snipe
855a176ca9 Add @nickwest as a contributor 2025-08-26 12:42:15 +01:00
snipe
47b2b30455 Merge pull request #17710 from akaspeh1/develop
Adds support for label sheets Avery L4736 & L6009
2025-08-26 12:42:02 +01:00
snipe
b702e3e2de Merge pull request #17492 from ischooluw/17448-feature-notes-api-endpoints
Fixes #17448: feat(api) - API endpoint for Adding Ad-Hoc Notes to Assets
2025-08-26 12:40:52 +01:00
snipe
a6b74d56c6 Merge pull request #17709 from grokability/add-display-name-to-users-fixed
Added display name to users for LDAP/SCIM, added new sync fields (replaced #17650)
2025-08-26 12:39:25 +01:00
snipe
a4222bcaef Merge pull request #17711 from grokability/dependabot/github_actions/develop/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-26 12:10:24 +01:00
snipe
ecf24511cd Fixed tests for real this time tho
Signed-off-by: snipe <snipe@snipe.net>
2025-08-26 12:09:55 +01:00
snipe
abb097a391 Merge pull request #17714 from Godmartinz/Audit_null_fix
Added null checks to MS Teams Audit notification
2025-08-26 10:44:51 +01:00
spencerrlongg
1d88cf443f revert SuppliersController as well 2025-08-25 18:45:31 -05:00
spencerrlongg
7b6c0c3a40 Revert "tests passing, needs some manual testing"
This reverts commit fdb0651bf4.
2025-08-25 18:42:11 -05:00
spencerrlongg
fdb0651bf4 tests passing, needs some manual testing 2025-08-25 18:25:36 -05:00
Godfrey M
dd742a2e4a add a check for audit notification variables in MS Teams and a translation 2025-08-25 15:10:41 -07:00
spencerrlongg
c39d484611 rm unused import, new prop 2025-08-25 16:30:53 -05:00
spencerrlongg
c42996429f rm unused import 2025-08-25 14:10:12 -05:00
spencerrlongg
a091baf5a6 component finally working 2025-08-25 14:06:56 -05:00
Godfrey M
128bdf500a sends an email for to locale and cc locale 2025-08-25 12:02:23 -07:00
dependabot[bot]
73ac00bc51 Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 16:25:39 +00:00
snipe
3524e23e38 Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 17:17:45 +01:00
Jakub Aqaba Štarman
be0f3910bb Fixed: Old computation 2025-08-25 16:57:32 +02:00
snipe
07dbc6842c Are you KIDDING ME, Github??
This reverts commit c8e79aa5ca, reversing
changes made to e60f2b2332.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:56:28 +01:00
Jakub Aqaba Štarman
5a16b59462 Adds support for label sheets Avery L4736 & L6009 2025-08-25 16:47:52 +02:00
Brady Wetherington
13cd7071b8 WIP improving some LDAP stuff 2025-08-25 15:41:01 +01:00
snipe
40108b196c Trying to fix import tests :(
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:28:43 +01:00
snipe
c8e79aa5ca Merge branch 'develop' into add-display-name-to-users-fixed 2025-08-25 15:28:20 +01:00
snipe
e60f2b2332 Tightened up accessor code for better inheritence
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 15:00:10 +01:00
snipe
b6d397bcca Updated ->present()->fullName() to ->display_name
Signed-off-by: snipe <snipe@snipe.net>
2025-08-25 14:57:34 +01:00
Marcus Moore
918426a2fa Add qty to accept assets table 2025-08-21 15:49:36 -07:00
Marcus Moore
c076b37c9b Add qty to accessory eula pdf 2025-08-21 15:05:24 -07:00
Marcus Moore
7c58bfa282 Add qty to AcceptanceAssetDeclinedNotification 2025-08-21 14:56:24 -07:00
Marcus Moore
0caaba156d Add qty to AcceptanceAssetAcceptedNotification 2025-08-21 14:54:43 -07:00
Marcus Moore
c22575812d Add qty to AcceptanceAssetAcceptedToUserNotification 2025-08-21 14:53:00 -07:00
Marcus Moore
0ede4da816 Remove CleanDeclinedAccessoryCheckouts command 2025-08-21 14:34:31 -07:00
Marcus Moore
98e23ff92e Remove legacy testing from test 2025-08-21 14:34:16 -07:00
snipe
6503f9c667 Revert "Merge pull request #17650 from grokability/add-displayName-to-users"
This reverts commit 4770e469b4, reversing
changes made to 29a18c7c8b.

Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 20:23:47 +01:00
snipe
4770e469b4 Merge pull request #17650 from grokability/add-displayName-to-users
Add display name to users for LDAP/SCIM, added new sync fields
2025-08-21 18:22:34 +01:00
snipe
29a18c7c8b Merge pull request #17696 from uberbrady/add_created_at_index_to_models
Fixed [FD-49550] - added a 'created_at' index to the models table
2025-08-21 14:54:20 +01:00
Brady Wetherington
6db0003e3f Adds a 'created_at' index to the models table 2025-08-21 13:44:14 +01:00
snipe
c538c460fa Merge pull request #17695 from grokability/#17482-better-localization-indates-on-asset-view
Use nicer local for purchase date
2025-08-21 13:13:26 +01:00
snipe
822339fe42 Moved warning
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 13:13:11 +01:00
snipe
b84d9282ca Use normal locale for warranty
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 13:05:01 +01:00
snipe
00a17cd55e Merge remote-tracking branch 'origin/develop' 2025-08-21 11:51:50 +01:00
snipe
952b6f33bb Add @strobelm as a contributor 2025-08-21 11:51:37 +01:00
snipe
c57c4b8ff2 Merge pull request #17691 from qay21/fix-components-url
Fix components presenting wrong URLs
2025-08-21 11:37:27 +01:00
snipe
39e6223ff2 POssible alternative to #17386 - adding SAML key size to env
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 11:27:50 +01:00
qay
d8dd274c08 Fix components presenting wrong URLs 2025-08-21 12:26:13 +02:00
snipe
15f97b6cb9 Merge pull request #17591 from Godmartinz/add-serial-to-expiring-asset-report
Adds #17440 serial number column to Expiring Assets Report
2025-08-21 11:14:45 +01:00
snipe
fc091c1174 Added comments
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:29:12 +01:00
snipe
c07ef4d87f A few small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-21 09:25:42 +01:00
spencerrlongg
643d44af22 change \Throwable to \Exceptionm, add missing report()s 2025-08-20 23:09:59 -05:00
spencerrlongg
b934f43db0 rename all exceptions 2025-08-20 22:58:39 -05:00
Marcus Moore
c7bdad649a Build out command 2025-08-20 16:06:11 -07:00
Marcus Moore
18c2508d2f Scaffold command for cleaning accessory_checkout 2025-08-20 13:49:19 -07:00
Marcus Moore
4dcfd8b353 Improve method name 2025-08-20 13:19:00 -07:00
Marcus Moore
726116574d Improve readability? 2025-08-20 12:40:03 -07:00
Marcus Moore
27f02014ca Add failing test 2025-08-20 12:26:55 -07:00
Marcus Moore
f80f1acaa7 Improve variable name 2025-08-20 12:15:58 -07:00
Marcus Moore
39d5ffeceb Implement fix 2025-08-20 12:05:58 -07:00
Marcus Moore
48ba7eed3e Remove legacy checks from test 2025-08-20 11:45:36 -07:00
snipe
f39afe5a65 Merge remote-tracking branch 'origin/develop' 2025-08-20 15:56:19 +01:00
snipe
11eee833bb Fixed #17667 - Switch to hyphens for windows
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 15:56:10 +01:00
snipe
35b358d336 Check for $user to handle tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:47:58 +01:00
snipe
ae109be631 Small tweaks
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:43:52 +01:00
snipe
3f7ed73395 Added laravel telescope for dev environment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:26:28 +01:00
snipe
7612ee6b08 Merge remote-tracking branch 'origin/develop' 2025-08-20 14:17:38 +01:00
snipe
fec9d716ee Merge pull request #17679 from grokability/#17674-add-ods-and-odt
Fixed #17674: added .ods, .odp, and .odt as acceptable upload types
2025-08-20 14:17:08 +01:00
snipe
da5b1afd19 Removed logging
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:11:42 +01:00
snipe
618106c103 Fixed #17674 - added odp, ods, odt to accepted files
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 14:11:20 +01:00
snipe
2ed2b0101a Merge remote-tracking branch 'origin/develop' 2025-08-20 12:43:57 +01:00
snipe
312be98132 Add @FlorestanII as a contributor 2025-08-20 12:43:43 +01:00
snipe
e0bb77a6d6 Merge pull request #17664 from FlorestanII/feature/support-for-dymo-11354-labels
Support for Dymo 11354 Labels.
2025-08-20 12:43:29 +01:00
snipe
5ca9d31964 Merge remote-tracking branch 'origin/develop' 2025-08-20 11:32:27 +01:00
snipe
855922c21a Account for null in tetss (vs 0)
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:32:16 +01:00
snipe
bc645d2621 Use email formatter in licensed_to_email display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:24:16 +01:00
snipe
2fcd8cd261 Merge remote-tracking branch 'origin/develop' 2025-08-20 11:00:26 +01:00
snipe
9c06ff3899 Check for numeric
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 11:00:18 +01:00
snipe
2a37aa3b49 Fixed tooltip
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 10:34:05 +01:00
snipe
0ffa47a2c6 Merge remote-tracking branch 'origin/develop' 2025-08-20 09:58:54 +01:00
snipe
bf591320af Fixed #17665 - delete custom report modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 09:58:30 +01:00
snipe
56e687bed2 Retuen the display name in the API call
Signed-off-by: snipe <snipe@snipe.net>
2025-08-20 09:33:00 +01:00
Marcus Moore
9caa240fdb Revert "Remove total qty of accessory checkouts"
This reverts commit 3ffb73a516.
2025-08-19 17:17:46 -07:00
Marcus Moore
3ffb73a516 Remove total qty of accessory checkouts 2025-08-19 17:04:13 -07:00
Marcus Moore
cc1132be87 Remove flakiness 2025-08-19 16:50:36 -07:00
Marcus Moore
1c31f126ef Clear some flakiness 2025-08-19 16:46:41 -07:00
Marcus Moore
d8eaf2676f Add a couple of notes 2025-08-19 15:54:46 -07:00
akemidx
c95462328a selected value(s) 2025-08-19 18:35:07 -04:00
snipe
07b25fe376 Add display name to summary
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 20:52:18 +01:00
snipe
c2ecd20b7d Updated field text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 20:47:48 +01:00
snipe
1b42abcc98 Fixed mapping
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 19:54:32 +01:00
snipe
9efb49d510 Merge pull request #17663 from Godmartinz/sub-out-translation
Fixes #17653 changes translation to administrator
2025-08-19 19:43:47 +01:00
akemidx
84fc89250a backend works, no save yet 2025-08-19 14:30:26 -04:00
snipe
2d6270c697 Updated validation, switch to string() as db field type
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 19:19:29 +01:00
snipe
0823c23a6e Fixed placeholder text
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:51:56 +01:00
snipe
b3f0ce4b2a Use fieldsets for LDAP settings
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:38:47 +01:00
snipe
8b83584b67 Added mapping fields to LDAP
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 18:31:58 +01:00
Godfrey M
9eb686fe08 changes translation to administrator 2025-08-19 10:23:15 -07:00
Johannes Pollitt
765051ce88 Added LabelWriter for 11354 format labels.
Printable for example with the Dymo LabelWriter 450.
2025-08-19 19:21:48 +02:00
Godfrey M
ed402e0122 adds serial underneath name 2025-08-19 10:10:20 -07:00
snipe
e203d4dee3 Merge remote-tracking branch 'origin/develop' 2025-08-19 14:49:00 +01:00
snipe
1488271a83 Added #8522 - depreciation info on Asset API
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 14:48:48 +01:00
snipe
b47d773e13 Merge remote-tracking branch 'origin/develop' 2025-08-19 14:34:32 +01:00
snipe
48bbf8d005 Merge pull request #17655 from uberbrady/add_category_indexes
Add new indexes to category_id and deleted_at
2025-08-19 14:26:38 +01:00
Brady Wetherington
e97b969d66 Add new indexes to category_id and deleted_at 2025-08-19 14:20:36 +01:00
snipe
a8d0a4a95d Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/mix-manifest.json
2025-08-19 14:12:58 +01:00
snipe
cdd12df81a Fixed #17627 - jquery UI fix for draggable/sortable
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 14:12:06 +01:00
snipe
3fb0804cef Merge remote-tracking branch 'origin/develop' 2025-08-19 13:57:36 +01:00
snipe
050a3afc74 Fixed #17649 - nicer layout on new location modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 13:56:21 +01:00
snipe
270401c693 Added display name to user create modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 13:12:57 +01:00
snipe
551822ce7d Merge pull request #17648 from grokability/possible-fix-for-#17641-map-mobile-via-scim
Fixed #17641: map mobile number via SCIM
2025-08-19 13:09:07 +01:00
snipe
4b8c371097 Updated true to false
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:59:28 +01:00
snipe
90fbf6da46 Modify the presenter to see if they have a display_name set
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:44 +01:00
snipe
0c3103e3d2 Modify the getter
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:30 +01:00
snipe
6a8e1566fe Added display_name to a few more places
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:56:11 +01:00
snipe
ced30082a6 Added display_name as user field
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 12:10:28 +01:00
snipe
f6c64abc1a Fixed #17641 - map mobile number via SCIM
Signed-off-by: snipe <snipe@snipe.net>
2025-08-19 11:41:02 +01:00
snipe
6811ebcd52 Merge remote-tracking branch 'origin/develop' 2025-08-19 10:12:56 +01:00
snipe
7f9939a896 Merge pull request #17638 from Godmartinz/asset-tag-added-to-subject-line
Adds asset tag to subject line of check in check out
2025-08-19 09:36:25 +01:00
akemidx
a80f52cbf4 putting dropdown back 2025-08-18 19:47:26 -04:00
Godfrey M
1c99f2dfdd readd doesntorequireacceptance() to test 2025-08-18 10:52:35 -07:00
Godfrey M
1974fccac3 add tag to other notification test 2025-08-18 10:48:39 -07:00
Godfrey M
911552035e fix other test 2025-08-18 10:39:10 -07:00
Godfrey M
ff25d275ee fix tests 2025-08-18 10:31:03 -07:00
Godfrey M
1fcf5e03e7 adds asset tag to subject line of checkin/out 2025-08-18 10:16:47 -07:00
snipe
4fe7bfb851 Merge remote-tracking branch 'origin/develop' 2025-08-18 15:24:25 +01:00
snipe
9b4101855f Undo double-float
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 15:24:15 +01:00
snipe
9253d894d3 Removed XSS-Protection header
@see https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-XSS-Protection#security_considerations

Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 13:30:53 +01:00
snipe
fb60985d03 Merge remote-tracking branch 'origin/develop' 2025-08-18 12:47:19 +01:00
snipe
ebd79f22c7 Merge pull request #17636 from grokability/#17627-custom-fields-sorting
Fixed #17627: custom fields not sorting correctly
2025-08-18 12:47:03 +01:00
snipe
c1b139fb9a Fixed #17627: custom fields not sorting correctly
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 12:31:03 +01:00
snipe
8f575923cf Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# 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
2025-08-18 11:26:43 +01:00
snipe
a88bcea8ca Merge pull request #17635 from grokability/#17367-fixed-padlock-icon
Fixed #17367: Small adjustment to css-padlock
2025-08-18 11:25:55 +01:00
snipe
21566560a7 Fixed #17367: Small adjustment to css-padlock
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 11:24:05 +01:00
snipe
0ecfd02649 Merge remote-tracking branch 'origin/develop' 2025-08-18 11:00:30 +01:00
snipe
e3ca43bf40 Remove use of formatCurrencyOutput for input display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 11:00:19 +01:00
snipe
420aaf4f61 Merge remote-tracking branch 'origin/develop' 2025-08-18 09:45:19 +01:00
snipe
61abb8d5cb Fixed hardware.bulkedit redirect
Signed-off-by: snipe <snipe@snipe.net>
2025-08-18 09:45:02 +01:00
snipe
0c35f213e1 Merge remote-tracking branch 'origin/develop' 2025-08-17 14:54:43 +01:00
snipe
ecad656551 Merge pull request #17626 from grokability/#17606-s3-url-for-models-on-requestable-view
Fixed #17606 - use `getImageUrl()` to determine if local or S3
2025-08-17 14:54:13 +01:00
snipe
615e6d6e4f Fixes #17606 - use getImageUrl() to determine if local or S3
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:51:52 +01:00
snipe
f68813af13 Merge remote-tracking branch 'origin/develop' 2025-08-17 14:11:41 +01:00
snipe
6dceefb96e Merge pull request #17625 from grokability/#17620-delete-method-custom-fields
Fixed #17620 - delete method custom fields causing method not allowed error
2025-08-17 14:11:17 +01:00
snipe
69eff394fd Removed use statement
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:06:56 +01:00
snipe
a9da3aca81 Combine fields and fieldset exception
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 14:06:49 +01:00
snipe
91f3556375 Added delete test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:33:53 +01:00
snipe
aab7c3a840 Updated custom fields and fieldset pages to use standard delete modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:33:47 +01:00
snipe
9c823119e3 Added new factories for user custom field permissions
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:31:14 +01:00
snipe
f5128833f6 Updated comments
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:52 +01:00
snipe
2bc144354a Use translations and more standard error bag
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:43 +01:00
snipe
e6fec6ec34 Trim model name for display
Signed-off-by: snipe <snipe@snipe.net>
2025-08-17 13:30:28 +01:00
snipe
37a90d0ce9 Merge remote-tracking branch 'origin/develop' 2025-08-15 15:07:29 +02:00
snipe
53389875bf Merge pull request #17611 from grokability/#9965-fallback-to-category-image-for-consumables
Fixed #9965 - fallback to category images (f there are any) when no c…
2025-08-15 15:07:13 +02:00
snipe
3b243b38c8 Fixed #9965 - fallback to category images (f there are any) when no consumable image is present
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 15:03:09 +02:00
snipe
02f1291e8f Merge remote-tracking branch 'origin/develop' 2025-08-15 14:41:24 +02:00
snipe
3d9580808b Merge pull request #17524 from Godmartinz/add-category-and-model-to-checkout-emial
Adds #17507 Category and Model No. to accessory checkout markdown
2025-08-15 14:39:58 +02:00
snipe
2141ee71d4 Merge pull request #17544 from marcusmoore/fixes/custom-field-filter
Fixed invalid custom fields being used for filtering
2025-08-15 14:39:09 +02:00
snipe
01dd07083e Merge pull request #17584 from spencerrlongg/bug/17312-custom-field-checkbox-will-not-clear-if-no-checkboxes-should-be-selected
Fixed #17312 - Fix Nulling Checkboxes
2025-08-15 14:35:37 +02:00
snipe
42a28ea06b Merge pull request #17593 from Godmartinz/add-admin-to-acceptance-emails
FIXED #17380 Adds Admin name to acceptance emails
2025-08-15 14:33:02 +02:00
snipe
92e4f6b5d9 Merge remote-tracking branch 'origin/develop' 2025-08-15 14:31:53 +02:00
snipe
180cb6ba8e Merge pull request #17610 from grokability/#17600-add-checkout-date-to-accessory-list
Fixed #17600 - adds checkout date to accessories tab in user view
2025-08-15 14:31:38 +02:00
snipe
a78762e40b Fixed #17600 - adds checkout date to accessories tab in user view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 14:29:55 +02:00
snipe
7b7738fbcc Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# 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
2025-08-15 14:24:30 +02:00
snipe
9797bb19e2 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-08-15 14:23:22 +02:00
Marcus Moore
3101212c49 Continue to scaffold test 2025-08-14 17:24:36 -07:00
akemidx
7ce324a3a5 controller 2025-08-14 17:42:19 -04:00
Marcus Moore
3f0ac103a1 Scaffold test 2025-08-14 13:29:18 -07:00
Marcus Moore
59bd6ca360 Update button text 2025-08-14 13:21:11 -07:00
Marcus Moore
22fe9a786e Display number of items being accepted 2025-08-14 12:36:46 -07:00
snipe
08a9554b3c Merge pull request #17607 from Godmartinz/color-corrections-pt9000
Fixes #17488 more info text colors
2025-08-14 20:39:26 +02:00
Godfrey M
d79bd825ee fix popover text color 2025-08-14 10:51:31 -07:00
Godfrey M
fe3d225cfa fix tests 2025-08-14 09:15:19 -07:00
akemidx
7624082b29 dropdown 2025-08-13 18:07:39 -04:00
snipe
31197604a3 Merge pull request #17602 from grokability/develop
Merge develop into master
2025-08-13 21:19:39 +02:00
Marcus Moore
d2ee8de9ac Attach qty to CheckoutAcceptance 2025-08-13 12:14:10 -07:00
Marcus Moore
03d3fb6a5f Add qty to checkout_acceptances table 2025-08-13 12:09:56 -07:00
snipe
376e0db66e Merge pull request #17601 from ubc-cpsc/bugfix/CVE-2025-55166
Fixes CVE-2025-55166
2025-08-13 20:49:41 +02:00
Joël Pittet
5fdabc1a62 Fixes CVE-2025-55166 2025-08-13 11:42:14 -07:00
akemidx
6d3bba696a first front end bit 2025-08-12 19:14:11 -04:00
Godfrey M
dfe2a75d72 adds user that checked out item to acceptance emails 2025-08-12 15:34:46 -07:00
Godfrey M
ba85af11aa adds serial to expiring assets report email 2025-08-12 14:59:20 -07:00
Godfrey M
db58b80d27 Merge branch 'develop' into add-category-and-model-to-checkout-emial
# Conflicts:
#	app/Mail/CheckoutLicenseMail.php
2025-08-12 14:20:08 -07:00
Godfrey M
5cb8aae383 add ternaries 2025-08-12 14:16:46 -07:00
spencerrlongg
817530429b added condition to make sure the request has checkbox 2025-08-12 14:52:52 -05:00
spencerrlongg
e33b1b6c90 fixed maintenances 2025-08-12 13:34:40 -05:00
Spencer Long
30520297e8 Merge branch 'develop' into feature/8709-bulk-deletion-of-asset-categories-suppliers-manufacturers 2025-08-12 11:58:11 -06:00
spencerrlongg
78ca1d1335 some cleanup 2025-08-11 21:07:08 -05:00
spencerrlongg
6159ee8c2c category done! 2025-08-11 20:16:43 -05:00
spencerrlongg
5cd5392958 manufacturer completed, just categories left 2025-08-11 19:42:09 -05:00
spencerrlongg
0dcdfc5d14 fix tests after routing change 2025-08-11 19:11:40 -05:00
spencerrlongg
d0e068f1c0 suppliers completely done, rinse and repeat for the other two 2025-08-11 19:04:36 -05:00
Marcus Moore
4a7b7183d2 Add custom_fields. prefix so custom fields can be filtered against 2025-08-11 14:58:41 -07:00
snipe
f42a2d7457 Merge remote-tracking branch 'origin/develop' 2025-08-11 20:45:38 +01:00
snipe
94bd39cf23 Merge pull request #17570 from grokability/#10038-add-active-flag-filter
Added sidenav to filter on activated vs inactive users
2025-08-11 20:45:22 +01:00
snipe
4038a22093 Added sidenav to filter on activated vs inactive users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 20:41:55 +01:00
snipe
d29619b67c Merge remote-tracking branch 'origin/develop' 2025-08-11 18:50:17 +01:00
snipe
682baec0c9 Merge pull request #17569 from grokability/#10284-add-mobile-number
Fixed #10284: Added mobile phone to users
2025-08-11 18:49:49 +01:00
snipe
ff91be491d Added mobile to tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:43:37 +01:00
snipe
ef35a0f2f1 Fixed #10284: Added mobile phone to users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:38:22 +01:00
snipe
f5235cb835 Merge remote-tracking branch 'origin/develop' 2025-08-11 18:12:51 +01:00
snipe
f12a3bb08b Fixed #10306 - cast purchase cost to a float
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 18:12:37 +01:00
snipe
ee830e0cb4 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# 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
2025-08-11 14:58:57 +01:00
snipe
c8a5065ffa Merge pull request #17567 from grokability/#11754-nicer-menu-alignment
Fixed #11754: nicer menu alignment for dropdowns
2025-08-11 14:57:59 +01:00
snipe
23da5573f3 Fixed #11754 - nicer top menu dropdown alignment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 14:56:43 +01:00
snipe
b08f985776 Merge pull request #17566 from grokability/partial-fix-for-#17565-standard-layout
Show all icons on location table, even if no results
2025-08-11 14:17:59 +01:00
snipe
9b968baaa7 Show all icons, even if no results
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 14:14:15 +01:00
snipe
07edbe6f1c Add @mckaygerhard as a contributor 2025-08-11 13:08:54 +01:00
snipe
0cd3be003d Merge remote-tracking branch 'origin/develop' 2025-08-11 13:07:00 +01:00
snipe
1f55a8b6e3 Added icon and tooltip
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 13:06:37 +01:00
snipe
f6b9e11810 Merge pull request #17538 from mckaygerhard/mail-log-improvements
Mail log for #17491 and some improvements on log errors
2025-08-11 13:05:56 +01:00
snipe
c93e35ec77 Merge remote-tracking branch 'origin/develop' 2025-08-11 11:18:31 +01:00
snipe
c18a3e4266 Fixed #17562 - bootstrap table formater undefined
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 11:18:20 +01:00
snipe
9538a76232 Merge remote-tracking branch 'origin/develop' 2025-08-11 06:26:29 +01:00
snipe
5840ef1c6f Fixed #17560
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 06:26:15 +01:00
snipe
7974baddf5 Merge pull request #17551 from grokability/move-file-uploads-paths-to-base-controller
Move the object type mapping and such to the base controller to de-dupe
2025-08-11 05:44:39 +01:00
snipe
05876bb124 Merge remote-tracking branch 'origin/develop' 2025-08-11 05:05:13 +01:00
snipe
4bf569758f Cleans up a few rmore outes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-11 05:05:00 +01:00
snipe
8bcd5a6d2a Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-08-10 21:04:55 +01:00
snipe
f56fd9bb0b Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:04:33 +01:00
snipe
a36afbcb25 Merge remote-tracking branch 'origin/develop' 2025-08-10 21:02:48 +01:00
snipe
357ee5fc45 Copy over the old dirs just in case
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:02:37 +01:00
snipe
ebd8d085cf Merge remote-tracking branch 'origin/develop' 2025-08-10 21:01:34 +01:00
snipe
c6dea085b2 Missed a few
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 21:01:23 +01:00
snipe
505148b024 Merge remote-tracking branch 'origin/develop' 2025-08-10 20:51:27 +01:00
snipe
8782c3ecec Merge pull request #17554 from grokability/#13997-add-ldap-sync-via-api
Adds #13997 - API endpoint to sync users via LDAP
2025-08-10 20:30:44 +01:00
snipe
b636cf2ef0 Merge pull request #17555 from grokability/#17490-use-numeric-for-purchase-cost
Fixed #17490: use numeric for purchase cost
2025-08-10 20:30:15 +01:00
snipe
6dee2b8601 Fixed 17490 - currency symbol breaks purchase_cost
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 19:04:52 +01:00
snipe
bcf301ac17 Adds #13997 - API endpoint to sync users via LDAP
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:48:01 +01:00
snipe
bf2120fb31 Use newer file path 2025-08-10 18:26:41 +01:00
snipe
de56b74f3e Merge branch 'develop' into move-file-uploads-paths-to-base-controller 2025-08-10 18:25:47 +01:00
snipe
2f146abe91 Let people upload images on the demo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:20:35 +01:00
snipe
543d41b6ff Merge pull request #17553 from grokability/#17547-asset-model-images-not-loading
Fixed #17547: asset model images not loading
2025-08-10 18:15:57 +01:00
snipe
8da0dd7563 Use strtolower
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:11:39 +01:00
snipe
a2217d7dbc Specify the public disk for creating directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 18:08:15 +01:00
snipe
ea84728a3f Rename models uploads dir
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:58:11 +01:00
snipe
b2d10f7ccf Rename directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:56:59 +01:00
snipe
b6af25ce99 Fixed #17548 - treeview menu class on people menu
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 17:20:49 +01:00
snipe
7a9d2454d4 Move the object type mapping and such to the base controller to de-dupe
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 16:30:32 +01:00
snipe
a9254cff02 Merge pull request #17550 from grokability/addded-observer-for-maintenances
Added basic logging for maintenances
2025-08-10 16:00:49 +01:00
snipe
d14b34141c Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 15:53:53 +01:00
snipe
14bc2cc1ba Added basic logging for maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 15:51:48 +01:00
snipe
a91b54b97a Added buttons to maintenances table
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:55:34 +01:00
snipe
ead655e1db Fixed translation
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:52:40 +01:00
snipe
c5f28748f7 Merge pull request #17549 from grokability/rename_title_to_name_for_maintenances
Renamed table from `asset_maintenances` to `maintenances` and `title` to `name` for maintenances
2025-08-10 14:28:51 +01:00
snipe
ee4831cb30 Removed followsRedirects so we can check the status
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:23:41 +01:00
snipe
deb1afd28b Few more replcamenents
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 14:14:21 +01:00
snipe
9e8eead71e Renamed routes and method names
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:29:48 +01:00
snipe
3f96f7cbd7 Updated file paths for uploads
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:45 +01:00
snipe
dde2e88332 Renamed variables in purge
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:32 +01:00
snipe
ff25015595 Renamed more files
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:24:14 +01:00
snipe
7d0c695808 Renamed language directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:23:52 +01:00
snipe
906385def9 Renamed directories
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:23:16 +01:00
snipe
a6c6c7eae9 Updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 13:11:50 +01:00
snipe
205725c767 Renamed model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:50 +01:00
snipe
c207efbb35 Rename model in breadcrumbs
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:42 +01:00
snipe
c0211e59b3 Renames maintenances presenter
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:23 +01:00
snipe
dd2678cbb9 Rename maintenances path
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:30:09 +01:00
snipe
e2c87b664e Rename factory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:58 +01:00
snipe
29d4b4dd53 Updated API routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:28 +01:00
snipe
3fba307e55 Updated routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:28:18 +01:00
snipe
7171fa36d8 Added migrations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:27:59 +01:00
snipe
c570f656bf Renamed test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 12:27:48 +01:00
snipe
a5e37519f5 Merge pull request #17539 from grokability/add-file-uploads-to-maintenances
WIP: Add file uploads to maintenances
2025-08-10 11:13:19 +01:00
snipe
0f88d6eec3 Removed error logging
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 11:09:29 +01:00
snipe
651c51bb01 Remove unused statements
Signed-off-by: snipe <snipe@snipe.net>
2025-08-10 10:41:46 +01:00
spencerrlongg
3eefeec4ce partials made, need to figure out all this jquery, button disabled 2025-08-09 22:40:00 -05:00
spencerrlongg
b61419c1ce oop, revert delete 2025-08-09 22:19:28 -05:00
spencerrlongg
f590fcffbc some tests, a component i probably won't use, beginning of front end 2025-08-09 22:16:23 -05:00
mckaygerhard
0fdbdfd5c2 Improve log error handling regarding notification sending for issue #17491
* when an error is generated when denying checkouts, there are not enough logs
to determine the problem from the email provider
* missing handling of log test mail config, there is none of logs cos there
is no log handling on test email, becouse all the results are just sent to
the http response and no log were writen.
2025-08-08 12:18:04 -04:00
snipe
31056ff858 Added new dirs to restore tool
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:56:07 +01:00
snipe
8d2643696b Deleted unused user file controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:59 +01:00
snipe
e7488d19e9 Fixed name for uploaded files controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:48 +01:00
snipe
2bb3b6d64c Fixed prefixes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:55:24 +01:00
snipe
5744e48ae8 Added getDisplayNameAttribute() to maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:54:36 +01:00
snipe
82d0a21440 Added to actionlog model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:54:09 +01:00
snipe
58133cffac Updated maintenance model
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:37:03 +01:00
snipe
bfd8c2f310 Added fles UI on maintenance page
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:51 +01:00
snipe
30d447c023 Updated urls/routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:35 +01:00
snipe
9a0846b8a6 Added directory
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 12:36:16 +01:00
snipe
e87e924ac2 Merge remote-tracking branch 'origin/develop' 2025-08-08 11:37:46 +01:00
snipe
3667fcddd7 Mark flappy API rate limiting tests as skipped :(
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 11:37:36 +01:00
snipe
90f261bab6 Merge remote-tracking branch 'origin/develop' 2025-08-08 11:32:14 +01:00
snipe
906741d662 Bumped debug to warning
Signed-off-by: snipe <snipe@snipe.net>
2025-08-08 11:32:04 +01:00
snipe
f7dfb09a4d Merge remote-tracking branch 'origin/develop' 2025-08-08 09:56:23 +01:00
snipe
12be088c4f Merge pull request #17523 from Godmartinz/fix-create-new-rediret
Fixes #17457 Previous Page redirect option
2025-08-08 09:50:40 +01:00
snipe
6737ba80cd Merge pull request #17489 from grokability/fixes/#17485-handle-alert-menu-better-if-no-alerts
Fixed #17485: nicer alert menu if no items are below qty
2025-08-08 09:50:14 +01:00
snipe
862a3d938e Merge pull request #17543 from Godmartinz/salutation-target-fix
Salutation target fix
2025-08-08 09:49:24 +01:00
snipe
09e82377a5 Merge pull request #17520 from marcusmoore/missing-user-redirect-fix
Fixed potential failure in license checkin due to redirect option
2025-08-08 09:48:43 +01:00
snipe
59470864e7 Merge pull request #17542 from akemidx/assetpolicyclassimport
AssetPolicy class import
2025-08-08 09:40:23 +01:00
Marcus Moore
c95aeb3730 Filter out unallowed columns (custom fields) 2025-08-07 17:25:20 -07:00
Godfrey M
5c55c90d68 add null checks to target 2025-08-07 15:27:50 -07:00
Godfrey M
e47972731b fixed target name for checkouts with licenses and assets 2025-08-07 15:12:23 -07:00
Godfrey M
5851cc9e41 fixed target name for checkouts with licenses and assets 2025-08-07 15:09:38 -07:00
akemidx
6f615230e9 class import 2025-08-07 17:00:28 -04:00
snipe
d91598a25e Merge pull request #17540 from marcusmoore/fixes/asset-serial-validation
Fixed 500 when sending non-string for serial property
2025-08-07 20:53:07 +01:00
snipe
9e416778d9 Merge pull request #17541 from marcusmoore/remove-dump-in-test
Removed debugging dump() in test
2025-08-07 20:52:07 +01:00
Marcus Moore
860a117567 Remove dump in test 2025-08-07 12:50:02 -07:00
Marcus Moore
b8fe3b18d4 Add "string" to serial rules for asset 2025-08-07 12:27:48 -07:00
snipe
40269a724b Fixed test
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:42:59 +01:00
snipe
ec828318d8 Merge pull request #17417 from marcusmoore/snipe-it-17073-asset-requests-are-not-deleted-when-asset-is-deleted
Fixed #17073 - delete old checkout requests
2025-08-07 18:32:13 +01:00
snipe
d31e7ed534 Use new route
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:24:02 +01:00
snipe
5c2dbe438b Added maintenances
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:57 +01:00
snipe
10857635ac Removed unused use statement
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:44 +01:00
snipe
df2545ef80 Updated routes
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:23:17 +01:00
snipe
f6ff729316 Added new generic files upload controller
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:22:57 +01:00
snipe
38678803eb Removed unused controllers
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 18:22:45 +01:00
snipe
67c931f196 Merge pull request #17080 from marcusmoore/allow-id-on-location-select
Allowed setting `id` on location-select component
2025-08-07 18:16:58 +01:00
snipe
3135917127 Merge remote-tracking branch 'origin/develop' 2025-08-07 17:03:01 +01:00
snipe
1c23092d0e Merge pull request #17537 from grokability/add-maintenance-images-and-files
Fixed #10357: Add maintenance image upload
2025-08-07 17:02:34 +01:00
snipe
a90ff21cbf Cleaned up a few more tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 16:58:44 +01:00
snipe
0ce0cee81f Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 16:53:18 +01:00
Герхард PICCORO Lenz McKAY
f4be5ffb5d Fix workaround for #17491 log error on failed response for mail sending
* Part of bunch of fixes, this fix #17491 where admins at test install cannot see the log of errors for UI test mail button, we can just see that this is the correct form cos other parts of the code manage the exception inside the catch using log interface class
2025-08-07 11:42:17 -04:00
snipe
19958748bf Use image upload request
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:39:12 +01:00
snipe
d6ca8468e3 Use snake case for naming paths
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:39:01 +01:00
snipe
7bccb7718b Added partial and enctype="multipart/form-data for upload
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:38:22 +01:00
snipe
f6b63b5e44 Added image to view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:38:04 +01:00
snipe
9a2c5ff195 Updated/added tests
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:57 +01:00
snipe
3597f759da Updated transformers and presenters
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:45 +01:00
snipe
3ed3b21286 Added maintenance file singleton
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:32 +01:00
snipe
b89b636474 Added migration
Signed-off-by: snipe <snipe@snipe.net>
2025-08-07 15:37:16 +01:00
snipe
2afc595452 Don’t show license key formatter if no value
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:47:47 +01:00
snipe
52afa3d36d Merge remote-tracking branch 'origin/develop' 2025-08-06 16:35:59 +01:00
snipe
c7262f2885 Merge pull request #17532 from grokability/add-available-licenses-back-for-now
[FD-50162] Put remaining seats back on license view for now
2025-08-06 16:35:34 +01:00
snipe
8662aa2277 Put remaining seats back on license view for now
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:33:02 +01:00
snipe
242aa60e04 Merge remote-tracking branch 'origin/develop' 2025-08-06 16:26:14 +01:00
snipe
8095e0ab72 Normalize consumables user response
Signed-off-by: snipe <snipe@snipe.net>
2025-08-06 16:25:51 +01:00
snipe
7a3c2c27ff Merge remote-tracking branch 'origin/develop' 2025-08-05 23:19:38 +01:00
snipe
be3c8ddd5c Hotfix for FD-50160
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 23:19:27 +01:00
Godfrey M
ec5b9ce903 adds category and model no to accessory checkout markdown 2025-08-05 12:44:07 -07:00
Godfrey M
bd2acefecc rethought, keeping previous page as an option 2025-08-05 12:29:59 -07:00
Godfrey M
18e49e9067 only redirect to previous page if not creating 2025-08-05 12:05:22 -07:00
snipe
5d124360c2 Merge remote-tracking branch 'origin/develop' 2025-08-05 19:35:12 +01:00
snipe
a0d65520a3 Use count() instead of ->count() for user count in print view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 19:34:59 +01:00
snipe
365d7448d5 Merge remote-tracking branch 'origin/develop' 2025-08-05 19:06:34 +01:00
snipe
a35731d9d5 Fixed #17513 - updated language string
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 19:06:08 +01:00
snipe
9a0102c723 Merge remote-tracking branch 'origin/develop' 2025-08-05 19:03:00 +01:00
snipe
9d3623cca6 Merge pull request #17521 from grokability/#17518-add-break-after-sigs
Fixed #17518: Adds printer line break after signatures
2025-08-05 19:02:24 +01:00
snipe
2fe08a721f Do not break the page if it’s the last entry
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 19:00:57 +01:00
Marcus Moore
7abc3a7d7d Only push to session if user exists 2025-08-05 10:57:07 -07:00
snipe
d4a34f1a3c Adds printer line break after signatures
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 18:50:47 +01:00
snipe
2f77f2cb2b Merge remote-tracking branch 'origin/develop' 2025-08-05 18:13:27 +01:00
snipe
ddda4848d3 Added avif to inline
Signed-off-by: snipe <snipe@snipe.net>
2025-08-05 18:13:17 +01:00
snipe
528e3a2106 Merge remote-tracking branch 'origin/develop' 2025-08-05 17:48:12 +01:00
snipe
8516856d37 Merge pull request #17456 from spencerrlongg/9511-validation-always-fails-on-encrypted-custom-fields
Fixed #9511 - Validation For Encrypted Custom Fields
2025-08-05 17:45:38 +01:00
snipe
032a664d4c Merge remote-tracking branch 'origin/develop' 2025-08-04 22:27:59 +01:00
snipe
132327594b Merge pull request #17515 from grokability/add-submenu-to-users
Added dropdown menu for users
2025-08-04 22:26:59 +01:00
snipe
d2a2c63070 Added dropdown menu for users
Signed-off-by: snipe <snipe@snipe.net>
2025-08-04 22:25:23 +01:00
snipe
aac1864c9b Merge remote-tracking branch 'origin/develop' 2025-08-04 21:23:41 +01:00
snipe
170a5158fa Merge pull request #17514 from grokability/images-on-cloning
Added ability to copy images on cloning
2025-08-04 21:04:56 +01:00
snipe
1d8493d388 Improved messaging for cloning/editing assets that inherit images
Signed-off-by: snipe <snipe@snipe.net>
2025-08-04 20:51:24 +01:00
Marcus Moore
ff39e8bd2c Merge branch 'develop' into snipe-it-17073-asset-requests-are-not-deleted-when-asset-is-deleted 2025-08-04 12:43:03 -07:00
snipe
c3442033da Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2025-08-04 18:49:07 +01:00
snipe
f1dd84edba Added option to clone original images
Signed-off-by: snipe <snipe@snipe.net>
2025-08-04 18:47:26 +01:00
snipe
e3477f3306 Merge remote-tracking branch 'origin/develop' 2025-08-02 18:41:39 +01:00
snipe
06b040a337 Nicer padding
Signed-off-by: snipe <snipe@snipe.net>
2025-08-02 18:41:26 +01:00
snipe
6620a4f87b Merge remote-tracking branch 'origin/develop' 2025-08-02 14:47:09 +01:00
snipe
fa546ddc5b Merge pull request #17510 from grokability/fixes-#17498-add-serial-to-acceptance
Fixed #17498 - added serial to user acceptance
2025-08-02 14:46:46 +01:00
snipe
f811352c79 Cleaned up HTML
Signed-off-by: snipe <snipe@snipe.net>
2025-08-02 14:46:34 +01:00
snipe
7ed8963b9f Fixed #17498 - added serial to user acceptance
Signed-off-by: snipe <snipe@snipe.net>
2025-08-02 14:38:57 +01:00
snipe
c0e9dff5bf Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/dist/all.js
#	public/js/dist/all.js.map
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2025-08-01 23:13:22 +01:00
snipe
a9fc8b79fd Merge pull request #17508 from grokability/add-table-buttons
Add table buttons and admin filter
2025-08-01 23:12:04 +01:00
snipe
afd794b4c7 Fixed HTML
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 22:20:17 +01:00
snipe
c4a28f0ec4 Use consistent icon for adding people
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 22:18:02 +01:00
snipe
db343bf795 Tweaked bootstrap admin indicators
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 22:15:13 +01:00
snipe
0157043dc5 Added table buttons to user view
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 21:58:48 +01:00
snipe
a947f9bd32 Fixed delete modal
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 21:30:18 +01:00
snipe
2a4181c7c3 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 21:19:18 +01:00
snipe
30192f5b14 Removed extra modal code
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 21:11:54 +01:00
snipe
c41b5e8844 Fixed license delete check
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 21:11:40 +01:00
snipe
b27928807b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 20:44:44 +01:00
snipe
16f1b5e23e Added a few more buttons
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 19:31:25 +01:00
snipe
ed651b6869 Use translations
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:55:15 +01:00
snipe
b9d925c7aa Carry admin/superadmin into the API request
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:49:58 +01:00
snipe
3650a29381 Added superadmin/admin formatter
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:49:37 +01:00
snipe
de84ee3693 Cleaned up asset view table
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:47:51 +01:00
snipe
42ba31591d New formatter for icon
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:46:20 +01:00
snipe
a78a243e20 Added admin/superadmin filter to API
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:46:10 +01:00
snipe
38924ced4a Provide the role so we can use it in the javascript
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:45:23 +01:00
snipe
5e8cc66f5c Added scope for admins and superadmins
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 18:45:07 +01:00
snipe
1353837584 More buttons
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 15:58:15 +01:00
snipe
7cb5a89523 Added access keys
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 15:58:07 +01:00
snipe
1db09a7953 Allow category_id in license export by category
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 15:21:12 +01:00
snipe
bc6aa12dd0 Added buttons to table
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 15:20:55 +01:00
snipe
c3bea88979 Added table button JS
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 15:20:39 +01:00
snipe
6e85e466b0 Merge pull request #17493 from grokability/gallery-view-for-file-uploads
Use the file uploads API for file listing tables, adds gallery view for file uploads
2025-08-01 13:27:27 +01:00
snipe
3327cc70c9 Revert pageSize
Signed-off-by: snipe <snipe@snipe.net>
2025-08-01 12:01:57 +01:00
snipe
c9eac66a93 Tweaked button layout
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:21:58 +01:00
snipe
53e9bd6e48 Use updated formatter
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:21:49 +01:00
snipe
eaa18e1efb Use existing actionlog methods instead of inline
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:21:40 +01:00
snipe
afa3dacc31 Check if it’s an accepted/declined file
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:21:22 +01:00
snipe
c803c4a57a Use new formatters
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:20:35 +01:00
snipe
2d3a53e449 Made existing formatters more flexible, removed unused
Signed-off-by: snipe <snipe@snipe.net>
2025-07-31 13:20:24 +01:00
snipe
2d961c435a Merge remote-tracking branch 'origin/develop' 2025-07-31 04:11:31 +01:00
snipe
5e076754ce Merge pull request #17501 from uberbrady/fix_manufacturer_seeder_button
Fixed #17500 [FD-50045] - Make Manufacturer Seeder button work
2025-07-31 04:09:38 +01:00
Brady Wetherington
927e217961 Fix Manufacturer Seeder button 2025-07-30 09:04:04 -06:00
snipe
80b48101aa Added formatter back
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:19:10 +01:00
snipe
08530e6133 Added icon data-dash to formatters
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:11:35 +01:00
snipe
97130ef6c1 Updated IDs to be less generic
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:11:12 +01:00
snipe
da37feae6d Removed comment
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:10:42 +01:00
snipe
f96172e61f Updated manifest
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:10:33 +01:00
snipe
e35477b8db Made modal control more flexible
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:10:26 +01:00
snipe
cea5560a67 Removed duplicated code for modal handling
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 15:07:35 +01:00
snipe
311bd5e67e Use placeholder for delete button
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 03:31:39 +01:00
snipe
1cfddf2a4c Restore old limit code
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 03:31:29 +01:00
snipe
abe58117fe Moved code closer to actions
Signed-off-by: snipe <snipe@snipe.net>
2025-07-30 03:31:01 +01:00
snipe
ee5f89f70d Fixed pagination
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 22:58:00 +01:00
snipe
4f545ed101 Layout tweaks to template
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 22:57:49 +01:00
snipe
136de4208e Added string
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 21:44:45 +01:00
snipe
7650a2c2a7 Sort by created_by desc by default
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 21:44:23 +01:00
snipe
c3d1987fac Switch to panel
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 21:44:06 +01:00
snipe
12ef78bb1c Added PDF embed
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 21:43:58 +01:00
snipe
16c4241a6e WHY does this work? It’s not in the docs
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 05:42:35 +01:00
snipe
4992c77818 Updated template
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 05:41:43 +01:00
snipe
3a0b1de136 Changed table name
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 05:41:36 +01:00
snipe
1c3ef02c7b FIX THIS!!!
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 05:41:15 +01:00
snipe
f268fe9e80 Added gallery card
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 02:03:12 +01:00
snipe
2ed98c17d4 Added print icon
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 02:03:02 +01:00
snipe
571ae4fbfd Use CSS for nowrap
Signed-off-by: snipe <snipe@snipe.net>
2025-07-29 01:20:20 +01:00
Nicky West
c94a8c42f4 Changed NotesController::getList() to NotesController::index() & reordered methods for consistency 2025-07-28 16:57:46 -07:00
Nicky West
16fdb16a56 Changed over to route model binding and simplified logic & gates 2025-07-28 16:55:11 -07:00
Nicky West
822f9a6f28 Fixed deviations from code standards 2025-07-28 16:37:08 -07:00
Nicky West
b264bbf69f feat(api): Add API endpoints for managing asset history notes
- Add POST endpoint to create a history note attached to an asset
- Add GET endpoint to retrieve history notes for an asset
- Add ActionLog factory state for manual notes
- Implement controller methods with authorization checks
- Add feature tests for note creation, retrieval, and access control
- Register new API routes for these endpoints

Supports automation by enabling programmatic asset history note management.
2025-07-28 15:55:37 -07:00
snipe
6e61e94e02 New manifest
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:36:31 +01:00
snipe
6a7972c5a1 Added new formatters
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:36:18 +01:00
snipe
db4fbe315a Added helper to get media type so we know what kind of lightbox to give it
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:36:11 +01:00
snipe
f3613d7103 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:35:45 +01:00
snipe
cbbed36428 Added multi-file upload for users (bug)
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:35:35 +01:00
snipe
e86e9697b3 Use plural for item type
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:33:25 +01:00
snipe
fd6b2d5715 Simpler blade component calls
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:33:08 +01:00
snipe
fbb36d1665 Fixed file routes
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:32:45 +01:00
snipe
07be1b8192 Added sorting, updated formatters
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:32:25 +01:00
snipe
33880393ac Added string
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:32:00 +01:00
snipe
5123fe7838 Use server side endpoint for filetable blade component
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:31:51 +01:00
snipe
cbe26a365d Made route signature more consistent
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:31:14 +01:00
snipe
f1bb72b2a6 Added custom view extension
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 23:30:51 +01:00
snipe
2c33654395 Fixed #17485 - nicer alert menu if no items are below qty
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 17:50:26 +01:00
snipe
7c95f03166 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/AdminLTE.css
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/css/dist/skins/_all-skins.css
#	public/css/dist/skins/_all-skins.min.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-black.css
#	public/css/dist/skins/skin-black.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-blue.css
#	public/css/dist/skins/skin-blue.min.css
#	public/css/dist/skins/skin-contrast.css
#	public/css/dist/skins/skin-contrast.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-green.css
#	public/css/dist/skins/skin-green.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-orange.css
#	public/css/dist/skins/skin-orange.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-purple.css
#	public/css/dist/skins/skin-purple.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-red.css
#	public/css/dist/skins/skin-red.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/css/dist/skins/skin-yellow.css
#	public/css/dist/skins/skin-yellow.min.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2025-07-28 17:41:13 +01:00
snipe
dd86de017e Dev assets one more time just for good luck
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 17:38:27 +01:00
snipe
3eabde9630 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 17:36:22 +01:00
snipe
640c51af31 Merge pull request #17487 from uberbrady/improve_javascript_3
Optimize javascript for smaller files and faster builds (Rebase of #15175)
2025-07-28 17:34:59 +01:00
Brady Wetherington
7167b17d25 Rebased and brought up to current from the original 2025-07-28 09:57:20 -06:00
snipe
8a35948678 Import DB facade
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 16:17:11 +01:00
snipe
0fe63d3fb9 Re-added jquery-ui
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 14:03:12 +01:00
snipe
e4302c3e88 Fixed comment
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 09:13:32 +01:00
snipe
a7df6fb465 Added DB_SOCKET to example env
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 09:11:00 +01:00
snipe
133e7598e0 Merge pull request #17478 from grokability/library-upgrades
Library upgrades
2025-07-28 09:00:02 +01:00
snipe
c1a52ffa75 Bumped jspdf-autotable from ^3.8.4 to ^5.0.2
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:52:52 +01:00
snipe
4f46313388 Bumped tableexport to ^1.33.0
https://www.npmjs.com/package/tableexport.jquery.plugin
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:50:47 +01:00
snipe
03b2cc9cd2 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:43:22 +01:00
snipe
1a2bf8dc95 Bumped boostrap table from 1.24.1 to 1.24.2
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:43:17 +01:00
snipe
dd63fbeb84 Moved webpack to dev dependencies
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:38:26 +01:00
snipe
59e435c418 Bumped additional libraries
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:36:13 +01:00
snipe
f89f0a19b5 Updated axios
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:33:07 +01:00
snipe
cbc6ef95cb Removed babel-preset
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:26:52 +01:00
snipe
0ceecc9e1d Removed jquery UI
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:24:16 +01:00
snipe
c816902025 Updated postcss
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:19:56 +01:00
snipe
cfb03cdca0 Updated imagemin JS
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:07:34 +01:00
snipe
266f77b08c Update svg-sanitize
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 08:02:54 +01:00
snipe
31e5c13b50 Merge remote-tracking branch 'origin/develop' 2025-07-28 03:30:22 +01:00
snipe
257d58c236 Moved privacy policy link in settings
Signed-off-by: snipe <snipe@snipe.net>
2025-07-28 03:30:10 +01:00
snipe
4a9fe4f981 Merge remote-tracking branch 'origin/develop' 2025-07-24 15:54:54 +01:00
snipe
015f3d936c Merge pull request #17459 from grokability/#17441-add-status-to-id
Fixed #17441 - hardware listings "remembered" page numbers between statuses
2025-07-24 15:54:33 +01:00
snipe
18d2a0ffd7 Fixed #17441 - added status to table IDs
Signed-off-by: snipe <snipe@snipe.net>
2025-07-24 15:47:26 +01:00
snipe
4fcc5587ee Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-07-24 15:36:06 +01:00
snipe
24afde0e46 Updated hash and minor version
Signed-off-by: snipe <snipe@snipe.net>
2025-07-24 15:35:33 +01:00
snipe
6ca49a20ce Merge remote-tracking branch 'origin/develop' 2025-07-24 15:29:54 +01:00
snipe
8499faa55a Fixed #17458 - use item_id instead of target_id for user history
Signed-off-by: snipe <snipe@snipe.net>
2025-07-24 15:29:36 +01:00
snipe
28f293fdc1 Merge remote-tracking branch 'origin/develop' 2025-07-24 13:07:09 +01:00
snipe
c60dd809b8 Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2025-07-24 13:06:57 +01:00
snipe
297b8e33f2 Merge pull request #17436 from Godmartinz/fix-acceptance-markdown
Fixed #17394 - Changes the acceptance letter salutation to target
2025-07-23 22:55:05 +01:00
spencerrlongg
d0593c6b8d remove some commented things 2025-07-23 16:19:32 -05:00
spencerrlongg
8a40d7e35c tests added, regex validation working 2025-07-23 16:12:19 -05:00
Godfrey M
b670b2014c accidentally removed a line 2025-07-23 09:56:19 -07:00
Godfrey M
440e969f52 remove unnecessary spacing 2025-07-23 09:47:03 -07:00
snipe
14b79f2f1c Fixed typo in id name
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 17:00:09 +01:00
snipe
b3e7619adc Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2025-07-23 16:11:20 +01:00
snipe
00cf49a61f Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 16:10:47 +01:00
snipe
4f534e0e84 Bumped version/hash
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 16:02:51 +01:00
snipe
6e56d56137 Merge remote-tracking branch 'origin/develop' 2025-07-23 15:06:25 +01:00
snipe
83a19fbbbf Merge pull request #17454 from uberbrady/de_flake_action_log_tests
Enforce order by ID for actionlog tests
2025-07-23 15:06:09 +01:00
snipe
610cb884fc Merge pull request #17452 from uberbrady/de_flake_tls_cert_file_test
This test was flaky, probably due to the PHP statcache.
2025-07-23 15:00:59 +01:00
snipe
2528f6a07b Merge remote-tracking branch 'origin/develop' 2025-07-23 14:56:49 +01:00
snipe
ba92cec62b Merge pull request #17453 from grokability/#17316-checkbox-format-on-checkin-checkout
Fixed #17316 - handle checkboxes correctly in checkin/checkout
2025-07-23 14:56:24 +01:00
Brady Wetherington
d92e961a52 enforce order by ID for actionlog tests 2025-07-23 14:55:42 +01:00
snipe
b13e74756a Fixed #17316 - handle checkboxes correctly in checkin/checkout
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 14:51:34 +01:00
Brady Wetherington
4ef3072766 This test was flaky, probably due to the PHP statcache. 2025-07-23 14:15:52 +01:00
snipe
423d07c919 Merge remote-tracking branch 'origin/develop' 2025-07-23 12:41:20 +01:00
snipe
e96e2461d3 Merge pull request #17450 from grokability/copy-decrypted-custom-fields-to-clipboard
Fixed #17447 - decrypt before copying to clipboard
2025-07-23 12:41:02 +01:00
snipe
7a2e2be169 Fixed #17447 - decrypt before copying to clipboard
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 12:39:54 +01:00
snipe
cc608de4bf Merge remote-tracking branch 'origin/develop' 2025-07-23 12:28:35 +01:00
snipe
8d2a5a7e4a Added location and defaultLoc to searchable relations in audit log
Signed-off-by: snipe <snipe@snipe.net>
2025-07-23 12:28:23 +01:00
snipe
b7b0e4fab5 Merge pull request #17447 from Godmartinz/make-custom-fields-copyable
Adds #17133 Copy ability to all Custom fields
2025-07-23 12:11:47 +01:00
Godfrey M
a624a79b30 add terenary 2025-07-22 16:36:19 -07:00
Godfrey M
313135da6f Merge branch 'develop' into make-custom-fields-copyable 2025-07-22 16:26:57 -07:00
Godfrey M
58d27d1247 move copy button to front 2025-07-22 16:17:52 -07:00
snipe
f999a68608 Merge remote-tracking branch 'origin/develop' 2025-07-22 20:28:53 +01:00
snipe
edfb28168f Merge pull request #17446 from marcusmoore/snipe-it-17445-move-jobtitle-under-assigned_to-in-assettransformer
Fixed #17445 - move jobtitle under assigned_to in AssetTransformer
2025-07-22 20:27:01 +01:00
Godfrey M
8d0e03bb06 fix copy target 2025-07-22 11:57:46 -07:00
Marcus Moore
855f6f77cf Re-add sorting 2025-07-22 11:49:32 -07:00
Godfrey M
6236cffe14 adds copy links for filled custom fields 2025-07-22 11:49:11 -07:00
Marcus Moore
322a71fbb8 Add jobtitleFormatter 2025-07-22 11:37:34 -07:00
Marcus Moore
4d9f8476f3 Update field key in AssetPresenter 2025-07-22 11:07:58 -07:00
Marcus Moore
d7d93b14b2 Move jobtitle under assigned_to 2025-07-22 11:02:26 -07:00
snipe
db78a9f18f Merge remote-tracking branch 'origin/develop' 2025-07-22 15:25:51 +01:00
snipe
d1af3ece6e One more tweak to login checkbox
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 15:25:09 +01:00
snipe
816039f48e Merge remote-tracking branch 'origin/develop' 2025-07-22 15:18:50 +01:00
snipe
8153b20984 Check for demo mode on UI for able to login
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 15:18:34 +01:00
snipe
ae240bae6d Updated prod CSS
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 15:14:42 +01:00
snipe
9e30c69e6d Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2025-07-22 15:14:32 +01:00
snipe
a50f605c29 Merge pull request #17443 from grokability/added-not-allowed-cursor
Adds disabled cursor on uneditable fields in user create/edit
2025-07-22 15:13:14 +01:00
snipe
daf23edd10 Adds disabled cursor on uneditable fields in user create/edit
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 15:10:27 +01:00
snipe
43c7de9049 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 14:38:04 +01:00
snipe
7e51c5db81 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2025-07-22 14:34:10 +01:00
snipe
2eaaeb8259 Merge pull request #17423 from grokability/tighter-permissions-on-non-admins
Tighter permissions on non-admins and demo modes
2025-07-22 14:32:50 +01:00
snipe
a02c62d62c Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 14:12:51 +01:00
snipe
e0232a8e84 Renamed gate
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 14:02:18 +01:00
snipe
6ea5693b2f Updated comment, removed log error statement
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 13:59:58 +01:00
snipe
0ee3c45e7b Merge remote-tracking branch 'origin/develop' 2025-07-22 13:39:54 +01:00
snipe
030c2114d1 Merge pull request #17442 from grokability/user-api-eula-fix
Fixed FD-49886 - Optimize user queries
2025-07-22 13:39:36 +01:00
snipe
2cb18e3668 Remove fields from query - eulas was querying actionlogs
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 13:25:41 +01:00
snipe
cd9f8be563 Optimize for when we already have the counts
Signed-off-by: snipe <snipe@snipe.net>
2025-07-22 13:25:16 +01:00
snipe
a02792e9bf Merge pull request #17300 from uberbrady/add_actionlog_tests
Fixed #17071 - Adding various tests of the contents of ActionLogs for lots of events
2025-07-22 10:51:30 +01:00
snipe
41bb422244 Merge pull request #17439 from marcusmoore/component-file-test-fix
Attempt to fix flaky file upload tests pt2
2025-07-21 23:16:03 +01:00
Marcus Moore
54663d3342 Pass order to api in test 2025-07-21 15:10:35 -07:00
snipe
2529f7369f Merge pull request #17438 from grokability/file-upload-tests-fix
Attempt to fix flaky file upload tests
2025-07-21 22:48:38 +01:00
snipe
909c33dccf Fixed order location
Signed-off-by: snipe <snipe@snipe.net>
2025-07-21 22:45:17 +01:00
snipe
1adc9f1aa9 Attempt to fix flaky tests
Signed-off-by: snipe <snipe@snipe.net>
2025-07-21 22:18:15 +01:00
spencerrlongg
e9948f0718 fixes booleans, adds note, changes name 2025-07-21 15:34:08 -05:00
Godfrey M
49da9e58fd changed markdown to point to assignedto name 2025-07-21 12:00:00 -07:00
spencerrlongg
2f74a8afe1 mac address rule working 2025-07-21 12:02:45 -05:00
snipe
f3e288d078 Updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2025-07-21 17:46:49 +01:00
snipe
988000952e Fixed RB-3997
Signed-off-by: snipe <snipe@snipe.net>
2025-07-21 13:48:01 +01:00
snipe
981e69929c Merge remote-tracking branch 'origin/develop' 2025-07-21 12:36:44 +01:00
snipe
6537f3794b Merge pull request #17292 from Godmartinz/fail_with_inputs
FIXED: #17194 Return to bulk edit with errors and inputs
2025-07-21 12:03:52 +01:00
snipe
d31718ba8a Merge pull request #17389 from grokability/use-transformer-for-api-asset-model-response
Use standard model transformer for asset model API response
2025-07-21 11:52:25 +01:00
snipe
9dd4bc5fa8 Merge pull request #17391 from Godmartinz/add-components-notifications
FIXED: #13844 Adds Webhook and Mail Notifications for Components
2025-07-21 11:51:30 +01:00
snipe
df5f1bd522 Merge pull request #17434 from grokability/dependabot/github_actions/develop/codacy/codacy-analysis-cli-action-4.4.7
Bump codacy/codacy-analysis-cli-action from 4.4.5 to 4.4.7
2025-07-21 11:45:04 +01:00
dependabot[bot]
ddffab9169 Bump codacy/codacy-analysis-cli-action from 4.4.5 to 4.4.7
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.4.5 to 4.4.7.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/v4.4.5...v4.4.7)

---
updated-dependencies:
- dependency-name: codacy/codacy-analysis-cli-action
  dependency-version: 4.4.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-21 09:26:25 +00:00
Oliver Cox
553ab8851a Fix #17431: EULA not displaying on asset acceptance page
Changed two instances of === to ==, as this was causing a comparison to fail and preventing EULAs from being displayed on asset acceptance pages as expected.
2025-07-20 23:00:18 +01:00
snipe
1eae5d12fc Merge remote-tracking branch 'origin/develop' 2025-07-18 17:56:20 +01:00
snipe
0c34073582 Namespace fix for presenter
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 17:17:04 +01:00
snipe
14674947cb Fixed test namespace
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 17:15:51 +01:00
snipe
51bccdbd66 Merge pull request #17424 from marcusmoore/chore/livewire-ugprade
Bumped livewire to v3.6.4
2025-07-18 17:12:14 +01:00
snipe
f0fbb3cf36 Uncomment permissions test
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:31:31 +01:00
Brady Wetherington
0cc47aacbe Got tests to pass by making them match our current reality, rather than wishes 2025-07-18 16:14:32 +01:00
snipe
fafd592290 Wrap groups and activated into the other canEditAuthFields gate
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:03:43 +01:00
snipe
40e754b8c3 Additional criteria for the canEditAuthFields gate
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:03:22 +01:00
snipe
483301db7a Changed some of the gating logic for demo mode. Sigh.
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:02:59 +01:00
snipe
218606fbd6 Updated view permissions
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:02:41 +01:00
snipe
c601b8e62c Updated test
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 16:02:11 +01:00
snipe
2bd68ec991 Uncommented importer gate
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 13:17:25 +01:00
snipe
66842648ed Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 13:17:10 +01:00
snipe
ce54b9a7b5 Removed duplicate alert
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 13:16:59 +01:00
Brady Wetherington
8a5f6d2a5d Refactor base test into Trait, clean test output for easier comparison 2025-07-18 13:16:35 +01:00
snipe
1d86a5476f Updated language
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 12:45:43 +01:00
snipe
ca4d3f6bce Changed gate name, removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2025-07-18 12:45:32 +01:00
Godfrey M
2812f2ce92 remove log 2025-07-17 15:04:42 -07:00
Godfrey M
5c623db798 fix redirect 2025-07-17 14:57:00 -07:00
Marcus Moore
edaf005fe1 Bump livewire to v3.6.4 2025-07-17 14:15:10 -07:00
snipe
4f6e407247 More consistent language degarding the demo
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 21:13:13 +01:00
snipe
e30881239c A few more clean ups for demo mode
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 21:08:50 +01:00
snipe
bbde2cc4b2 Use history blade component
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 21:04:11 +01:00
snipe
16d18c79d7 Fixed email editable field
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 21:03:20 +01:00
snipe
a0d2cb8a03 Clearer (if longer) gate name
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:47:20 +01:00
snipe
1bb5dc7e69 Added one more test
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:40:01 +01:00
Brady Wetherington
58759acfe4 Think I hit _all_ of the tests we need to mess with here 2025-07-17 20:15:01 +01:00
snipe
0cd5136052 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:12:52 +01:00
snipe
b3c6fe5369 Use both new gates in user edit
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:12:46 +01:00
snipe
599718f84e Use new gates in controllers
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:12:32 +01:00
snipe
d9a5452388 Defined new gates
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:12:10 +01:00
snipe
0fe49e04bf Attempt to use a gate here?
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:09:27 +01:00
snipe
a98d3fb4dc Check for the format of the permissions (string, object, array)
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:09:17 +01:00
Godfrey M
8c670d1832 clean up 2025-07-17 12:08:49 -07:00
snipe
c232f490bc Show user log
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:08:40 +01:00
snipe
c7280953dd Added/updated tests
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 20:08:32 +01:00
Godfrey M
8f4c606c64 remove var dumps 2025-07-17 12:04:33 -07:00
Godfrey M
6740afab42 radio buttons values return correctly 2025-07-17 11:59:09 -07:00
Godfrey M
5df22b3e6a checkboxes properly check 2025-07-17 11:56:52 -07:00
snipe
3d9d18a0d5 Fixed weird CSS quirk
Signed-off-by: snipe <snipe@snipe.net>
2025-07-17 19:22:23 +01:00
Marcus Moore
0102599708 Implement tests 2025-07-16 17:20:28 -07:00
Marcus Moore
960edd4adf Improve clarity 2025-07-16 17:11:00 -07:00
Marcus Moore
3547fa723c Delete requests when asset model is deleted 2025-07-16 17:04:14 -07:00
Marcus Moore
7a456185c6 Add explicit state for assets 2025-07-16 16:57:03 -07:00
Marcus Moore
dd79c3f2d6 Scaffold tests 2025-07-16 16:47:28 -07:00
Marcus Moore
35682d11f0 Add command to clean checkout requests 2025-07-16 14:49:45 -07:00
Marcus Moore
d04b3f0907 Enable test 2025-07-16 13:15:06 -07:00
Marcus Moore
c926358e04 Delete requests when user is deleted 2025-07-16 13:11:59 -07:00
Marcus Moore
856ba52f36 Delete requests when asset is deleted 2025-07-16 12:43:56 -07:00
Marcus Moore
a5bea31154 Scaffold tests 2025-07-16 12:38:08 -07:00
Marcus Moore
2afcc1e384 Add basic tests around asset request index 2025-07-16 12:25:37 -07:00
Godfrey M
fc469707a3 clean up 2025-07-16 10:51:33 -07:00
snipe
8863208333 Merge remote-tracking branch 'origin/develop' 2025-07-16 17:35:55 +01:00
snipe
77fdc370c7 Merge pull request #17415 from uberbrady/clean_unaccepted_assets_report
[FD-47386, FD-49095] New Artisan command to clean checkout acceptances
2025-07-16 17:34:49 +01:00
snipe
5f38a74a72 Merge remote-tracking branch 'origin/develop' 2025-07-16 17:02:29 +01:00
snipe
301290fb6d Send emails on acceptance even if signature is not required
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 17:02:04 +01:00
snipe
fe15dacb1f Merge remote-tracking branch 'origin/develop' 2025-07-16 16:54:30 +01:00
snipe
07fffe2f79 Merge pull request #17410 from grokability/remove-password-from-welcome
Remove password from welcome email, prompt for reset instead
2025-07-16 16:54:07 +01:00
snipe
0227a63fa5 Slightly clearer language
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:31:45 +01:00
snipe
27764b863c Updated language
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:25:36 +01:00
snipe
032fd75f9e Added default invite password token timeout
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:23:51 +01:00
snipe
0bf4f861f3 Nicer debugging
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:23:25 +01:00
snipe
fd8f90cb52 Added new password broker for longer toekn lifetime
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:23:11 +01:00
snipe
b6c6b025c8 Added expiry language
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:20:26 +01:00
snipe
3d89e98d1f Small tweaks to welcome email blade
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 16:20:15 +01:00
Brady Wetherington
7c5110ed5d Add more action logs tests everywhere I can think of it. 2025-07-16 16:20:06 +01:00
Brady Wetherington
0a474f48ad WIP: Adding various tests of the contents of ActionLogs for lots of events 2025-07-16 16:20:06 +01:00
Brady Wetherington
c409bfd5be New Artisan command to clean checkout acceptances and a migration that runs it 2025-07-16 16:06:23 +01:00
snipe
39d5d5b2e0 Merge branch 'develop' into remove-password-from-welcome 2025-07-16 15:05:13 +01:00
snipe
c2d44cf2f2 Merge remote-tracking branch 'origin/develop' 2025-07-16 12:25:14 +01:00
snipe
8a80d9009d Refomatted hidden array
Signed-off-by: snipe <snipe@snipe.net>
2025-07-16 12:24:48 +01:00
Godfrey M
f62b5df566 use ternaries instead of optionals 2025-07-15 15:40:21 -07:00
spencerrlongg
826521f053 added rules, still needs a little more... 2025-07-15 15:21:10 -05:00
spencerrlongg
f9b05bc8de more encryption rules extenting laravel's own 2025-07-15 15:03:51 -05:00
spencerrlongg
b8239e8ed9 use laravel validation methods, email works 2025-07-15 14:17:49 -05:00
Godfrey M
214757ab0b fix mailable 2025-07-15 12:04:36 -07:00
Godfrey M
f130186b37 add Component Checkin Mail 2025-07-15 11:56:34 -07:00
Godfrey M
2244eebc3b add Component Checkout Mail 2025-07-15 11:00:39 -07:00
snipe
4176792f2d Translate field
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 16:32:17 +01:00
snipe
1e6cef52c9 Fixed tests
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 15:17:08 +01:00
snipe
a0f4f30a50 Added try/catch
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 15:13:33 +01:00
snipe
4cbf6ac393 Re-add /setup crential email
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:20:13 +01:00
snipe
af7425d8e6 Remove unused variable
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:19:12 +01:00
snipe
3fea909d3f Removed send credentials option from user controller
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:14:10 +01:00
snipe
7c37d40677 Use plaintext in the database so that the password will never be valid
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:13:50 +01:00
snipe
3a97c27350 Removed logging
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:13:29 +01:00
snipe
e0516a52a8 Formatting change
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:12:55 +01:00
snipe
a85ec6efb3 Set token in welcome email constructor
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:12:42 +01:00
snipe
3795c74814 Added string
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:12:26 +01:00
snipe
27954dc6d3 Use password reset token
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:12:18 +01:00
snipe
68c4187a09 Removed email creds option from user create
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:11:15 +01:00
snipe
b9834231f3 Remove email credentials chexkbox
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 14:08:36 +01:00
snipe
2be343ea1c More specific no password
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 13:11:45 +01:00
snipe
109fe1b62c Use no password as temp password
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 13:11:18 +01:00
snipe
63d691a63c Removed noisy log
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 13:10:48 +01:00
snipe
7f1bdb6f34 Merge remote-tracking branch 'origin/develop' 2025-07-15 10:58:58 +01:00
snipe
6f57d6b876 Merge pull request #17407 from grokability/fixes-signature-pad-chrome
Fixed display of acceptance button if signature is not required
2025-07-15 10:58:34 +01:00
snipe
e0bad99ea1 Fixes display of acceptannce button if signature is not required
Signed-off-by: snipe <snipe@snipe.net>
2025-07-15 10:55:30 +01:00
spencerrlongg
7cdfaa93ec a couple more tests and cleanup 2025-07-10 16:45:15 -05:00
spencerrlongg
59ccc70303 bulk changes that should make this work 2025-07-10 16:02:39 -05:00
spencerrlongg
f1584b722d work on bulk tests, switching branches to check something 2025-07-10 15:29:42 -05:00
snipe
e39eb09cfb Merge pull request #17390 from Godmartinz/unhandled-redirect-error
FIXED redirect option being NULL
2025-07-10 19:41:40 +01:00
Godfrey M
64d397c3f3 add component notification tests 2025-07-10 11:26:10 -07:00
Godfrey M
465ac1d1e1 remove ternary 2025-07-10 08:39:13 -07:00
Godfrey M
18d6becebc populate other_redirect in store method 2025-07-10 08:36:15 -07:00
snipe
943a4093ad Use standard model transformer for asset model API response
Signed-off-by: snipe <snipe@snipe.net>
2025-07-10 15:42:39 +01:00
snipe
b0305e12d2 Merge remote-tracking branch 'origin/develop' 2025-07-10 13:11:10 +01:00
snipe
b0917a5131 Merge pull request #17385 from grokability/17383-fix-api-route-path
Fixed #17383 - re-add `/hardware/` as an object type in the file upload API
2025-07-10 13:10:43 +01:00
snipe
0972c4e340 Re-added /hardware/ as viable route for API file uploads
Signed-off-by: snipe <snipe@snipe.net>
2025-07-10 13:06:22 +01:00
spencerrlongg
4d8c5a86a4 routes added, tests scratched but need writing 2025-07-09 23:01:58 -05:00
Godfrey M
3bbd0fdbcd google notifications fires properly 2025-07-09 17:02:51 -07:00
snipe
43a237bf95 Merge pull request #17378 from grokability/phpcs/models
Code formatting fixes
2025-07-09 21:55:30 +01:00
snipe
95f867b267 Code formatting fixes
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 21:48:53 +01:00
snipe
58f76b5c99 Merge remote-tracking branch 'origin/develop' 2025-07-09 21:01:24 +01:00
snipe
e96daf469a Better phrasing
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 21:00:54 +01:00
snipe
7c4ee632cf Merge remote-tracking branch 'origin/develop' 2025-07-09 20:58:17 +01:00
snipe
f2cdfe9e47 Normalize textarea for notes in acceptance form
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 20:58:07 +01:00
snipe
b6b0f716eb Merge remote-tracking branch 'origin/develop' 2025-07-09 20:22:25 +01:00
snipe
929b67e768 Merge pull request #17376 from grokability/small-tweak-to-acceptance-ui
Better indicate via submit button colors and messaging that something is about to be accepted or declined
2025-07-09 20:21:50 +01:00
snipe
0573dc136a Put the sig check back
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 20:16:30 +01:00
snipe
48588f6a9e Small UI sugar on the acceptance/signature screen
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 20:08:19 +01:00
Godfrey M
8214b11da5 MS teams fires properly 2025-07-09 11:44:53 -07:00
Godfrey M
36090bf83e checked in notification fires, updated icon translation usage 2025-07-09 11:35:24 -07:00
Godfrey M
bffb2fe82f checkout notification fires 2025-07-09 11:23:27 -07:00
Godfrey M
500cbf5d92 add component checkout notification, update checkout blade, update listener 2025-07-09 11:12:18 -07:00
snipe
bd0e04ed15 Merge remote-tracking branch 'origin/develop' 2025-07-09 15:48:17 +01:00
snipe
88579b9bf3 Merge pull request #17374 from uberbrady/improve_inline_videos
Fixed [FD-49538 ] - use a Video tag for video files for non-Safari usage
2025-07-09 15:47:19 +01:00
snipe
8599981d44 Merge remote-tracking branch 'origin/develop' 2025-07-09 15:46:53 +01:00
snipe
e8bb9bde99 Fixed #8201 - splits first_name and last_name in user export
Signed-off-by: snipe <snipe@snipe.net>
2025-07-09 15:46:42 +01:00
Brady Wetherington
0ee3cca4da Use a Video tag for video files for non-Safari usage 2025-07-09 15:15:53 +01:00
snipe
6fc6e95c67 Merge remote-tracking branch 'origin/develop' 2025-07-08 22:02:34 +01:00
snipe
f89ee6b7f2 Merge pull request #17361 from Godmartinz/return-custom-textarea_input
Fixed #7957 - custom field Textarea input not retaining when switching Asset Models with shared fields
2025-07-08 22:02:07 +01:00
snipe
43b585bde8 Merge remote-tracking branch 'origin/develop' 2025-07-08 21:59:58 +01:00
snipe
aebfb52c85 Merge pull request #17362 from Godmartinz/license-redirect-bug
Fixed #17310 - 500 on redirect when checking in a license seat
2025-07-08 21:59:22 +01:00
Godfrey M
667bd7af0e fix checkout_to_type being null when checking in 2025-07-08 13:53:10 -07:00
Godfrey M
3fd9e3ab56 include textareas input return 2025-07-08 12:02:56 -07:00
spencerrlongg
5f835aa009 delete unused imports 2025-07-07 18:07:26 -05:00
spencerrlongg
d5ca543719 start introducing parent exception 2025-07-07 18:05:23 -05:00
Godfrey M
2b8ea9a233 add required to input validation 2025-07-07 10:46:54 -07:00
Godfrey M
c8b213c190 remove some changes, move error bag 2025-06-24 13:10:32 -07:00
Godfrey M
942de9dce5 got validation to redirect back to form and display 2025-06-24 12:42:07 -07:00
spencerrlongg
db63ad1cf4 add image check to supplier action 2025-06-17 18:13:37 -05:00
spencerrlongg
5da79cd5ca destroy manufacturer action, bulk manufacturer controller 2025-06-12 17:11:45 -05:00
spencerrlongg
13c971b171 some refinements, bulk categories controller 2025-06-12 15:19:49 -05:00
spencerrlongg
1cee7e43ed more (reusable) exceptions, a couple notes 2025-06-12 00:47:57 -05:00
spencerrlongg
5e81c63d6e some notes and things moved 2025-06-11 11:39:14 -05:00
spencerrlongg
17456482d6 category destroy action 2025-06-04 21:42:58 -05:00
spencerrlongg
a0431e1912 supplier actions working 2025-06-04 20:44:18 -05:00
spencerrlongg
ee5aac8008 supplier destroy action creaated and a lot scratched out 2025-06-03 20:25:07 -05:00
Marcus Moore
69b9b0bbc0 Allow setting id within location-select 2025-06-02 15:53:25 -07:00
Marcus Moore
3c1088f030 Improve variable name 2025-06-02 15:49:16 -07:00
spencerrlongg
1b397cd780 assertDbHas 2025-05-21 18:17:45 -05:00
spencerrlongg
120316bae0 wrong location import 2025-05-21 13:36:31 -05:00
spencerrlongg
7571ff007f add fillable properties to rules, some tests, move authorization to request 2025-05-21 12:51:21 -05:00
spencerrlongg
7afd7da2b4 initial work, more testing/tests needed 2025-05-21 11:44:54 -05:00
Godfrey M
b0067fee51 remove some N+1s, collect an array of missing serial errors 2025-05-20 12:31:34 -07:00
Godfrey M
732c3dae89 added require_serial to model factory 2025-05-20 09:53:51 -07:00
Godfrey M
d45bd67cae added corrections 2025-05-20 09:51:02 -07:00
Godfrey M
9200de5032 made require_serial column nullable 2025-05-19 09:58:37 -07:00
Godfrey M
3fbbff5a47 revert unnecessary change to laels 2025-05-14 12:57:01 -07:00
Godfrey M
c22efc2c3d add to present and transformer and api 2025-05-14 12:55:41 -07:00
Godfrey M
8c0281bf70 adds tests for requiring serial to asset model 2025-05-14 12:31:27 -07:00
Godfrey M
720a4bc4a2 add warning to update method for missing a serial 2025-05-13 12:54:28 -07:00
Godfrey M
7fd93645b3 valdiation fires for asset creation 2025-05-13 12:17:58 -07:00
Godfrey M
fcbfbca6d0 add checkbox to model edit and create 2025-05-13 11:10:46 -07:00
Godfrey M
f2bca9491c changed name of field in model fillable 2025-05-13 10:59:02 -07:00
Godfrey M
b48f309ab6 add require_serial to bulk asset model blades and lang 2025-05-13 10:58:05 -07:00
Godfrey M
0b1be3e63b add migration, model and controller update 2025-05-12 11:44:34 -07:00
Godfrey M
8c129c10af removed payload from api error message 2025-04-30 11:11:53 -07:00
Godfrey M
63ce2a14fe fix the ghosts pt2 2025-04-23 10:17:11 -07:00
Godfrey M
f435ebb110 fix the ghosts 2025-04-23 10:15:26 -07:00
Godfrey M
843f001bf6 rename test class 2025-04-23 09:33:56 -07:00
Godfrey M
0d28165c04 merged develop, fix conflicts 2025-04-21 10:54:01 -07:00
Godfrey M
ee31bfbcd4 Merge branch 'develop' into checkin_non_reassignable_license
# Conflicts:
#	app/Helpers/Helper.php
#	app/Http/Controllers/Api/LicenseSeatsController.php
#	app/Http/Transformers/LicensesTransformer.php
2025-04-21 10:49:35 -07:00
Godfrey M
1c67d6802d added testing to Api check in, renamed other test method 2025-01-27 12:18:24 -08:00
Godfrey M
5da8c86ec7 fix license query for bulk licenses checkin for assets 2025-01-22 10:55:41 -08:00
Godfrey Martinez
10a2d59ec1 Merge pull request #27 from Godmartinz/checkin_non_reassignable_license_cleanup
adds bulk check in of unreassinable licenses, cleans up methods used for counting.
2025-01-22 10:49:47 -08:00
Godfrey M
34e8360b10 moves counts to licenses, allows bulk check in of unreassignable licenses 2025-01-22 10:46:28 -08:00
Godfrey Martinez
ca259ee4c3 Merge pull request #26 from Godmartinz/checkin_non_reassignable_license_cleanup
moved methods to licenseSeat model, clean up code, removed unused namespaces etc
2025-01-21 11:47:42 -08:00
Godfrey M
2143952a1e removed unused models, castged unreassignable_seat, clean up in general 2025-01-21 11:43:47 -08:00
Godfrey M
6bab6e7151 remove unintended change 2025-01-16 12:27:01 -08:00
Godfrey M
d217c2e295 last rename 2025-01-16 12:24:32 -08:00
Godfrey M
52bf0faaa5 renamed unassignable to reassignable_seat 2025-01-16 12:19:59 -08:00
Godfrey M
3f3f2bfc61 fixed factory and test 2025-01-16 12:14:03 -08:00
Godfrey M
f050864fb4 renamed dead to unassigned, replaced 0 and 1 with true and flase 2025-01-16 12:12:14 -08:00
Godfrey M
db11fc35f4 fixed typo, fixed variable name 2025-01-16 12:00:49 -08:00
Godfrey M
f47a2b10c0 updated column name, updated Api license checkin and out 2025-01-16 11:53:15 -08:00
Godfrey M
344b4e7d60 fixes test to check if checked in licenses is unavailable 2025-01-16 09:46:03 -08:00
Godfrey M
7a23372489 adds migration for column unavailable, changes logic to utlize value 2025-01-15 15:36:12 -08:00
Godfrey M
9da15a8e58 get button color correct 2025-01-13 14:44:26 -08:00
Godfrey M
50e0e4a07b remove unrelated change 2025-01-13 14:37:03 -08:00
Godfrey M
5e1562ae4c adds count on tabs and reports and index 2025-01-13 14:31:54 -08:00
Godfrey M
8a0ed49623 allows checkin of unreassignable license seats 2025-01-13 13:35:48 -08:00
Matthias Mair
68dad1d3ae fixed wrong index reference in MoveUploadsToNewDisk.php
usage of undefined reference fixed
2023-08-22 20:39:21 +02:00
7664 changed files with 456429 additions and 365118 deletions

View File

@@ -3206,7 +3206,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/3755203?v=4",
"profile": "https://github.com/swift2512",
"contributions": [
"bug"
"bug",
"code"
]
},
{
@@ -4189,6 +4190,78 @@
"contributions": [
"code"
]
},
{
"login": "mckaygerhard",
"name": "Герхард PICCORO Lenz McKAY ",
"avatar_url": "https://avatars.githubusercontent.com/u/1571724?v=4",
"profile": "https://github-readme-stats.vercel.app/api?username=mckaygerhard",
"contributions": [
"code"
]
},
{
"login": "FlorestanII",
"name": "Johannes Pollitt",
"avatar_url": "https://avatars.githubusercontent.com/u/15015119?v=4",
"profile": "https://github.com/FlorestanII",
"contributions": [
"code"
]
},
{
"login": "strobelm",
"name": "Michael Strobel",
"avatar_url": "https://avatars.githubusercontent.com/u/14185442?v=4",
"profile": "https://strobelm.de",
"contributions": [
"code"
]
},
{
"login": "nickwest",
"name": "Nicky West",
"avatar_url": "https://avatars.githubusercontent.com/u/634790?v=4",
"profile": "http://nickwest.me",
"contributions": [
"code"
]
},
{
"login": "akaspeh1",
"name": "akaspeh1",
"avatar_url": "https://avatars.githubusercontent.com/u/1347327?v=4",
"profile": "https://github.com/akaspeh1",
"contributions": [
"code"
]
},
{
"login": "smarsching",
"name": "Sebastian Marsching",
"avatar_url": "https://avatars.githubusercontent.com/u/2880129?v=4",
"profile": "http://sebastian.marsching.com/",
"contributions": [
"code"
]
},
{
"login": "mohammad-ahmadi1",
"name": "Mo",
"avatar_url": "https://avatars.githubusercontent.com/u/40658372?v=4",
"profile": "https://github.com/mohammad-ahmadi1",
"contributions": [
"code"
]
},
{
"login": "MarvelousAnything",
"name": "Owen V. Hayes",
"avatar_url": "https://avatars.githubusercontent.com/u/20994684?v=4",
"profile": "https://github.com/MarvelousAnything",
"contributions": [
"code"
]
}
]
}

View File

@@ -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
# --------------------------------------------

View File

@@ -28,6 +28,7 @@ PUBLIC_FILESYSTEM_DISK=local_public
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=db
DB_SOCKET=null
DB_PORT='3306'
DB_DATABASE=snipeit
DB_USERNAME=snipeit
@@ -143,6 +144,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 +156,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
# --------------------------------------------
@@ -168,6 +173,7 @@ AWS_DEFAULT_REGION=null
LOGIN_MAX_ATTEMPTS=5
LOGIN_LOCKOUT_DURATION=60
RESET_PASSWORD_LINK_EXPIRES=900
INVITE_PASSWORD_LINK_EXPIRES=1500
# --------------------------------------------
# OPTIONAL: MISC

View File

@@ -24,6 +24,7 @@ PUBLIC_FILESYSTEM_DISK=local_public
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_SOCKET=null
DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
@@ -39,12 +40,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
# --------------------------------------------
@@ -142,6 +157,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
# --------------------------------------------
@@ -152,6 +169,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
# --------------------------------------------
@@ -174,6 +193,7 @@ LOGIN_AUTOCOMPLETE=false
RESET_PASSWORD_LINK_EXPIRES=15
PASSWORD_CONFIRM_TIMEOUT=10800
PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
INVITE_PASSWORD_LINK_EXPIRES=1500
# --------------------------------------------
# OPTIONAL: MISC
@@ -188,13 +208,20 @@ APP_ALLOW_INSECURE_HOSTS=false
GOOGLE_MAPS_API=
LDAP_MEM_LIM=500M
LDAP_TIME_LIM=600
BACKUP_TIME_LIMIT=600
IMPORT_TIME_LIMIT=600
IMPORT_MEMORY_LIMIT=500M
REPORT_TIME_LIMIT=12000
REQUIRE_SAML=false
API_THROTTLE_PER_MINUTE=120
CSV_ESCAPE_FORMULAS=true
LIVEWIRE_URL_PREFIX=null
MAX_UNPAGINATED=5000
# --------------------------------------------
# OPTIONAL: SAML SETTINGS
# --------------------------------------------
REQUIRE_SAML=false
SAML_KEY_SIZE=2048
# --------------------------------------------
# OPTIONAL: HASHING

163
.github/ISSUE_TEMPLATE/Bug-Report.yml vendored Normal file
View File

@@ -0,0 +1,163 @@
name: Bug Report
description: File a bug report.
title: "[Bug]: "
projects: ["grokability/snipe-it"]
type: bug
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Most issues are documented in the [Snipe-IT repository's issues](https://github.com/grokability/snipe-it/issues) or in the official [Common Issues section of the Documentation](https://snipe-it.readme.io/docs/common-issues#/) and are due to the following:
- `.env` misconfiguration
- [Server Permissions](https://snipe-it.readme.io/docs/debugging-permissions#/)
- [Database Migrations](https://snipe-it.readme.io/docs/database-issues#run-migrations)
Please make sure you've checked these resources before submitting a new issue. If you find an existing issue, please add your context to it instead of opening a new issue. If your issue is more of a question, consider [opening a new discussion](https://github.com/grokability/snipe-it/discussions) or [pop by our Discord](https://discord.gg/yZFtShAcKk) instead of creating an issue.
**Please write your bug report in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
- type: input
id: version
attributes:
label: Snipe-IT Version
description: What version of Snipe-IT are you seeing this issue on? You can find the version number in the footer of any page in Snipe-IT.
placeholder: ex. v8.3.2 - build 19577 (master)
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP Version
description: What version of PHP are you running? You can find the version of PHP your webserver is running in the `Admin Settings` section in the footer, and the cli version by running `php -v` via command line .
placeholder: ex. v8.3.1 (web), PHP 8.4.12 (cli)
validations:
required: true
- type: input
id: composer-version
attributes:
label: Composer Version
description: What version of composer are you running? You can find the version number by running `composer --version`.
placeholder: ex. 2.8.10
validations:
required: true
- type: input
id: db-version
attributes:
label: MySQL/MariaDB version
description: What database are you using, and what version?
placeholder: ex. MySQL 5.7
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: How did you install Snipe-IT?
options:
- Git install
- Manual install (downloading zip/tar.gz)
- Docker
- install.sh
- Hosted by Grokability
- Other
- Not sure
validations:
required: true
- type: dropdown
id: upgrade-or-fresh
attributes:
label: Is this a fresh install or an upgrade?
options:
- Fresh install
- Upgrade
- NA
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see! (Be nice!)
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Other
- type: dropdown
id: on-demo
attributes:
label: Can you reproduce this on the public demo?
description: You can check this at https://demo.snipeitapp.com.
options:
- 'Yes'
- 'No'
- N/A
validations:
required: true
- type: dropdown
id: fmcs
attributes:
label: Do you have full multiple company support enabled?
description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`.
options:
- 'Yes'
- 'No'
validations:
required: true
- type: dropdown
id: fmcs-location
attributes:
label: If you have full multiple company support enabled, do you have location scoping to company enabled?
description: You can check this in your Snipe-IT installation at `Admin Settings > General Settings > Scoping`.
options:
- 'Yes'
- 'No'
- I do not have full multiple company support enabled
validations:
required: true
- type: textarea
id: server-logs
attributes:
label: Application log output
description: Please copy and paste any relevant log output from `storage/logs/laravel.log`. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
id: browser-logs
attributes:
label: Browser console output
description: Please copy and paste any relevant log output from your browser console. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: checkboxes
id: common-issues
attributes:
label: Common Issues
description: Please make sure you have done the following before submitting your issue.
options:
- label: I have searched this repo for existing issues related to my issue (including closed issues)
required: true
- label: My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
required: true
- label: I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
required: true
- label: I have run database migrations (where applicable).
required: true
- label: I have attached screenshots and/or videos of the issue (where applicable)
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -0,0 +1,38 @@
name: Feature Request
description: Request a new feature.
title: "[Feature]: "
projects: ["grokability/snipe-it"]
type: feature
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request! Please make sure to search the existing issues in this repository to see if your feature has already been requested, and feel free to add your context to any existing requests.
**Please write your issue in English.** You can use tools like [DeepL](https://www.deepl.com) or [Google Translate](https://translate.google.com/) to translate if necessary.
**If you choose to upload screenshots or videos (which we always encourage), please make sure they do not contain any sensitive information.**
- type: input
id: version
attributes:
label: Snipe-IT Version
description: What version of Snipe-IT are you currently running? You can find the version number in the footer of any page in Snipe-IT.
placeholder: ex. v8.3.1 - build 19577 (master)
validations:
required: true
- type: textarea
id: feature-description
attributes:
label: How can we help?
description: Let us know in detail what feature you'd like to see added. While we can't promise to implement every feature request, we do read every one and take them into consideration when planning future releases.
placeholder: Tell us what you'd like to see in Snipe-IT! (Be nice!)
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/grokability/snipe-it/blob/master/CODE_OF_CONDUCT.md).
options:
- label: I agree to follow this project's Code of Conduct
required: true

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
.github/copilot-instructions.md vendored Normal file
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

View File

@@ -26,14 +26,14 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4

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@v4
# 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.5
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@v3
with:
sarif_file: results.sarif

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Crowdin push
uses: crowdin/github-action@v2

View File

@@ -42,17 +42,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v4
uses: actions/checkout@v6
# 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

View File

@@ -42,17 +42,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v4
uses: actions/checkout@v6
# 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

View File

@@ -11,7 +11,7 @@ jobs:
dockerHubDescription:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Docker Hub Description
uses: grokability/dockerhub-description@7ea9d275c7cdbe2b676a093a0308c50665e3b8b4

View File

@@ -11,7 +11,7 @@ jobs:
issues: write
# pull-requests: write
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
with:
debug-only: true
ascending: true

View File

@@ -37,13 +37,13 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get Composer Cache Directory
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') }}
@@ -76,4 +76,16 @@ jobs:
DB_DATABASE: snipeit
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

View File

@@ -34,13 +34,13 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get Composer Cache Directory
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') }}
@@ -75,4 +75,16 @@ jobs:
DB_PORT: ${{ job.services.postgresql.ports[5432] }}
DB_USERNAME: snipeit
DB_PASSWORD: password
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

View File

@@ -25,13 +25,13 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: none
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get Composer Cache Directory
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') }}
@@ -61,4 +61,16 @@ jobs:
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
LOG_CHANNEL: single
LOG_LEVEL: debug
run: php artisan test
- name: Upload Laravel logs as artifacts
if: always()
uses: actions/upload-artifact@v7
with:
name: laravel-logs-php-${{ matrix.php-version }}-run-${{ github.run_attempt }}
path: |
storage/logs/*.log
if-no-files-found: ignore
retention-days: 7

View File

@@ -52,7 +52,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/2565989?v=4" width="110px;"/><br /><sub>coach1988</sub>](https://github.com/coach1988)<br />[💻](https://github.com/snipe/snipe-it/commits?author=coach1988 "Code") | [<img src="https://avatars.githubusercontent.com/u/11910225?v=4" width="110px;"/><br /><sub>MrM</sub>](https://github.com/mauro-miatello)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mauro-miatello "Code") | [<img src="https://avatars.githubusercontent.com/u/60405354?v=4" width="110px;"/><br /><sub>koiakoia</sub>](https://github.com/koiakoia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=koiakoia "Code") | [<img src="https://avatars.githubusercontent.com/u/5323832?v=4" width="110px;"/><br /><sub>Mustafa Online</sub>](https://github.com/mustafa-online)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mustafa-online "Code") | [<img src="https://avatars.githubusercontent.com/u/104601439?v=4" width="110px;"/><br /><sub>franceslui</sub>](https://github.com/franceslui)<br />[💻](https://github.com/snipe/snipe-it/commits?author=franceslui "Code") | [<img src="https://avatars.githubusercontent.com/u/125313163?v=4" width="110px;"/><br /><sub>Q4kK</sub>](https://github.com/Q4kK)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Q4kK "Code") | [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") | [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") |
| [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") | [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") [💻](https://github.com/snipe/snipe-it/commits?author=swift2512 "Code") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") | [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") |
| [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") | [<img src="https://avatars.githubusercontent.com/u/28693782?v=4" width="110px;"/><br /><sub>Nathan Taylor</sub>](https://github.com/ntaylor-86)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntaylor-86 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/16699443?v=4" width="110px;"/><br /><sub>fvollmer</sub>](https://github.com/fvollmer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fvollmer "Code") | [<img src="https://avatars.githubusercontent.com/u/109086466?v=4" width="110px;"/><br /><sub>36864</sub>](https://github.com/36864)<br />[💻](https://github.com/snipe/snipe-it/commits?author=36864 "Code") | [<img src="https://avatars.githubusercontent.com/u/365751?v=4" width="110px;"/><br /><sub>Daniel O'Connor</sub>](http://clockwerx.blogspot.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=CloCkWeRX "Code") | [<img src="https://avatars.githubusercontent.com/u/102852568?v=4" width="110px;"/><br /><sub>BeatSpark</sub>](https://github.com/BeatSpark)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BeatSpark "Code") | [<img src="https://avatars.githubusercontent.com/u/59203607?v=4" width="110px;"/><br /><sub>mrdahbi</sub>](https://github.com/mrdahbi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mrdahbi "Code") | [<img src="https://avatars.githubusercontent.com/u/6661332?v=4" width="110px;"/><br /><sub>Fabian Schmid</sub>](http://sr.solutions)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chfsx "Code") | [<img src="https://avatars.githubusercontent.com/u/1288116?v=4" width="110px;"/><br /><sub>Chris Olin</sub>](https://www.chrisolin.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=realchrisolin "Code") |
| [<img src="https://avatars.githubusercontent.com/u/3803132?v=4" width="110px;"/><br /><sub>Dan</sub>](https://github.com/mnemonicly)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mnemonicly "Code") | [<img src="https://avatars.githubusercontent.com/u/43917728?v=4" width="110px;"/><br /><sub>Nebel</sub>](https://github.com/NebelKreis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NebelKreis "Code") | [<img src="https://avatars.githubusercontent.com/u/132433803?v=4" width="110px;"/><br /><sub>test1337ahp</sub>](https://github.com/test1337ahp)<br />[💻](https://github.com/snipe/snipe-it/commits?author=test1337ahp "Code") | [<img src="https://avatars.githubusercontent.com/u/1916566?v=4" width="110px;"/><br /><sub>Jonathon Reinhart</sub>](https://github.com/JonathonReinhart)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JonathonReinhart "Code") | [<img src="https://avatars.githubusercontent.com/u/484742?v=4" width="110px;"/><br /><sub>aranar-pro</sub>](https://github.com/aranar-pro)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aranar-pro "Code") | [<img src="https://avatars.githubusercontent.com/u/27019397?v=4" width="110px;"/><br /><sub>Phil</sub>](https://github.com/phil-flip)<br />[💻](https://github.com/snipe/snipe-it/commits?author=phil-flip "Code") | [<img src="https://avatars.githubusercontent.com/u/6473460?v=4" width="110px;"/><br /><sub>Steffy Fort</sub>](https://fe80.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fe80 "Code") |
@@ -68,6 +68,8 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/181059?v=4" width="110px;"/><br /><sub>Juan Font</sub>](https://github.com/juanfont)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juanfont "Code") | [<img src="https://avatars.githubusercontent.com/u/13137708?v=4" width="110px;"/><br /><sub>Juho Taipale</sub>](https://github.com/juhotaipale)<br />[💻](https://github.com/snipe/snipe-it/commits?author=juhotaipale "Code") | [<img src="https://avatars.githubusercontent.com/u/1007419?v=4" width="110px;"/><br /><sub>Korvin Szanto</sub>](https://github.com/KorvinSzanto)<br />[💻](https://github.com/snipe/snipe-it/commits?author=KorvinSzanto "Code") | [<img src="https://avatars.githubusercontent.com/u/8513053?v=4" width="110px;"/><br /><sub>Lewis Foster</sub>](https://lewisfoster.foo/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sniff122 "Code") | [<img src="https://avatars.githubusercontent.com/u/33877541?v=4" width="110px;"/><br /><sub>Logan Swartzendruber</sub>](https://github.com/loganswartz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=loganswartz "Code") | [<img src="https://avatars.githubusercontent.com/u/1156208?v=4" width="110px;"/><br /><sub>Lorenzo P.</sub>](https://github.com/lopezio)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lopezio "Code") | [<img src="https://avatars.githubusercontent.com/u/33946590?v=4" width="110px;"/><br /><sub>Lukas Jung</sub>](https://github.com/m4us1ne)<br />[💻](https://github.com/snipe/snipe-it/commits?author=m4us1ne "Code") |
| [<img src="https://avatars.githubusercontent.com/u/10965027?v=4" width="110px;"/><br /><sub>Ellie</sub>](https://leafedfox.xyz/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeafedFox "Code") | [<img src="https://avatars.githubusercontent.com/u/20960555?v=4" width="110px;"/><br /><sub>GA Stamper</sub>](https://github.com/gastamper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gastamper "Code") | [<img src="https://avatars.githubusercontent.com/u/206553556?v=4" width="110px;"/><br /><sub>Guillaume Lefranc</sub>](https://github.com/gl-pup)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gl-pup "Code") | [<img src="https://avatars.githubusercontent.com/u/733892?v=4" width="110px;"/><br /><sub>Hajo Möller</sub>](https://github.com/dasjoe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dasjoe "Code") | [<img src="https://avatars.githubusercontent.com/u/3420063?v=4" width="110px;"/><br /><sub>Istvan Basa</sub>](https://github.com/pottom)<br />[💻](https://github.com/snipe/snipe-it/commits?author=pottom "Code") | [<img src="https://avatars.githubusercontent.com/u/810824?v=4" width="110px;"/><br /><sub>JJ Asghar</sub>](https://jjasghar.github.io/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jjasghar "Code") | [<img src="https://avatars.githubusercontent.com/u/40404495?v=4" width="110px;"/><br /><sub>James E. Msenga</sub>](https://github.com/JemCdo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JemCdo "Code") |
| [<img src="https://avatars.githubusercontent.com/u/6865786?v=4" width="110px;"/><br /><sub>Jan Felix Wiebe</sub>](https://github.com/jfwiebe)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jfwiebe "Code") | [<img src="https://avatars.githubusercontent.com/u/43412008?v=4" width="110px;"/><br /><sub>Jo Drexl</sub>](https://www.nfon.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=drexljo "Code") | [<img src="https://avatars.githubusercontent.com/u/4807843?v=4" width="110px;"/><br /><sub>Austin Sasko</sub>](https://github.com/austinsasko)<br />[💻](https://github.com/snipe/snipe-it/commits?author=austinsasko "Code") | [<img src="https://avatars.githubusercontent.com/u/4875039?v=4" width="110px;"/><br /><sub>Jasson</sub>](http://jassoncordones.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=JassonCordones "Code") | [<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") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

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

View File

@@ -1,6 +1,6 @@
![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/) [![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 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
@@ -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.
@@ -121,7 +124,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 )

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Actions\Categories;
use App\Exceptions\ItemStillHasAccessories;
use App\Exceptions\ItemStillHasAssetModels;
use App\Exceptions\ItemStillHasAssets;
use App\Exceptions\ItemStillHasComponents;
use App\Exceptions\ItemStillHasConsumables;
use App\Exceptions\ItemStillHasLicenses;
use App\Models\Category;
use Illuminate\Support\Facades\Storage;
class DestroyCategoryAction
{
/**
* @throws ItemStillHasAssets
* @throws ItemStillHasAssetModels
* @throws ItemStillHasComponents
* @throws ItemStillHasAccessories
* @throws ItemStillHasLicenses
* @throws ItemStillHasConsumables
*/
public static function run(Category $category): bool
{
$category->loadCount([
'assets as assets_count',
'accessories as accessories_count',
'consumables as consumables_count',
'components as components_count',
'licenses as licenses_count',
'models as models_count',
]);
if ($category->assets_count > 0) {
throw new ItemStillHasAssets($category);
}
if ($category->accessories_count > 0) {
throw new ItemStillHasAccessories($category);
}
if ($category->consumables_count > 0) {
throw new ItemStillHasConsumables($category);
}
if ($category->components_count > 0) {
throw new ItemStillHasComponents($category);
}
if ($category->licenses_count > 0) {
throw new ItemStillHasLicenses($category);
}
if ($category->models_count > 0) {
throw new ItemStillHasAssetModels($category);
}
Storage::disk('public')->delete('categories'.'/'.$category->image);
$category->delete();
return true;
}
}

View File

@@ -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;
}
}
}

View File

@@ -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');
@@ -51,4 +51,4 @@ class CreateCheckoutRequestAction
return true;
}
}
}

View File

@@ -0,0 +1,62 @@
<?php
namespace App\Actions\Manufacturers;
use App\Exceptions\ItemStillHasAccessories;
use App\Exceptions\ItemStillHasAssets;
use App\Exceptions\ItemStillHasComponents;
use App\Exceptions\ItemStillHasConsumables;
use App\Exceptions\ItemStillHasLicenses;
use App\Models\Manufacturer;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
class DeleteManufacturerAction
{
/**
* @throws ItemStillHasAssets
* @throws ItemStillHasComponents
* @throws ItemStillHasAccessories
* @throws ItemStillHasLicenses
* @throws ItemStillHasConsumables
*/
public static function run(Manufacturer $manufacturer): bool
{
$manufacturer->loadCount([
'assets as assets_count',
'accessories as accessories_count',
'consumables as consumables_count',
'components as components_count',
'licenses as licenses_count',
]);
if ($manufacturer->assets_count > 0) {
throw new ItemStillHasAssets($manufacturer);
}
if ($manufacturer->accessories_count > 0) {
throw new ItemStillHasAccessories($manufacturer);
}
if ($manufacturer->consumables_count > 0) {
throw new ItemStillHasConsumables($manufacturer);
}
if ($manufacturer->components_count > 0) {
throw new ItemStillHasComponents($manufacturer);
}
if ($manufacturer->licenses_count > 0) {
throw new ItemStillHasLicenses($manufacturer);
}
if ($manufacturer->image) {
try {
Storage::disk('public')->delete('manufacturers/'.$manufacturer->image);
} catch (\Exception $e) {
Log::info($e);
}
}
$manufacturer->delete();
// dd($manufacturer);
return true;
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace App\Actions\Suppliers;
use App\Exceptions\ItemStillHasAccessories;
use App\Exceptions\ItemStillHasAssets;
use App\Exceptions\ItemStillHasComponents;
use App\Exceptions\ItemStillHasConsumables;
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
* @throws ItemStillHasAccessories
* @throws ItemStillHasConsumables
* @throws ItemStillHasComponents
*/
public static function run(Supplier $supplier): bool
{
$supplier->loadCount([
'maintenances as maintenances_count',
'assets as assets_count',
'licenses as licenses_count',
'accessories as accessories_count',
'consumables as consumables_count',
'components as components_count',
]);
if ($supplier->assets_count > 0) {
throw new ItemStillHasAssets($supplier);
}
if ($supplier->maintenances_count > 0) {
throw new ItemStillHasMaintenances($supplier);
}
if ($supplier->licenses_count > 0) {
throw new ItemStillHasLicenses($supplier);
}
if ($supplier->accessories_count > 0) {
throw new ItemStillHasAccessories($supplier);
}
if ($supplier->consumables_count > 0) {
throw new ItemStillHasConsumables($supplier);
}
if ($supplier->components_count > 0) {
throw new ItemStillHasComponents($supplier);
}
if ($supplier->image) {
try {
Storage::disk('public')->delete('suppliers/'.$supplier->image);
} catch (\Exception $e) {
Log::info($e->getMessage());
}
}
$supplier->delete();
return true;
}
}

View File

@@ -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
{

View File

@@ -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;
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Console\Commands;
use App\Models\CheckoutAcceptance;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Console\Command;
class CleanIncorrectCheckoutAcceptances extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:clean-checkout-acceptances';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Delete checkout acceptances for checkouts to non-users';
/**
* Execute the console command.
*/
public function handle()
{
$deletions = 0;
$skips = 0;
// 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
// 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");
}
} else {
// $this->info("No match! checkout to id: " . $checkout_to_id." target_id: ".$assetlog->target_id." target_type: ".$assetlog->target_type);
}
}
$skips++;
});
$this->error("Final deletion count: $deletions, and skip count: $skips");
}
}

View File

@@ -0,0 +1,77 @@
<?php
namespace App\Console\Commands;
use App\Models\CheckoutRequest;
use Illuminate\Console\Command;
class CleanOldCheckoutRequests extends Command
{
private int $deletions = 0;
private int $skips = 0;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:clean-old-checkout-requests';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Removes checkout requests that reference deleted assets or users.';
/**
* Execute the console command.
*/
public function handle()
{
$requests = CheckoutRequest::with([
'user' => function ($query) {
$query->withTrashed();
},
'requestedItem' => function ($query) {
$query->withTrashed();
},
])->get();
$this->info("Processing {$requests->count()} checkout requests");
$this->withProgressBar($requests, function ($request) {
if ($this->shouldForceDelete($request)) {
$request->forceDelete();
$this->deletions++;
return;
}
if ($this->shouldSoftDelete($request)) {
$request->delete();
$this->deletions++;
return;
}
$this->skips++;
});
$this->info("Final deletion count: $this->deletions, and skip count: $this->skips");
return 0;
}
private function shouldForceDelete(CheckoutRequest $request)
{
// check if the requestable or user relationship is null
return ! $request->requestable || ! $request->user;
}
private function shouldSoftDelete(CheckoutRequest $request)
{
return $request->requestable->trashed() || $request->user->trashed();
}
}

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 {

View File

@@ -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')

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 = [];

View File

@@ -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);
}
}
}

View File

@@ -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');
}
}

View File

@@ -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');
}
}

View File

@@ -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.');
}
}
}

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

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!');
}
}

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
@@ -47,27 +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,
"jobtitle" => Setting::getSettings()->ldap_jobtitle,
"country" => Setting::getSettings()->ldap_country,
"location" => Setting::getSettings()->ldap_location,
"dept" => Setting::getSettings()->ldap_dept,
"manager" => Setting::getSettings()->ldap_manager,
'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;
@@ -93,13 +100,13 @@ class LdapSync extends Command
/**
* 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.'\".');
}
}
}
/**
@@ -145,21 +152,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.');
}
@@ -200,17 +207,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]);
}
}
@@ -224,35 +231,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['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['jobtitle'] = $results[$i][$ldap_map["jobtitle"]][0] ?? '';
$item['country'] = $results[$i][$ldap_map["country"]][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'],
]);
@@ -274,40 +287,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["last_name"] != null){
if ($ldap_map['display_name'] != null) {
$user->display_name = $item['display_name'];
}
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["jobtitle"] != null){
if ($ldap_map['mobile'] != null) {
$user->mobile = $item['mobile'];
}
if ($ldap_map['jobtitle'] != null) {
$user->jobtitle = $item['jobtitle'];
}
if($ldap_map["country"] != null){
if ($ldap_map['address'] != null) {
$user->address = $item['address'];
}
if ($ldap_map['city'] != null) {
$user->city = $item['city'];
}
if ($ldap_map['state'] != null) {
$user->state = $item['state'];
}
if ($ldap_map['country'] != null) {
$user->country = $item['country'];
}
if($ldap_map["dept"] != null){
if ($ldap_map['zip'] != null) {
$user->zip = $item['zip'];
}
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
@@ -317,23 +348,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();
@@ -344,11 +375,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'
}
}
@@ -356,18 +387,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
}
@@ -375,7 +406,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
@@ -401,7 +431,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,
@@ -412,14 +442,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?
@@ -431,16 +460,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;

View File

@@ -2,28 +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;
/**
* 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
@@ -32,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.')';
}
}
@@ -73,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;
@@ -121,6 +128,7 @@ class LdapTroubleshooter extends Command
}
$cleaned[$i] = $clean_row;
}
return $cleaned;
}
@@ -131,56 +139,81 @@ 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[] = "-w ".escapeshellarg(Crypt::Decrypt($settings->ldap_pword));
$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.');
exit(0);
}
$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);
}
if(!$this->option('force')) {
// PHP Version check for warning
$php_version = phpversion();
[$major, $minor, $patch] = explode('.', $php_version);
if (
$major < 8 ||
($major == 8 && $minor < 3) ||
($major == 8 && $minor == 3 && $patch < 21) ||
($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');
exit(-1);
}
}
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->info("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)");
}
@@ -188,328 +221,428 @@ 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']);
}
$this->info("Performing DNS lookup of: ".$parsed['host']);
$ips = dns_get_record($parsed['host']);
$raw_ips = [];
//$this->info("Host IP is: ".print_r($ips,true));
if (inet_pton($parsed['host']) !== false) {
$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']);
$ips = dns_get_record($parsed['host']);
if(!$ips || count($ips) == 0) {
$this->error("ERROR: DNS lookup of host: ".$parsed['host']." has failed. ABORTING.");
exit(-1);
// $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.');
exit(-1);
}
$this->debugout("IP's? ".print_r($ips, true));
foreach ($ips as $ip) {
if (! isset($ip['ip'])) {
continue;
}
$raw_ips[] = $ip['ip'];
}
}
$this->debugout("IP's? ".print_r($ips,true));
foreach($ips as $ip) {
if(!isset($ip['ip'])) {
continue;
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');
}
$raw_ips[]=$ip['ip'];
if($ip['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['ip'],'10.0.0.0/8') || ip_in_range($ip['ip'],'192.168.0.0/16') || ip_in_range($ip['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");
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->info("STAGE 2: Checking basic network connectivity");
$ports = [389,636];
if(@$parsed['port'] && !in_array($parsed['port'],$ports)) {
$this->line('STAGE 2: Checking basic network connectivity');
$ports = [636, 389];
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->info("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->info("STAGE 3: Determine encryption algorithm, if any");
$this->line('STAGE 3: Determine encryption algorithm, if any');
$ldap_urls = [];
$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, "YES", "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)) {
$this->info("Anonymous bind succesful to $ldap_url with certifcate-checks disabled");
$ldap_urls[] = [ $ldap_url, false, false ];
$pretty_ldap_urls[] = [ $ldap_url, "no", "no" ];
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)'];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with certificate checks disabled. Trying unencrypted with STARTTLS");
}
$ldap_url = "ldap://".$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url, true, true)) {
// now switching to ldap:// URL's from ldaps://
$ldap_url = 'ldap://'.$parsed['host'].":$port";
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, "YES", "YES" ];
$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 STARTTLS");
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled. Trying without certificate checks.");
}
if($this->test_anonymous_bind($ldap_url)) {
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'];
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)) {
$this->info("Plain connection to $ldap_url succesful!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "no" ];
$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 ) {
$this->info("Found working LDAP URL's: ");
foreach($ldap_urls as $ldap_url) { // TODO maybe do this as a $this->table() instead?
$this->info("LDAP URL: ".$ldap_url[0]);
$this->info($ldap_url[0]. ($ldap_url[1] ? " certificate checks enabled" : " certificate checks disabled"). ($ldap_url[2] ? " STARTTLS Enabled ": " STARTTLS Disabled"));
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'));
}
$this->table(["URL", "Cert Checks Enabled?", "STARTTLS Enabled?"],$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->info("STAGE 4: Test Administrative Bind for LDAP Sync");
foreach($ldap_urls AS $ldap_url) {
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, Crypt::decrypt($settings->ldap_pword));
$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.');
exit(0);
}
$this->test_authed_bind($ldap_url[0], $ldap_url[1], $ldap_url[2], $settings->ldap_uname, $w);
}
$this->info("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) {
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,Crypt::decrypt($settings->ldap_pword),$settings)) {
$this->info("Success getting informational bind!");
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.');
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!');
} else {
$this->error("Unable to get information from bind.");
$this->error('Unable to get information from bind.');
}
}
$this->info("STAGE 6: Test LDAP Login to Snipe-IT");
foreach($ldap_urls AS $ldap_url) {
$this->info("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");
$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?
$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);
} else {
$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');
Ldap::ignoreCertificates(false);
} else {
$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(!$check_cert) {
putenv('LDAPTLS_REQCERT=never'); // This is horrible; is this *really* the only way to do it?
} else {
putenv('LDAPTLS_REQCERT'); // have to very explicitly and manually *UN* set the env var here to ensure it works
}
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->info("gonna try 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->info("Bind results are: ".$bind_results." which translate into boolean: ".(bool)$bind_results);
return (bool)$bind_results;
$this->line('Bind results are: '.$bind_results.' which translate into boolean: '.(bool) $bind_results);
ldap_close($lconn);
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);
if(!$bind_results) {
ldap_close($lconn);
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");
$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));
//okay, great - now how do we display those results? I have no idea.
// I don't see why this throws an Exception for Google LDAP, but I guess we ought to try and catch it?
$this->comment("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));
$search_results = ldap_search($conn, $settings->ldap_basedn, parenthesized_filter($settings->ldap_filter));
$this->info("Printing first 10 results: ");
for($i=0;$i<10;$i++) {
$this->info($search_results[$i]);
$cleaned_results = [];
try {
// This _may_ only work for Active Directory?
$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));
$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->error("Unable to get base naming contexts - here's what we *did* get:");
$this->line(print_r($cleaned_results, true));
}
} catch (\Exception $e) {
// 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));
$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: ');
$pretty_data = array_slice($this->ldap_results_cleaner($entries), 0, 10);
// print_r($data);
$headers = [];
foreach ($pretty_data as $row) {
// populate headers
foreach ($row as $key => $value) {
// skip objectsid and objectguid because it junks up output
if ($key == 'objectsid' || $key == 'objectguid') {
continue;
}
if (! in_array($key, $headers)) {
$headers[] = $key;
}
}
}
$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]).']';
} else {
$newrow[] = @$row[$header];
}
}
$table[] = $newrow;
}
$this->table($headers, $table);
} catch (Exception $e) {
$this->error("WARNING: Exception caught during Authed bind to $username - ".$e->getMessage());
return false;
} finally {
ldap_close($conn);
}
});
}
/***********************************************
*
* 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->info('WARNING: Unable to execute POSIX fork() commands, timeout may not be respected');
$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.
}
}

View File

@@ -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));
}
}
}

View File

@@ -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;
}
}

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/assetmodels'."/*.*");
$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.');
}
}
}

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();
}
}
}

View File

@@ -3,13 +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;
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
/**
* Class ObjectImportCommand
@@ -35,6 +32,11 @@ class ObjectImportCommand extends Command
*/
protected ProgressIndicator $progressIndicator;
/**
* Logger instance with configurable log path
*/
protected $logger;
/**
* Create a new command instance.
*
@@ -52,21 +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('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();
@@ -91,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);
}
@@ -112,7 +121,9 @@ class ObjectImportCommand extends Command
* Get the console command arguments.
*
* @author Daniel Melzter
*
* @since 3.0
*
* @return array
*/
protected function getArguments()
@@ -126,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.'],
];
}
}

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);
}
@@ -59,6 +58,9 @@ class PaveIt extends Command
'migrations',
'settings',
'users',
'telescope_entries',
'telescope_entries_tags',
'telescope_monitoring',
];
// We only need to find out what these are so we can nuke these columns on the assets table.
@@ -76,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');
}
}
}

View File

@@ -62,19 +62,19 @@ class Purge extends Command
$assetcount = $assets->count();
$this->info($assets->count().' assets purged.');
$asset_assoc = 0;
$asset_maintenances = 0;
$maintenances = 0;
foreach ($assets as $asset) {
$this->info('- Asset "'.$asset->present()->name().'" deleted.');
$this->info('- Asset "'.$asset->display_name.'" deleted.');
$asset_assoc += $asset->assetlog()->count();
$asset->assetlog()->forceDelete();
$asset_maintenances += $asset->assetmaintenances()->count();
$asset->assetmaintenances()->forceDelete();
$maintenances += $asset->maintenances()->count();
$asset->maintenances()->forceDelete();
$asset->forceDelete();
}
$this->info($asset_assoc.' corresponding log records purged.');
$this->info($asset_maintenances.' corresponding maintenance records purged.');
$this->info($maintenances.' corresponding maintenance records purged.');
$locations = Location::whereNotNull('deleted_at')->withTrashed()->get();
$this->info($locations->count().' locations purged.');
@@ -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.');

View File

@@ -0,0 +1,126 @@
<?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 }
{--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.');
}
$acceptances = CheckoutAcceptance::HasFiles()->where('updated_at', '<', $interval_date)->with('assignedTo')->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();
}
}
}
}

View File

@@ -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.');
}

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
{

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');
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands;
use App\Models\Actionlog;
use Illuminate\Console\Command;
class RemoveInvalidUploadDeleteActionLogItems extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:remove-invalid-upload-delete-action-log-items';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Permanently remove invalid "upload deleted" action log items that have a null filename. This command can potentially result in deleted files being "resurrected" in the UI.';
/**
* Execute the console command.
*/
public function handle()
{
$invalidLogs = Actionlog::query()
->where('action_type', 'upload deleted')
->whereNull('filename')
->withTrashed()
->get();
$this->info("{$invalidLogs->count()} invalid log items found.");
if ($invalidLogs->count() === 0) {
return 0;
}
$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,
$log->item_id,
$log->created_at,
$log->deleted_at,
])->toArray());
if ($this->confirm("Do you wish to remove {$invalidLogs->count()} log items?")) {
$invalidLogs->each(fn ($log) => $log->forceDelete());
}
return 0;
}
}

View File

@@ -2,7 +2,6 @@
namespace App\Console\Commands;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Console\Command;
@@ -49,14 +48,16 @@ class ResetDemoSettings extends Command
$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->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,11 +76,12 @@ 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();
}
@@ -87,5 +89,4 @@ class ResetDemoSettings extends Command
\Storage::disk('public')->put('snipe-logo-lg.png', file_get_contents(public_path('img/demo/snipe-logo-lg.png')));
}
}

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) {

View File

@@ -2,13 +2,17 @@
namespace App\Console\Commands;
use enshrined\svgSanitize\Sanitizer;
use Illuminate\Console\Command;
use ZipArchive;
use Illuminate\Support\Facades\Log;
use ZipArchive;
class SQLStreamer {
class SQLStreamer
{
private $input;
private $output;
// embed the prefix here?
public ?string $prefix;
@@ -17,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();
}
}
}
@@ -129,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) {
@@ -141,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
{
/**
@@ -201,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?!
}
@@ -220,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) {
@@ -239,10 +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/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',
@@ -260,9 +271,10 @@ class RestoreFromBackup extends Command
];
$public_dirs = [
'public/uploads/accessories',
// 'public/uploads/assetmodels' => 'public/uploads/models', //according to git, this was _never_ a thing... (see below)
'public/uploads/maintenances',
'public/uploads/assets', // these are asset _pictures_, not asset files
'public/uploads/avatars',
//'public/uploads/barcodes', // we don't want this, let the barcodes be regenerated
'public/uploads/categories',
'public/uploads/companies',
'public/uploads/components',
@@ -270,7 +282,7 @@ class RestoreFromBackup extends Command
'public/uploads/departments',
'public/uploads/locations',
'public/uploads/manufacturers',
'public/uploads/models',
'public/uploads/models', // ...it's been this way for 9 years (as of late 2025)
'public/uploads/suppliers',
];
@@ -283,8 +295,6 @@ class RestoreFromBackup extends Command
'public/uploads/favicon-uploaded.*',
];
$all_files = $private_dirs + $public_dirs;
$sqlfiles = [];
$sqlfile_indices = [];
@@ -292,71 +302,115 @@ class RestoreFromBackup extends Command
$boring_files = [];
$unsafe_files = [];
$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
$sanitizer = new Sanitizer;
/**
* TODO: I _hate_ the "continue 3" thing we keep doing here
* I think a better approach might be to have the "each file" stuff be in a method on this class, and the
* boring_files and interesting_files be properties on it that we fill out. Then, in that method, we could
* just do a 'return' once the file is actually handled (yay or nay). We could also start to break out some of
* the _other_ things that we do into their own methods too? But I don't care about that as much.
*/
for ($i = 0; $i < $za->numFiles; $i++) {
$stat_results = $za->statIndex($i);
// echo "index: $i\n";
// 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";
$boring_files[] = $raw_path;
// 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
continue;
}
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));
foreach (array_merge($private_dirs, $public_dirs) as $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?
$interesting_files[$raw_path] = ['dest' => $dir, 'index' => $i];
continue 2;
if ($last_pos + strlen($dir) + 1 == strlen($raw_path)) {
// we don't care about that; we just want files with the appropriate prefix
//print("FOUND THE EXACT DIRECTORY: $dir AT: $raw_path!!!\n");
foreach (['public' => $public_dirs, 'private' => $private_dirs] as $purpose => $dirs) {
$allowed_extensions = match ($purpose) {
'public' => $public_extensions,
'private' => $private_extensions,
};
foreach ($dirs as $dir => $destdir) {
if (is_int($dir)) {
$dir = $destdir;
}
$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 == '')) {
$unsafe_files[] = $raw_path;
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;
}
}
}
$good_extensions = config('filesystems.allowed_upload_extensions_array');
foreach (array_merge($private_files, $public_files) as $file) {
$has_wildcard = (strpos($file, '*') !== false);
if ($has_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) {
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
if (!in_array($extension, $good_extensions)) {
// gathering potentially unsafe files here to return at exit
$unsafe_files[] = $raw_path;
Log::debug('Potentially unsafe file '.$raw_path.' is being skipped');
$boring_files[] = $raw_path;
continue 2;
foreach (['public' => $public_files, 'private' => $private_files] as $purpose => $files) {
$allowed_extensions = match ($purpose) {
'public' => $public_extensions,
'private' => $private_extensions,
};
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)
}
//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 2;
$last_pos = strrpos($raw_path, $file); // no trailing slash!
if ($last_pos !== false) {
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');
$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("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);
@@ -365,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?
@@ -385,27 +439,28 @@ 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.
[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');
}
@@ -419,7 +474,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,
@@ -434,7 +489,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) {
@@ -443,7 +498,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 {
@@ -451,37 +506,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 {
@@ -489,18 +544,25 @@ class RestoreFromBackup extends Command
}
foreach ($interesting_files as $pretty_file_name => $file_details) {
$ugly_file_name = $za->statIndex($file_details['index'])['name'];
$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
$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
}
$migrated_file = fopen($migrated_file_name, 'w');
while (($buffer = fgets($fp, SQLStreamer::$buffer_size)) !== false) {
fwrite($migrated_file, $buffer);
}
fclose($migrated_file);
fclose($fp);
// $this->info("Wrote $ugly_file_name to $pretty_file_name");
}
$migrated_file = fopen($file_details['dest'].'/'.basename($pretty_file_name), 'w');
while (($buffer = fgets($fp, SQLStreamer::$buffer_size)) !== false) {
fwrite($migrated_file, $buffer);
}
fclose($migrated_file);
fclose($fp);
//$this->info("Wrote $ugly_file_name to $pretty_file_name");
if ($bar) {
$bar->advance();
}

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 {

View File

@@ -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;
}
}

View File

@@ -3,13 +3,15 @@
namespace App\Console\Commands;
use App\Mail\UnacceptedAssetReminderMail;
use App\Models\Accessory;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Setting;
use App\Models\Component;
use App\Models\Consumable;
use App\Models\LicenseSeat;
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;
class SendAcceptanceReminder extends Command
@@ -26,7 +28,7 @@ class SendAcceptanceReminder extends Command
*
* @var string
*/
protected $description = 'This will resend users with unaccepted assets a reminder to accept or decline them.';
protected $description = 'This will resend users with unaccepted items a reminder to accept or decline them.';
/**
* Create a new command instance.
@@ -45,28 +47,39 @@ class SendAcceptanceReminder extends Command
*/
public function handle()
{
$pending = CheckoutAcceptance::pending()->where('checkoutable_type', 'App\Models\Asset')
->whereHas('checkoutable', function($query) {
$query->where('accepted_at', null)
->where('declined_at', null);
})
->with(['assignedTo', 'checkoutable.assignedTo', 'checkoutable.model', 'checkoutable.adminuser'])
->get();
$pending = CheckoutAcceptance::query()
->with([
'checkoutable' => function (MorphTo $morph) {
$morph->morphWith([
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'],
]);
},
'assignedTo',
])
->whereHasMorph(
'checkoutable',
[Asset::class, Accessory::class, LicenseSeat::class, Component::class, Consumable::class],
fn ($q) => $q->whereNull('accepted_at')
->whereNull('declined_at')
)
->pending()
->get();
$count = 0;
$unacceptedAssetGroups = $pending
->filter(function($acceptance) {
return $acceptance->checkoutable_type == 'App\Models\Asset';
})
->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'];
@@ -74,10 +87,10 @@ 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?->present()->fullName(),
'name' => $acceptance->assignedTo?->display_name,
];
} else {
$count++;
@@ -100,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;
}
}

View File

@@ -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;
@@ -9,6 +10,7 @@ use App\Notifications\ExpectedCheckinAdminNotification;
use App\Notifications\ExpectedCheckinNotification;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Notification;
class SendExpectedCheckinAlerts extends Command
{
@@ -17,7 +19,7 @@ class SendExpectedCheckinAlerts extends Command
*
* @var string
*/
protected $name = 'snipeit:expected-checkin';
protected $signature = 'snipeit:expected-checkin {--with-output : Display the results in a table in your console in addition to sending the email}';
/**
* The console command description.
@@ -42,19 +44,46 @@ class SendExpectedCheckinAlerts extends Command
public function handle()
{
$settings = Setting::getSettings();
$interval = $settings->audit_warning_days ?? 0;
$interval = $settings->due_checkin_days ?? 0;
$today = Carbon::now();
$interval_date = $today->copy()->addDays($interval);
$count = 0;
if (! $this->option('with-output')) {
$this->info('Run this command with the --with-output option to see the full list in the console.');
}
$assets = Asset::whereNull('deleted_at')->DueOrOverdueForCheckin($settings)->orderBy('assets.expected_checkin', 'desc')->get();
$this->info($assets->count().' assets must be checked in on or before '.$interval_date.' is deadline');
$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()) {
$this->info('Sending User ExpectedCheckinNotification to: '.$asset->assignedTo->email);
if ($asset->assignedTo && (isset($asset->assignedTo->email)) && ($asset->assignedTo->email != '') && $asset->checkedOutToUser()) {
$asset->assignedTo->notify((new ExpectedCheckinNotification($asset)));
$count++;
}
}
if ($this->option('with-output')) {
if (($assets) && ($assets->count() > 0) && ($settings->alert_email != '')) {
$this->table(
[
trans('general.id'),
trans('admin/hardware/form.tag'),
trans('admin/hardware/form.model'),
trans('general.model_no'),
trans('general.purchase_date'),
trans('admin/hardware/form.expected_checkin'),
],
$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.')' : '',
])
);
}
}
@@ -63,10 +92,11 @@ class SendExpectedCheckinAlerts extends Command
$recipients = collect(explode(',', $settings->alert_email))->map(function ($item) {
return new AlertRecipient($item);
});
$this->info('Sending Admin ExpectedCheckinNotification to: '.$settings->alert_email);
\Notification::send($recipients, new ExpectedCheckinAdminNotification($assets));
Notification::send($recipients, new ExpectedCheckinAdminNotification($assets));
}
$this->info('Sent checkin reminders to to '.$count.' users.');
}
}

View File

@@ -13,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.
@@ -48,27 +48,80 @@ 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::getExpiringWarrantee($alert_interval);
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
$assets->load(['assignedTo', 'supplier']);
if ($assets->count() > 0) {
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
$this->table(
[
trans('general.id'),
trans('admin/hardware/form.tag'),
trans('admin/hardware/form.model'),
trans('general.model_no'),
trans('general.purchase_date'),
trans('admin/hardware/form.eol_rate'),
trans('admin/hardware/form.eol_date'),
trans('admin/hardware/form.warranty_expires'),
],
$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.')' : '',
])
);
}
// Expiring licenses
$licenses = License::getExpiringLicenses($alert_interval);
$licenses = License::query()->ExpiringLicenses($alert_interval, $this->option('expired-licenses'))
->with('manufacturer', 'category')
->orderBy('expiration_date', 'ASC')
->orderBy('termination_date', 'ASC')
->get();
if ($licenses->count() > 0) {
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.purchase_date'),
trans('admin/licenses/form.expiration'),
trans('mail.expires'),
trans('admin/licenses/form.termination_date'),
trans('mail.terminates')],
$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,
])
);
}
// Send a message even if the count is 0
$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');
}
}

View File

@@ -52,12 +52,14 @@ class SendInventoryAlerts extends Command
return new AlertRecipient($item);
});
\Notification::send($recipients, new InventoryAlert($items, $settings->alert_threshold));
Notification::send($recipients, new InventoryAlert($items, $settings->alert_threshold));
} else {
$this->info('No low inventory items found. No mail sent.');
}
} 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');
}
}

View File

@@ -16,7 +16,7 @@ class SendUpcomingAuditReport extends Command
*
* @var string
*/
protected $signature = 'snipeit:upcoming-audits';
protected $signature = 'snipeit:upcoming-audits {--with-output : Display the results in a table in your console in addition to sending the email}';
/**
* The console command description.
@@ -47,20 +47,62 @@ class SendUpcomingAuditReport extends Command
$today = Carbon::now();
$interval_date = $today->copy()->addDays($interval);
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'desc')->get();
$this->info($assets->count() . ' assets must be audited in on or before ' . $interval_date . ' is deadline');
$assets_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('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();
if ((count($assets) !== 0) && ($assets->count() > 0) && ($settings->alert_email != '')) {
// Send a rollup to the admin, if settings dictate
$recipients = collect(explode(',', $settings->alert_email))
->map(fn($item) => trim($item))
->filter(fn($item) => !empty($item))
->all();
if ($settings->alert_email != '') {
$recipients = collect(explode(',', $settings->alert_email))
->map(fn ($item) => trim($item))
->filter(fn ($item) => ! empty($item))
->all();
$this->info('Sending Admin SendUpcomingAuditNotification to: ' . $settings->alert_email);
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets, $settings->audit_warning_days));
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets_for_email, $settings->audit_warning_days, $asset_count));
$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();
$this->table(
[
trans('general.id'),
trans('general.name'),
trans('general.last_audit'),
trans('general.next_audit_date'),
trans('mail.Days'),
trans('mail.supplier'),
trans('mail.assigned_to'),
],
$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,
trans('general.next_audit_date') => $item->next_audit_formatted_date,
trans('mail.Days') => round($item->next_audit_diff_in_days),
trans('mail.supplier') => $item->supplier ? $item->supplier->name : '',
trans('mail.assigned_to') => $item->assignedTo ? $item->assignedTo->display_name : '',
])
);
}
} else {
$this->info('There are no assets due for audit in the next '.$interval.' days.');
}
}

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');
}
}

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;

View File

@@ -37,11 +37,13 @@ class SystemBackup extends Command
*/
public function handle()
{
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';
}

View File

@@ -47,5 +47,4 @@ class TestLocationsFMCS extends Command
$this->table($header, $mismatched);
}
}

View File

@@ -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.');
}
}

View File

@@ -87,7 +87,7 @@ class Version extends Command
$app_version = 'v'."$maj.".($min + 1).".$patch";
} 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
// If nothing is passed, leave the version as it is, just increment the build
} else {
$app_version = 'v'."$maj.$min.".$patch;
}

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();

34
app/Enums/ActionType.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
namespace App\Enums;
enum ActionType: string
{
// General
case Create = 'create';
case Update = 'update';
case Delete = 'delete';
case Restore = 'restore';
// Assets/Accessories/Components/Licenses/Consumables
case Checkout = 'checkout';
case CheckinFrom = 'checkin from';
case Requested = 'requested';
case RequestCanceled = 'request canceled';
case Accepted = 'accepted';
case Declined = 'declined';
case Audit = 'audit';
case NoteAdded = 'note added';
// Users
case TwoFactorReset = '2FA reset';
case Merged = 'merged';
// Licenses
case DeleteSeats = 'delete seats';
case AddSeats = 'add seats';
// File Uploads
case Uploaded = 'uploaded';
case UploadDeleted = 'upload deleted';
}

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;

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;

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;
/**

View File

@@ -11,22 +11,29 @@ class CheckoutableCheckedOut
use Dispatchable, SerializesModels;
public $checkoutable;
public $checkedOutTo;
public $checkedOutBy;
public $note;
public $originalValues;
public int $quantity;
/**
* 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)
{
$this->checkoutable = $checkoutable;
$this->checkedOutTo = $checkedOutTo;
$this->checkedOutBy = $checkedOutBy;
$this->note = $note;
$this->originalValues = $originalValues;
$this->quantity = $quantity;
}
}

View File

@@ -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,
) {}
}

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;
}
}

View File

@@ -4,6 +4,4 @@ namespace App\Exceptions;
use Exception;
class AssetNotRequestable extends Exception
{
}
class AssetNotRequestable extends Exception {}

View File

@@ -2,16 +2,25 @@
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 Symfony\Component\HttpKernel\Exception\HttpException;
use Throwable;
class Handler extends ExceptionHandler
{
@@ -21,16 +30,16 @@ 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,
];
@@ -39,7 +48,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 +56,23 @@ 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)
{
// 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 +86,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 +107,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 +121,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,18 +134,28 @@ 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');
return redirect()
->route('hardware.index')
->withErrors($error_array, 'bulk_asset_errors')
->withInput();
}
// This gets the MVC model name from the exception and formats in a way that's less fugly
$model_name = strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))));
$model_name = trim(strtolower(implode(' ', preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel()))))));
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
// Sigh.
@@ -151,10 +171,10 @@ class Handler extends ExceptionHandler
$route = 'maintenances.index';
} elseif ($route === 'licenseseats.index') {
$route = 'licenses.index';
} elseif ($route === 'customfields.index') {
$route = 'fields.index';
} elseif ($route === 'customfieldsets.index') {
} elseif (($route === 'customfieldsets.index') || ($route === 'customfields.index')) {
$route = 'fields.index';
} elseif ($route == 'actionlogs.index') {
$route = 'home';
}
return redirect()
@@ -162,24 +182,22 @@ 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()) {
@@ -194,8 +212,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

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasAccessories extends ItemStillHasChildren
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasAssetModels extends ItemStillHasChildren
{
//
}

View File

@@ -0,0 +1,5 @@
<?php
namespace App\Exceptions;
class ItemStillHasAssets extends ItemStillHasChildren {}

View File

@@ -0,0 +1,14 @@
<?php
namespace App\Exceptions;
use Exception;
class ItemStillHasChildren extends Exception
{
// public function __construct($message, $code = 0, Exception $previous = null, $parent, $children)
// {
// trans()
//
// }
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasComponents extends ItemStillHasChildren
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasConsumables extends ItemStillHasChildren
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasLicenses extends ItemStillHasChildren
{
//
}

View File

@@ -0,0 +1,8 @@
<?php
namespace App\Exceptions;
class ItemStillHasMaintenances extends ItemStillHasChildren
{
//
}

View File

@@ -4,7 +4,4 @@ namespace App\Exceptions;
use Exception;
class UserDoestExistException extends Exception
{
}
class UserDoestExistException extends Exception {}

File diff suppressed because it is too large Load Diff

View File

@@ -4,18 +4,20 @@ namespace App\Helpers;
class IconHelper
{
public static function icon($type) {
public static function icon($type)
{
switch ($type) {
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 'delete':
case 'upload deleted':
return 'fas fa-trash';
case 'create':
return 'fa-solid fa-plus';
@@ -35,20 +37,28 @@ 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':
return 'fa fa-external-link';
case 'link':
return 'fa fa-link';
case 'email':
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':
return 'fas fa-long-arrow-alt-right';
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':
@@ -80,8 +90,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':
@@ -107,7 +120,7 @@ class IconHelper
case 'dashboard':
return 'fas fa-tachometer-alt';
case 'info-circle':
return 'fas fa-info-circle';
return 'fas fa-info-circle';
case 'caret-right':
return 'fa fa-caret-right';
case 'caret-up':
@@ -124,9 +137,12 @@ class IconHelper
return 'fa-regular fa-clipboard';
case 'paperclip':
return 'fas fa-paperclip';
case 'contact-card':
return 'fa-regular fa-id-card';
case 'files':
return 'fa-regular fa-file';
case 'more-info':
case 'support':
return 'far fa-life-ring';
case 'calendar':
return 'fas fa-calendar';
@@ -137,7 +153,7 @@ class IconHelper
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':
@@ -151,6 +167,7 @@ class IconHelper
case 'location':
return 'fas fa-map-marker-alt';
case 'superadmin':
case 'admin':
return 'fas fa-crown';
case 'print':
return 'fa-solid fa-print';
@@ -182,15 +199,67 @@ 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':
return 'fas fa-sticky-note';
case 'tip':
return 'fa-solid fa-lightbulb';
case 'highlight':
return 'fa-solid fa-highlighter';
case 'manager':
return 'fa-solid fa-building-user';
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 'depreciation-calendar':
case 'expiration':
case 'terminates':
return 'fa-regular fa-calendar-xmark';
case 'manufacturer':
return 'fa-solid fa-industry';
case 'fieldset':
return 'fa-regular fa-rectangle-list';
case 'deleted-date':
return 'fa-solid fa-calendar-xmark';
case 'eol':
return 'fa-regular fa-calendar-days';
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 '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';
}
}
}

View File

@@ -2,39 +2,81 @@
namespace App\Helpers;
use Illuminate\Support\Facades\Storage;
use Illuminate\Http\Response;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
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':
return redirect()->away(Storage::disk($disk)->temporaryUrl($filename, now()->addMinutes(5))); // works for private or public, I guess?
default:
return Storage::disk($disk)->download($filename);
default:
return Storage::disk($disk)->download($filename);
}
}
public static function getMediaType($file_with_path)
{
// Get the file extension and determine the media type
if (Storage::exists($file_with_path)) {
$fileinfo = pathinfo($file_with_path);
$extension = strtolower($fileinfo['extension']);
switch ($extension) {
case 'avif':
case 'jpg':
case 'png':
case 'gif':
case 'svg':
case 'webp':
return 'image';
case 'pdf':
return 'pdf';
case 'mp3':
case 'wav':
case 'ogg':
return 'audio';
case 'mp4':
case 'webm':
case 'mov':
return 'video';
case 'doc':
case 'docx':
return 'document';
case 'txt':
return 'text';
case 'xls':
case 'xlsx':
case 'ods':
return 'spreadsheet';
default:
return $extension; // Default for unknown types
}
}
return null;
}
/**
* This determines the file types that should be allowed inline and checks their fileinfo extension
* 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)
@@ -52,17 +94,16 @@ class StorageHelper
'pdf',
'png',
'svg',
'svg',
'wav',
'webm',
'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;
}
@@ -79,7 +120,6 @@ class StorageHelper
}
/**
* Decide whether to show the file inline or download it.
*/
@@ -102,7 +142,7 @@ class StorageHelper
// Everything else seems okay, but the file doesn't exist on the server.
if (Storage::missing($file)) {
throw new FileNotFoundException();
throw new FileNotFoundException;
}
return Storage::download($file, $filename, $headers);

View File

@@ -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,47 +41,62 @@ 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');
$accessory = $request->handleImages($accessory);
if ($request->has('use_cloned_image')) {
$cloned_model_img = Accessory::select('image')->find($request->input('clone_image_from_id'));
if ($cloned_model_img) {
$new_image_name = 'clone-'.date('U').'-'.$cloned_model_img->image;
$new_image = 'accessories/'.$new_image_name;
Storage::disk('public')->copy('accessories/'.$cloned_model_img->image, $new_image);
$accessory->image = $new_image_name;
}
} else {
$accessory = $request->handleImages($accessory);
}
if ($request->input('redirect_option') === 'back') {
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->input('redirect_option')]);
}
session()->put(['redirect_option' => $request->get('redirect_option')]);
// Was the accessory created?
if ($accessory->save()) {
// Redirect to the new accessory page
@@ -94,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');
}
@@ -106,38 +126,41 @@ 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;
$cloned->deleted_at = '';
$cloned->location_id = null;
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()) {
@@ -146,8 +169,6 @@ class AccessoriesController extends Controller
->withInput();
}
// Update the accessory data
$accessory->name = request('name');
$accessory->location_id = request('location_id');
@@ -165,7 +186,11 @@ class AccessoriesController extends Controller
$accessory = $request->handleImages($accessory);
session()->put(['redirect_option' => $request->get('redirect_option')]);
if ($request->input('redirect_option') === 'back') {
session()->put(['redirect_option' => 'index']);
} else {
session()->put(['redirect_option' => $request->input('redirect_option')]);
}
if ($accessory->save()) {
return Helper::getRedirectOption($request, $accessory->id, 'Accessories')
@@ -182,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'));
}
}

View File

@@ -1,132 +0,0 @@
<?php
namespace App\Http\Controllers\Accessories;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\UploadFileRequest;
use App\Models\Actionlog;
use App\Models\Accessory;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Response;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\StreamedResponse;
class AccessoriesFilesController extends Controller
{
/**
* Validates and stores files associated with a accessory.
*
* @param UploadFileRequest $request
* @param int $accessoryId
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @todo Switch to using the AssetFileRequest form request validator.
*/
public function store(UploadFileRequest $request, $accessoryId = null) : RedirectResponse
{
if (config('app.lock_passwords')) {
return redirect()->route('accessories.show', ['accessory'=>$accessoryId])->with('error', trans('general.feature_disabled'));
}
$accessory = Accessory::find($accessoryId);
if (isset($accessory->id)) {
$this->authorize('accessories.files', $accessory);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/accessories')) {
Storage::makeDirectory('private_uploads/accessories', 775);
}
foreach ($request->file('file') as $file) {
$file_name = $request->handleFile('private_uploads/accessories/', 'accessory-'.$accessory->id, $file);
//Log the upload to the log
$accessory->logUpload($file_name, e($request->input('notes')));
}
return redirect()->route('accessories.show', $accessory->id)->withFragment('files')->with('success', trans('general.file_upload_success'));
}
return redirect()->route('accessories.show', $accessory->id)->withFragment('files')->with('error', trans('general.no_files_uploaded'));
}
// Prepare the error message
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
/**
* Deletes the selected accessory file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param int $accessoryId
* @param int $fileId
*/
public function destroy($accessoryId = null, $fileId = null) : RedirectResponse
{
if ($accessory = Accessory::find($accessoryId)) {
$this->authorize('update', $accessory);
if ($log = Actionlog::find($fileId)) {
if (Storage::exists('private_uploads/accessories/'.$log->filename)) {
try {
Storage::delete('private_uploads/accessories/' . $log->filename);
$log->delete();
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
} catch (\Exception $e) {
Log::debug($e);
return redirect()->route('accessories.index')->with('error', trans('general.file_does_not_exist'));
}
}
}
return redirect()->route('accessories.show', ['accessory' => $accessory])->withFragment('files')->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
/**
* Allows the selected file to be viewed.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.4]
* @param int $accessoryId
* @param int $fileId
*/
public function show($accessoryId = null, $fileId = null) : View | RedirectResponse | Response | BinaryFileResponse | StreamedResponse
{
// the accessory is valid
if ($accessory = Accessory::find($accessoryId)) {
$this->authorize('view', $accessory);
$this->authorize('accessories.files', $accessory);
if ($log = Actionlog::whereNotNull('filename')->where('item_id', $accessory->id)->find($fileId)) {
$file = 'private_uploads/accessories/'.$log->filename;
try {
return StorageHelper::showOrDownloadFile($file, $log->filename);
} catch (\Exception $e) {
return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.file_not_found'));
}
}
return redirect()->route('accessories.show', ['accessory' => $accessory])->withFragment('files')->with('error', trans('general.log_record_not_found'));
}
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
}

View File

@@ -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'));
}

View File

@@ -11,47 +11,39 @@ use App\Models\Accessory;
use App\Models\AccessoryCheckout;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
class AccessoryCheckoutController extends Controller
{
use CheckInOutRequest;
/**
* Return the form to checkout an Accessory to a user.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*
* @param int $id
*/
public function create($id) : View | RedirectResponse
public function create(Accessory $accessory): View|RedirectResponse
{
if ($accessory = Accessory::withCount('checkouts as checkouts_count')->find($id)) {
$this->authorize('checkout', $accessory);
$this->authorize('checkout', $accessory);
if ($accessory->category) {
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0){
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
// Return the checkout view
return view('accessories/checkout', compact('accessory'));
if ($accessory->category) {
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
// Invalid category
return redirect()->route('accessories.edit', ['accessory' => $accessory->id])
->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.accessory')]));
// Return the checkout view
return view('accessories/checkout', compact('accessory'));
}
// Not found
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.not_found'));
// Invalid category
return redirect()->route('accessories.edit', ['accessory' => $accessory->id])
->with('error', trans('general.invalid_item_category_single', ['type' => trans('general.accessory')]));
}
@@ -62,18 +54,19 @@ class AccessoryCheckoutController extends Controller
* trigger a Slack message and send an email.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param Request $request
* @param Accessory $accessory
*
* @param Request $request
*/
public function store(AccessoryCheckoutRequest $request, Accessory $accessory) : RedirectResponse
public function store(AccessoryCheckoutRequest $request, Accessory $accessory): RedirectResponse
{
$this->authorize('checkout', $accessory);
$target = $this->determineCheckoutTarget();
session()->put(['checkout_to_type' => $target]);
$accessory->checkout_qty = $request->input('checkout_qty', 1);
for ($i = 0; $i < $accessory->checkout_qty; $i++) {
$accessory_checkout = new AccessoryCheckout([
@@ -88,13 +81,19 @@ class AccessoryCheckoutController extends Controller
$accessory_checkout->save();
}
event(new CheckoutableCheckedOut($accessory, $target, auth()->user(), $request->input('note')));
event(new CheckoutableCheckedOut(
$accessory,
$target,
auth()->user(),
$request->input('note'),
[],
$accessory->checkout_qty,
));
$request->request->add(['checkout_to_type' => request('checkout_to_type')]);
$request->request->add(['assigned_to' => $target->id]);
session()->put(['redirect_option' => $request->get('redirect_option'), 'checkout_to_type' => $request->get('checkout_to_type')]);
session()->put(['redirect_option' => $request->input('redirect_option'), 'checkout_to_type' => $request->input('checkout_to_type')]);
// Redirect to the new accessory page
return Helper::getRedirectOption($request, $accessory->id, 'Accessories')

View File

@@ -4,46 +4,34 @@ namespace App\Http\Controllers\Account;
use App\Events\CheckoutAccepted;
use App\Events\CheckoutDeclined;
use App\Events\ItemAccepted;
use App\Events\ItemDeclined;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Mail\CheckoutAcceptanceResponseMail;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\Contracts\Acceptable;
use App\Models\Setting;
use App\Models\User;
use App\Models\AssetModel;
use App\Models\Accessory;
use App\Models\License;
use App\Models\Component;
use App\Models\Consumable;
use App\Notifications\AcceptanceAssetAcceptedNotification;
use App\Notifications\AcceptanceAssetAcceptedToUserNotification;
use App\Notifications\AcceptanceAssetDeclinedNotification;
use App\Notifications\AcceptanceItemAcceptedNotification;
use App\Notifications\AcceptanceItemAcceptedToUserNotification;
use App\Notifications\AcceptanceItemDeclinedNotification;
use Exception;
use Illuminate\Contracts\View\View;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use App\Http\Controllers\SettingsController;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
use \Illuminate\Contracts\View\View;
use \Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Log;
class AcceptanceController extends Controller
{
/**
* Show a listing of pending checkout acceptances for the current user
*/
public function index() : View
public function index(): View
{
$acceptances = CheckoutAcceptance::forUser(auth()->user())->pending()->get();
return view('account/accept.index', compact('acceptances'));
}
@@ -52,11 +40,10 @@ class AcceptanceController extends Controller
*
* @param int $id
*/
public function create($id) : View | RedirectResponse
public function create($id): View|RedirectResponse
{
$acceptance = CheckoutAcceptance::find($id);
if (is_null($acceptance)) {
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
}
@@ -79,17 +66,19 @@ class AcceptanceController extends Controller
/**
* Stores the accept/decline of the checkout acceptance
*
* @param Request $request
* @param int $id
*/
public function store(Request $request, $id) : RedirectResponse
public function store(Request $request, $id): RedirectResponse
{
$acceptance = CheckoutAcceptance::find($id);
if (is_null($acceptance)) {
if (! $acceptance = CheckoutAcceptance::find($id)) {
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$assigned_user = User::find($acceptance->assigned_to_id);
$settings = Setting::getSettings();
$sig_filename = '';
if (! $acceptance->isPending()) {
return redirect()->route('account.accept')->with('error', trans('admin/users/message.error.asset_already_accepted'));
}
@@ -107,262 +96,129 @@ class AcceptanceController extends Controller
}
/**
* Get the signature and save it
* Check for the signature directory
*/
if (! Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
$display_model = '';
$pdf_view_route = '';
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$sig_filename='';
// If signatures are required, make sure we have one
if (Setting::getSettings()->require_accept_signature == '1') {
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-'.Str::uuid().'-'.date('Y-m-d-his').'.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/'.$sig_filename, (string) $decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
// Convert PDF logo to base64 for TCPDF
// This is needed for TCPDF to properly embed the image if it's a png and the cache isn't writable
$encoded_logo = null;
if (($settings->acceptance_pdf_logo) && (Storage::disk('public')->exists($settings->acceptance_pdf_logo))) {
$encoded_logo = base64_encode(file_get_contents(public_path().'/uploads/'.$settings->acceptance_pdf_logo));
}
// Get the data array ready for the notifications and PDF generation
$data = [
'item_tag' => $item->asset_tag,
'item_name' => $item->display_name, // this handles licenses seats, which don't have a 'name' field
'item_model' => $item->model?->name,
'item_serial' => $item->serial,
'item_status' => $item->assetstatus?->name,
'eula' => $item->getEula(),
'note' => $request->input('note'),
'check_out_date' => Helper::getFormattedDateObject($acceptance->created_at, 'datetime', false),
'accepted_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
'declined_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
'assigned_to' => $assigned_user->display_name,
'email' => $assigned_user->email,
'employee_num' => $assigned_user->employee_num,
'site_name' => $settings->site_name,
'company_name' => $item->company?->name ?? $settings->site_name,
'signature' => (($sig_filename && array_key_exists('1', $encoded_image))) ? $encoded_image[1] : null,
'logo' => ($encoded_logo) ?? null,
'date_settings' => $settings->date_display_format,
'qty' => $acceptance->qty ?? 1,
];
if ($request->input('asset_acceptance') == 'accepted') {
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
$pdf_filename = 'accepted-'.$acceptance->checkoutable_id.'-'.$acceptance->display_checkoutable_type.'-eula-'.date('Y-m-d-h-i-s').'.pdf';
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
$assigned_user = User::find($acceptance->assigned_to_id);
// this is horrible
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$pdf_view_route ='account.accept.accept-asset-eula';
$asset_model = AssetModel::find($item->model_id);
if (!$asset_model) {
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
}
$display_model = $asset_model->name;
break;
case 'App\Models\Accessory':
$pdf_view_route ='account.accept.accept-accessory-eula';
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
break;
case 'App\Models\LicenseSeat':
$pdf_view_route ='account.accept.accept-license-eula';
$license = License::find($item->license_id);
$display_model = $license->name;
break;
case 'App\Models\Component':
$pdf_view_route ='account.accept.accept-component-eula';
$component = Component::find($item->id);
$display_model = $component->name;
break;
case 'App\Models\Consumable':
$pdf_view_route ='account.accept.accept-consumable-eula';
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
break;
}
// if ($acceptance->checkoutable_type == 'App\Models\Asset') {
// $pdf_view_route ='account.accept.accept-asset-eula';
// $asset_model = AssetModel::find($item->model_id);
// $display_model = $asset_model->name;
// $assigned_to = User::find($item->assigned_to)->present()->fullName;
//
// } elseif ($acceptance->checkoutable_type== 'App\Models\Accessory') {
// $pdf_view_route ='account.accept.accept-accessory-eula';
// $accessory = Accessory::find($item->id);
// $display_model = $accessory->name;
// $assigned_to = User::find($item->assignedTo);
//
// }
/**
* Gather the data for the PDF. We fire this whether there is a signature required or not,
* since we want the moment-in-time proof of what the EULA was when they accepted it.
*/
$branding_settings = SettingsController::getPDFBranding();
$path_logo = "";
// Check for the PDF logo path and use that, otherwise use the regular logo path
if (!is_null($branding_settings->acceptance_pdf_logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->acceptance_pdf_logo;
} elseif (!is_null($branding_settings->logo)) {
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
}
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_serial' => $item->serial,
'item_status' => $item->assetstatus?->name,
'eula' => $item->getEula(),
'note' => $request->input('note'),
'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d'),
'assigned_to' => $assigned_user->present()->fullName,
'company_name' => $branding_settings->site_name,
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'logo' => $path_logo,
'date_settings' => $branding_settings->date_display_format,
];
if ($pdf_view_route!='') {
Log::debug($pdf_filename.' is the filename, and the route was specified.');
$pdf = Pdf::loadView($pdf_view_route, $data);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
}
// Generate the PDF content
$pdf_content = $acceptance->generateAcceptancePdf($data, $acceptance);
Storage::put('private_uploads/eula-pdfs/'.$pdf_filename, $pdf_content);
// Log the acceptance
$acceptance->accept($sig_filename, $item->getEula(), $pdf_filename, $request->input('note'));
// Send the PDF to the signing user
if (($request->input('send_copy') == '1') && ($assigned_user->email !='')) {
if (($request->input('send_copy') == '1') && ($assigned_user->email != '')) {
// Add the attachment for the signing user into the $data array
$data['file'] = $pdf_filename;
try {
$assigned_user->notify(new AcceptanceAssetAcceptedToUserNotification($data));
} catch (\Exception $e) {
$assigned_user->notify((new AcceptanceItemAcceptedToUserNotification($data))->locale($assigned_user->locale));
} catch (Exception $e) {
Log::warning($e);
}
}
try {
$acceptance->notify(new AcceptanceAssetAcceptedNotification($data));
} catch (\Exception $e) {
$acceptance->notify((new AcceptanceItemAcceptedNotification($data))->locale(Setting::getSettings()->locale));
} catch (Exception $e) {
Log::warning($e);
}
event(new CheckoutAccepted($acceptance));
$return_msg = trans('admin/users/message.accepted');
// Item was declined
} else {
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
for ($i = 0; $i < ($acceptance->qty ?? 1); $i++) {
$acceptance->decline($sig_filename, $request->input('note'));
}
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
// Format the data to send the declined notification
$branding_settings = SettingsController::getPDFBranding();
// This is the most horriblest
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$asset_model = AssetModel::find($item->model_id);
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Accessory':
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Component':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Consumable':
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
}
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_serial' => $item->serial,
'item_status' => $item->assetstatus?->name,
'note' => $request->input('note'),
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'date_settings' => $branding_settings->date_display_format,
];
if ($pdf_view_route!='') {
Log::debug($pdf_filename.' is the filename, and the route was specified.');
$pdf = Pdf::loadView($pdf_view_route, $data);
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
}
$acceptance->decline($sig_filename, $request->input('note'));
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
$acceptance->notify(new AcceptanceItemDeclinedNotification($data));
Log::debug('New event acceptance.');
event(new CheckoutDeclined($acceptance));
$return_msg = trans('admin/users/message.declined');
}
// Send an email notification if one is requested
if ($acceptance->alert_on_response_id) {
try {
$recipient = User::find($acceptance->alert_on_response_id);
if ($recipient) {
if ($recipient?->email) {
Log::debug('Attempting to send email acceptance.');
Mail::to($recipient)->send(new CheckoutAcceptanceResponseMail(
$acceptance,
$recipient,
$request->input('asset_acceptance') === 'accepted',
));
Log::debug('Send email notification sucess on checkout acceptance response.');
}
} catch (Exception $e) {
Log::error($e->getMessage());
Log::warning($e);
}
}
@@ -370,5 +226,4 @@ class AcceptanceController extends Controller
return redirect()->to('account/accept')->with('success', $return_msg);
}
}

View File

@@ -3,16 +3,19 @@
namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Models\Actionlog;
use App\Models\Asset;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use \Illuminate\Http\Response;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class ActionlogController extends Controller
{
public function displaySig($filename) : RedirectResponse | Response | bool
public function displaySig($filename): RedirectResponse|Response|bool
{
// PHP doesn't let you handle file not found errors well with
// PHP doesn't let you handle file not found errors well with
// file_get_contents, so we set the error reporting for just this class
error_reporting(0);
@@ -21,15 +24,17 @@ class ActionlogController extends Controller
case 's3':
$file = 'private_uploads/signatures/'.$filename;
return redirect()->away(Storage::disk($disk)->temporaryUrl($file, now()->addMinutes(5)));
default:
$this->authorize('view', \App\Models\Asset::class);
$this->authorize('view', Asset::class);
$file = config('app.private_uploads').'/signatures/'.$filename;
$filetype = Helper::checkUploadIsImage($file);
$contents = file_get_contents($file, false, stream_context_create(['http' => ['ignore_errors' => true]]));
if ($contents === false) {
Log::warning('File '.$file.' not found');
return false;
} else {
return response()->make($contents)->header('Content-Type', $filetype);
@@ -37,19 +42,30 @@ class ActionlogController extends Controller
}
}
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
public function getStoredEula($filename): Response|BinaryFileResponse|RedirectResponse
{
$this->authorize('view', \App\Models\Asset::class);
if (config('filesystems.default') == 's3_private') {
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
if ($actionlog = Actionlog::where('filename', $filename)->with('user')->with('target')->firstOrFail()) {
$this->authorize('view', $actionlog->target);
$this->authorize('view', $actionlog->user);
if (config('filesystems.default') == 's3_private') {
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
}
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
if (request()->input('inline') == 'true') {
return response()->file(config('app.private_uploads').'/eula-pdfs/'.$filename);
}
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
}
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
}
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
}
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
return redirect()->back()->with('error', trans('general.record_not_found'));
}
}

View File

@@ -7,19 +7,17 @@ use App\Helpers\Helper;
use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller;
use App\Http\Requests\AccessoryCheckoutRequest;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Requests\StoreAccessoryRequest;
use App\Http\Transformers\AccessoriesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Accessory;
use App\Models\Company;
use App\Models\User;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use App\Models\AccessoryCheckout;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class AccessoriesController extends Controller
{
@@ -29,8 +27,10 @@ class AccessoriesController extends Controller
* Display a listing of the resource.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
* @return \Illuminate\Http\Response
*
* @return Response
*/
public function index(Request $request)
{
@@ -38,10 +38,9 @@ class AccessoriesController extends Controller
$this->authorize('view', Accessory::class);
}
// This array is what determines which fields should be allowed to be sorted on ON the table itself, no relations
// Relations will be handled in query scopes a little further down.
$allowed_columns =
$allowed_columns =
[
'id',
'name',
@@ -53,22 +52,47 @@ class AccessoriesController extends Controller
'company_id',
'notes',
'checkouts_count',
'order_number',
'qty',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'location',
'category',
'supplier',
'manufacturer',
];
$accessories = Accessory::select('accessories.*')
->with('category', 'company', 'manufacturer', 'checkouts', 'location', 'supplier', 'adminuser')
->withCount('checkouts as checkouts_count');
if ($request->filled('search')) {
$accessories = $accessories->TextSearch($request->input('search'));
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$accessories->ByFilter($filter);
} elseif ($request->filled('search')) {
$accessories->TextSearch($request->input('search'));
}
if ($request->filled('company_id')) {
$accessories->where('accessories.company_id', '=', $request->input('company_id'));
}
if ($request->filled('order_number')) {
$accessories->where('accessories.order_number', '=', $request->input('order_number'));
}
if ($request->filled('category_id')) {
$accessories->where('category_id', '=', $request->input('category_id'));
}
@@ -82,11 +106,11 @@ class AccessoriesController extends Controller
}
if ($request->filled('location_id')) {
$accessories->where('location_id','=',$request->input('location_id'));
$accessories->where('location_id', '=', $request->input('location_id'));
}
if ($request->filled('notes')) {
$accessories->where('notes','=',$request->input('notes'));
$accessories->where('notes', '=', $request->input('notes'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
@@ -94,7 +118,7 @@ class AccessoriesController extends Controller
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort_override = $request->input('sort');
$sort_override = $request->input('sort');
$column_sort = in_array($sort_override, $allowed_columns) ? $sort_override : 'created_at';
switch ($sort_override) {
@@ -109,7 +133,7 @@ class AccessoriesController extends Controller
break;
case 'manufacturer':
$accessories = $accessories->OrderManufacturer($order);
break;
break;
case 'supplier':
$accessories = $accessories->OrderSupplier($order);
break;
@@ -120,20 +144,21 @@ class AccessoriesController extends Controller
$accessories = $accessories->orderBy($column_sort, $order);
break;
}
$total = $accessories->count();
$accessories = $accessories->skip($offset)->take($limit)->get();
return (new AccessoriesTransformer)->transformAccessories($accessories, $total);
}
/**
* Store a newly created resource in storage.
*
* @param \App\Http\Requests\ImageUploadRequest $request
* @return \Illuminate\Http\JsonResponse
* @param ImageUploadRequest $request
* @return JsonResponse
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function store(StoreAccessoryRequest $request)
@@ -155,7 +180,9 @@ class AccessoriesController extends Controller
*
* @param int $id
* @return array
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function show($id)
@@ -166,13 +193,14 @@ class AccessoriesController extends Controller
return (new AccessoriesTransformer)->transformAccessory($accessory);
}
/**
* Display the specified resource.
*
* @param int $id
* @return array
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function accessory_detail($id)
@@ -183,14 +211,15 @@ class AccessoriesController extends Controller
return (new AccessoriesTransformer)->transformAccessory($accessory);
}
/**
* Get the list of checkouts for a specific accessory
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*
* @param int $id
* @return | array
* @return | array
*/
public function checkedout(Request $request, $id)
{
@@ -214,15 +243,15 @@ class AccessoriesController extends Controller
return (new AccessoriesTransformer)->transformCheckedoutAccessory($accessory_checkouts, $total);
}
/**
* Update the specified resource in storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
*
* @param int $id
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function update(ImageUploadRequest $request, $id)
{
@@ -242,9 +271,11 @@ class AccessoriesController extends Controller
* Remove the specified resource from storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*
* @param int $id
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*/
public function destroy($id)
{
@@ -261,7 +292,6 @@ class AccessoriesController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.delete.success')));
}
/**
* Save the Accessory checkout information.
*
@@ -269,7 +299,8 @@ class AccessoriesController extends Controller
* trigger a Slack message and send an email.
*
* @param int $accessoryId
* @return \Illuminate\Http\JsonResponse
* @return JsonResponse
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function checkout(AccessoryCheckoutRequest $request, Accessory $accessory)
@@ -290,30 +321,48 @@ class AccessoriesController extends Controller
$accessory_checkout->created_by = auth()->id();
$accessory_checkout->save();
$payload = [
'accessory_id' => $accessory->id,
'assigned_to' => $target->id,
'assigned_type' => $target::class,
'note' => $request->input('note'),
'created_by' => auth()->id(),
'pivot' => $accessory_checkout->id,
];
}
// Set this value to be able to pass the qty through to the event
event(new CheckoutableCheckedOut($accessory, $target, auth()->user(), $request->input('note')));
event(new CheckoutableCheckedOut(
$accessory,
$target,
auth()->user(),
$request->input('note'),
[],
$accessory->checkout_qty,
));
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkout.success')));
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/accessories/message.checkout.success')));
}
/**
* Check in the item so that it can be checked out again to someone else
*
* @param int $accessoryUserId
* @param string $backto
* @return JsonResponse
*
* @uses Accessory::checkin_email() to determine if an email can and should be sent
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param Request $request
* @param int $accessoryUserId
* @param string $backto
* @return \Illuminate\Http\RedirectResponse
*
* @internal param int $accessoryId
*/
public function checkin(Request $request, $accessoryUserId = null)
{
if (is_null($accessory_checkout = AccessoryCheckout::find($accessoryUserId))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist')));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.does_not_exist', ['id' => $accessoryUserId])));
}
$accessory = Accessory::find($accessory_checkout->accessory_id);
@@ -327,20 +376,25 @@ class AccessoriesController extends Controller
$user = User::find($accessory_checkout->assigned_to);
}
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/accessories/message.checkin.success')));
$payload = [
'accessory_id' => $accessory->id,
'note' => $request->input('note'),
'created_by' => auth()->id(),
'pivot' => $accessory_checkout->id,
];
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/accessories/message.checkin.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.checkin.error')));
}
/**
* Gets a paginated collection for the select2 menus
*
* @see \App\Http\Transformers\SelectlistTransformer
*
*/
* Gets a paginated collection for the select2 menus
*
* @see SelectlistTransformer
*/
public function selectlist(Request $request)
{
@@ -350,12 +404,11 @@ class AccessoriesController extends Controller
]);
if ($request->filled('search')) {
$accessories = $accessories->where('accessories.name', 'LIKE', '%'.$request->get('search').'%');
$accessories = $accessories->where('accessories.name', 'LIKE', '%'.$request->input('search').'%');
}
$accessories = $accessories->orderBy('name', 'ASC')->paginate(50);
return (new SelectlistTransformer)->transformSelectlist($accessories);
}
}

View File

@@ -4,22 +4,26 @@ namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Requests\StoreAssetModelRequest;
use App\Http\Transformers\AssetModelsTransformer;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\Asset;
use App\Models\AssetModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use App\Models\Setting;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
/**
* This class controls all actions related to asset models for
* the Snipe-IT Asset Management application.
*
* @version v4.0
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
class AssetModelsController extends Controller
@@ -28,9 +32,10 @@ class AssetModelsController extends Controller
* Display a listing of the resource.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function index(Request $request) : JsonResponse | array
public function index(Request $request): JsonResponse|array
{
$this->authorize('view', AssetModel::class);
$allowed_columns =
@@ -46,10 +51,20 @@ class AssetModelsController extends Controller
'manufacturer',
'requestable',
'assets_count',
'assets_assigned_count',
'assets_archived_count',
'remaining',
'category',
'fieldset',
'deleted_at',
'updated_at',
'require_serial',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'manufacturer',
'category',
];
$assetmodels = AssetModel::select([
@@ -69,11 +84,32 @@ class AssetModelsController extends Controller
'models.fieldset_id',
'models.deleted_at',
'models.updated_at',
])
'models.require_serial',
])
->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues', 'adminuser')
->withCount('assets as assets_count');
->withCount('assets as assets_count')
->withCount('availableAssets as remaining')
->withCount('assignedAssets as assets_assigned_count')
->withCount('archivedAssets as assets_archived_count');
if ($request->input('status')=='deleted') {
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$assetmodels->ByFilter($filter);
} elseif ($request->filled('search')) {
$assetmodels->TextSearch($request->input('search'));
}
if ($request->input('status') == 'deleted') {
$assetmodels->onlyTrashed();
}
@@ -89,7 +125,7 @@ class AssetModelsController extends Controller
$assetmodels = $assetmodels->where('models.requestable', '=', '1');
} elseif ($request->input('requestable') == 'false') {
$assetmodels = $assetmodels->where('models.requestable', '=', '0');
}
}
if ($request->filled('notes')) {
$assetmodels = $assetmodels->where('models.notes', '=', $request->input('notes'));
@@ -138,15 +174,14 @@ class AssetModelsController extends Controller
return (new AssetModelsTransformer)->transformAssetModels($assetmodels, $total);
}
/**
* Store a newly created resource in storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
* @param \App\Http\Requests\StoreAssetModelRequest $request
*/
public function store(StoreAssetModelRequest $request) : JsonResponse
public function store(StoreAssetModelRequest $request): JsonResponse
{
$this->authorize('create', AssetModel::class);
$assetmodel = new AssetModel;
@@ -154,10 +189,10 @@ class AssetModelsController extends Controller
$assetmodel = $request->handleImages($assetmodel);
if ($assetmodel->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/models/message.create.success')));
return response()->json(Helper::formatStandardApiResponse('success', (new AssetModelsTransformer)->transformAssetModel($assetmodel), trans('admin/models/message.create.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $assetmodel->getErrors()));
return response()->json(Helper::formatStandardApiResponse('error', null, $assetmodel->getErrors()));
}
@@ -165,10 +200,12 @@ class AssetModelsController extends Controller
* Display the specified resource.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*
* @param int $id
*/
public function show($id) : array
public function show($id): array
{
$this->authorize('view', AssetModel::class);
$assetmodel = AssetModel::withCount('assets as assets_count')->findOrFail($id);
@@ -180,10 +217,12 @@ class AssetModelsController extends Controller
* Display the specified resource's assets
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*
* @param int $id
*/
public function assets($id) : array
public function assets($id): array
{
$this->authorize('view', AssetModel::class);
$assets = Asset::where('model_id', '=', $id)->get();
@@ -191,23 +230,24 @@ class AssetModelsController extends Controller
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
/**
* Update the specified resource in storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
* @param \App\Http\Requests\ImageUploadRequest $request
*
* @param ImageUploadRequest $request
* @param int $id
* @return \Illuminate\Http\Response
* @return Response
*/
public function update(StoreAssetModelRequest $request, $id) : JsonResponse
public function update(StoreAssetModelRequest $request, $id): JsonResponse
{
$this->authorize('update', AssetModel::class);
$assetmodel = AssetModel::findOrFail($id);
$assetmodel->fill($request->all());
$assetmodel = $request->handleImages($assetmodel);
/**
* Allow custom_fieldset_id to override and populate fieldset_id.
* This is stupid, but required for legacy API support.
@@ -217,12 +257,11 @@ class AssetModelsController extends Controller
* it, but I'll be damned if I can think of one. - snipe
*/
if ($request->filled('custom_fieldset_id')) {
$assetmodel->fieldset_id = $request->get('custom_fieldset_id');
$assetmodel->fieldset_id = $request->input('custom_fieldset_id');
}
if ($assetmodel->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $assetmodel, trans('admin/models/message.update.success')));
return response()->json(Helper::formatStandardApiResponse('success', (new AssetModelsTransformer)->transformAssetModel($assetmodel), trans('admin/models/message.update.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $assetmodel->getErrors()));
@@ -232,10 +271,12 @@ class AssetModelsController extends Controller
* Remove the specified resource from storage.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*
* @param int $id
*/
public function destroy($id) : JsonResponse
public function destroy($id): JsonResponse
{
$this->authorize('delete', AssetModel::class);
$assetmodel = AssetModel::findOrFail($id);
@@ -262,10 +303,11 @@ class AssetModelsController extends Controller
* Gets a paginated collection for the select2 menus
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer
* @see SelectlistTransformer
*/
public function selectlist(Request $request) : array
public function selectlist(Request $request): array
{
$this->authorize('view.selectlists');
@@ -278,7 +320,7 @@ class AssetModelsController extends Controller
'models.category_id',
])->with('manufacturer', 'category');
$settings = \App\Models\Setting::getSettings();
$settings = Setting::getSettings();
if ($request->filled('search')) {
$assetmodels = $assetmodels->SearchByManufacturerOrCat($request->input('search'));

View File

@@ -3,45 +3,49 @@
namespace App\Http\Controllers\Api;
use App\Events\CheckoutableCheckedIn;
use App\Http\Requests\StoreAssetRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Http\Traits\MigratesLegacyAssetLocations;
use App\Models\AccessoryCheckout;
use App\Models\CheckoutAcceptance;
use App\Models\LicenseSeat;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Gate;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetCheckoutRequest;
use App\Http\Requests\FilterRequest;
use App\Http\Requests\ImageUploadRequest;
use App\Http\Requests\StoreAssetRequest;
use App\Http\Requests\UpdateAssetRequest;
use App\Http\Traits\MigratesLegacyAssetLocations;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\ComponentsTransformer;
use App\Http\Transformers\LicensesTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Models\AccessoryCheckout;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\CustomField;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\Location;
use App\Models\Setting;
use App\Models\User;
use App\Observers\AssetObserver;
use App\View\Label;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;
use App\View\Label;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
/**
* This class controls all actions related to assets for
* the Snipe-IT Asset Management application.
*
* @version v1.0
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
class AssetsController extends Controller
@@ -52,13 +56,14 @@ class AssetsController extends Controller
* Returns JSON listing of all assets
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v4.0]
*/
public function index(Request $request, $action = null, $upcoming_status = null) : JsonResponse | array
public function index(FilterRequest $request, $action = null, $upcoming_status = null): JsonResponse|array
{
// This handles the legacy audit endpoints :(
if ($action == 'audit') {
$action = 'audits';
@@ -66,17 +71,17 @@ class AssetsController extends Controller
$filter_non_deprecable_assets = false;
/**
* This looks MAD janky (and it is), but the AssetsController@index does a LOT of heavy lifting throughout the
* app. This bit here just makes sure that someone without permission to view assets doesn't
* end up with priv escalations because they asked for a different endpoint.
*
* Since we never gave the specification for which transformer to use before, it should default
* gracefully to just use the AssetTransformer by default, which shouldn't break anything.
*
* It was either this mess, or repeating ALL of the searching and sorting and filtering code,
* This looks MAD janky (and it is), but the AssetsController@index does a LOT of heavy lifting throughout the
* app. This bit here just makes sure that someone without permission to view assets doesn't
* end up with priv escalations because they asked for a different endpoint.
*
* Since we never gave the specification for which transformer to use before, it should default
* gracefully to just use the AssetTransformer by default, which shouldn't break anything.
*
* It was either this mess, or repeating ALL of the searching and sorting and filtering code,
* which would have been far worse of a mess. *sad face* - snipe (Sept 1, 2021)
*/
if (Route::currentRouteName()=='api.depreciation-report.index') {
if (Route::currentRouteName() == 'api.depreciation-report.index') {
$filter_non_deprecable_assets = true;
$transformer = 'App\Http\Transformers\DepreciationReportTransformer';
$this->authorize('reports.view');
@@ -85,7 +90,6 @@ class AssetsController extends Controller
$this->authorize('index', Asset::class);
}
$settings = Setting::getSettings();
$allowed_columns = [
@@ -115,20 +119,51 @@ class AssetsController extends Controller
'asset_eol_date',
'requestable',
'jobtitle',
// These are *relationships* so we wouldn't normally include them in this array,
// since they would normally create a `column not found` error,
// BUT we account for them in the ordering switch down at the end of this method
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
'company',
'model',
'location',
'rtd_location',
'category',
'status_label',
'manufacturer',
'supplier',
'jobtitle',
'assigned_to',
'created_by',
];
$all_custom_fields = CustomField::all(); // used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
}
$filter = [];
if ($request->filled('filter')) {
$filter = json_decode($request->input('filter'), true);
}
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
return in_array($key, $allowed_columns);
}, ARRAY_FILTER_USE_KEY);
}
$assets = Asset::select('assets.*')
// ->addSelect([
// 'first_checkout_at' => Actionlog::query()
// ->select('created_at')
// ->whereColumn('item_id', 'assets.id')
// ->where('item_type', Asset::class)
// ->where('action_type', 'checkout')
// ->orderBy('created_at')
// ->limit(1),
// ])
->with(
'model',
'location',
@@ -141,17 +176,15 @@ class AssetsController extends Controller
'model.category',
'model.manufacturer',
'model.fieldset',
'model.depreciation',
'supplier'
); // it might be tempting to add 'assetlog' here, but don't. It blows up update-heavy users.
if ($filter_non_deprecable_assets) {
$non_deprecable_models = AssetModel::select('id')->whereNotNull('depreciation_id')->get();
$assets->InModelList($non_deprecable_models->toArray());
}
// These are used by the API to query against specific ID numbers.
// They are also used by the individual searches on detail pages like
// locations, etc.
@@ -159,7 +192,7 @@ class AssetsController extends Controller
// Search custom fields by column name
foreach ($all_custom_fields as $field) {
if ($request->filled($field->db_column_name()) && $field->db_column_name()) {
$assets->where($field->db_column_name(), '=', $request->input($field->db_column_name()));
$assets->where('assets.'.$field->db_column_name(), '=', $request->input($field->db_column_name()));
}
}
@@ -169,12 +202,11 @@ class AssetsController extends Controller
$assets->TextSearch($request->input('search'));
}
/**
* Handle due and overdue audits and checkin dates
*/
switch ($action) {
// Audit (singular) is left over from earlier legacy APIs
// Audit (singular) is left over from earlier legacy APIs
case 'audits':
switch ($upcoming_status) {
case 'due':
@@ -208,7 +240,6 @@ class AssetsController extends Controller
* End handling due and overdue audits and checkin dates
*/
// This is used by the sidenav, mostly
// We switched from using query scopes here because of a Laravel bug
@@ -282,7 +313,6 @@ class AssetsController extends Controller
}
}
// Leave these under the TextSearch scope, else the fuzziness will override the specific ID (status ID, etc) requested
if ($request->filled('status_id')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
@@ -299,7 +329,7 @@ class AssetsController extends Controller
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
// If model_id is already an array, just use it as-is
if (is_array($request->input('model_id'))) {
@@ -352,7 +382,7 @@ class AssetsController extends Controller
}
if ($request->filled('order_number')) {
$assets->where('assets.order_number', '=', strval($request->get('order_number')));
$assets->where('assets.order_number', '=', strval($request->input('order_number')));
}
// This is kinda gross, but we need to do this because the Bootstrap Tables
@@ -418,7 +448,7 @@ class AssetsController extends Controller
// This may not work for all databases, but it works for MySQL
if ($numeric_sort) {
$assets->orderByRaw(DB::getTablePrefix() . 'assets.' . $sort_override . ' * 1 ' . $order);
$assets->orderByRaw(DB::getTablePrefix().'assets.'.$sort_override.' * 1 '.$order);
} else {
$assets->orderBy($sort_override, $order);
}
@@ -428,7 +458,6 @@ class AssetsController extends Controller
break;
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : app('api_offset_value');
$limit = app('api_limit_value');
@@ -436,7 +465,6 @@ class AssetsController extends Controller
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
/**
* Include additional associated relationships
*/
@@ -449,15 +477,16 @@ class AssetsController extends Controller
return (new $transformer)->transformAssets($assets, $total, $request);
}
/**
* Returns JSON with information about an asset (by tag) for detail view.
*
* @param string $tag
* @param string $tag
*
* @since [v4.2.1]
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*/
public function showByTag(Request $request, $tag): JsonResponse | array
public function showByTag(Request $request, $tag): JsonResponse|array
{
$this->authorize('index', Asset::class);
$assets = Asset::where('asset_tag', $tag)->with('assetstatus')->with('assignedTo');
@@ -489,11 +518,14 @@ class AssetsController extends Controller
* Returns JSON with information about an asset (by serial) for detail view.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param string $serial
*
* @param string $serial
*
* @since [v4.2.1]
* @return \Illuminate\Http\JsonResponse
*
* @return JsonResponse
*/
public function showBySerial(Request $request, $serial): JsonResponse | array
public function showBySerial(Request $request, $serial): JsonResponse|array
{
$this->authorize('index', Asset::class);
$assets = Asset::where('serial', $serial)->with([
@@ -532,11 +564,14 @@ class AssetsController extends Controller
* Returns JSON with information about an asset for detail view.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v4.0]
* @return \Illuminate\Http\JsonResponse
*
* @return JsonResponse
*/
public function show(Request $request, $id): JsonResponse | array
public function show(Request $request, $id): JsonResponse|array
{
if ($asset = Asset::with('assetstatus')
->with('assignedTo')->withTrashed()
@@ -546,6 +581,7 @@ class AssetsController extends Controller
return (new AssetsTransformer)->transformAsset($asset, $request->input('components'));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
@@ -556,16 +592,16 @@ class AssetsController extends Controller
$asset = Asset::where('id', $id)->withTrashed()->firstorfail();
$licenses = $asset->licenses()->get();
return (new LicensesTransformer())->transformLicenses($licenses, $licenses->count());
return (new LicensesTransformer)->transformLicenses($licenses, $licenses->count());
}
/**
* Gets a paginated collection for the select2 menus
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0.16]
* @see \App\Http\Transformers\SelectlistTransformer
* @see SelectlistTransformer
*/
public function selectlist(Request $request): array
{
@@ -581,7 +617,7 @@ class AssetsController extends Controller
])->with('model', 'assetstatus', 'assignedTo')
->NotArchived();
if ((Setting::getSettings()->full_multiple_companies_support=='1') && ($request->filled('companyId'))) {
if ((Setting::getSettings()->full_multiple_companies_support == '1') && ($request->filled('companyId'))) {
$assets->where('assets.company_id', $request->input('companyId'));
}
@@ -600,16 +636,14 @@ class AssetsController extends Controller
// they may not have a ->name value but we want to display something anyway
foreach ($assets as $asset) {
$asset->use_text = $asset->present()->fullName;
if (($asset->checkedOutToUser()) && ($asset->assigned)) {
$asset->use_text .= ' → ' . $asset->assigned->getFullNameAttribute();
$asset->use_text .= ' → '.$asset->assigned->display_name;
}
if ($asset->assetstatus->getStatuslabelType() == 'pending') {
$asset->use_text .= '(' . $asset->assetstatus->getStatuslabelType() . ')';
$asset->use_text .= '('.$asset->assetstatus->getStatuslabelType().')';
}
$asset->use_image = ($asset->getImageUrl()) ? $asset->getImageUrl() : null;
@@ -618,21 +652,22 @@ class AssetsController extends Controller
return (new SelectlistTransformer)->transformSelectlist($assets);
}
/**
* Accepts a POST request to create a new asset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param \App\Http\Requests\ImageUploadRequest $request
*
* @param ImageUploadRequest $request
*
* @since [v4.0]
*/
public function store(StoreAssetRequest $request): JsonResponse
{
$asset = new Asset();
$asset->model()->associate(AssetModel::find((int) $request->get('model_id')));
$asset = new Asset;
$asset->model()->associate(AssetModel::find((int) $request->input('model_id')));
$asset->fill($request->validated());
$asset->created_by = auth()->id();
$asset->created_by = auth()->id();
/**
* this is here just legacy reasons. Api\AssetController
@@ -657,9 +692,9 @@ class AssetsController extends Controller
// If input value is null, use custom field's default value
if ($field_val == null) {
Log::debug('Field value for ' . $field->db_column . ' is null');
$field_val = $field->defaultValue($request->get('model_id'));
Log::debug('Use the default fieldset value of ' . $field->defaultValue($request->get('model_id')));
Log::debug('Field value for '.$field->db_column.' is null');
$field_val = $field->defaultValue($request->input('model_id'));
Log::debug('Use the default fieldset value of '.$field->defaultValue($request->input('model_id')));
}
// if the field is set to encrypted, make sure we encrypt the value
@@ -670,7 +705,7 @@ class AssetsController extends Controller
// If input value is null, use custom field's default value
if (($field_val == null) && ($request->has('model_id') != '')) {
$field_val = Crypt::encrypt($field->defaultValue($request->get('model_id')));
$field_val = Crypt::encrypt($field->defaultValue($request->input('model_id')));
} else {
$field_val = Crypt::encrypt($request->input($field->db_column));
}
@@ -682,21 +717,20 @@ class AssetsController extends Controller
}
}
$asset->{$field->db_column} = $field_val;
}
}
if ($asset->save()) {
if ($request->get('assigned_user')) {
if ($request->input('assigned_user')) {
$target = User::find(request('assigned_user'));
} elseif ($request->get('assigned_asset')) {
} elseif ($request->input('assigned_asset')) {
$target = Asset::find(request('assigned_asset'));
} elseif ($request->get('assigned_location')) {
} elseif ($request->input('assigned_location')) {
$target = Location::find(request('assigned_location'));
}
if (isset($target)) {
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset creation', e($request->get('name')));
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset creation', e($request->input('name')));
}
if ($asset->image) {
@@ -713,11 +747,11 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200);
}
/**
* Accepts a POST request to update an asset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function update(UpdateAssetRequest $request, Asset $asset): JsonResponse
@@ -730,7 +764,7 @@ class AssetsController extends Controller
if ($request->has('company_id')) {
$asset->company_id = Company::getIdForCurrentUser($request->validated()['company_id']);
}
if ($request->has('rtd_location_id') && !$request->has('location_id')) {
if ($request->has('rtd_location_id') && ! $request->has('location_id')) {
$asset->location_id = $request->validated()['rtd_location_id'];
}
if ($request->input('last_audit_date')) {
@@ -765,6 +799,7 @@ class AssetsController extends Controller
$field_val = Crypt::encrypt($field_val);
} else {
$problems_updating_encrypted_custom_fields = true;
continue;
}
}
@@ -773,19 +808,22 @@ class AssetsController extends Controller
}
}
if ($asset->save()) {
if (($request->filled('assigned_user')) && ($target = User::find($request->get('assigned_user')))) {
if (($request->filled('assigned_user')) && ($target = User::find($request->input('assigned_user')))) {
$location = $target->location_id;
} elseif (($request->filled('assigned_asset')) && ($target = Asset::find($request->get('assigned_asset')))) {
} elseif (($request->filled('assigned_asset')) && ($target = Asset::find($request->input('assigned_asset')))) {
$location = $target->location_id;
Asset::where('assigned_type', \App\Models\Asset::class)->where('assigned_to', $asset->id)
Asset::where('assigned_type', Asset::class)->where('assigned_to', $asset->id)
->update(['location_id' => $target->location_id]);
} elseif (($request->filled('assigned_location')) && ($target = Location::find($request->get('assigned_location')))) {
} elseif (($request->filled('assigned_location')) && ($target = Location::find($request->input('assigned_location')))) {
$location = $target->id;
}
if (isset($target)) {
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset update', e($request->get('name')), $location);
// Using `->has` preserves the asset name if the name parameter was not included in request.
$asset_name = request()->has('name') ? request('name') : $asset->name;
$asset->checkOut($target, auth()->user(), date('Y-m-d H:i:s'), '', 'Checked out on asset update', $asset_name, $location);
}
if ($asset->image) {
@@ -799,18 +837,20 @@ class AssetsController extends Controller
} else {
return response()->json(Helper::formatStandardApiResponse('success', $asset, trans('admin/hardware/message.update.success')));
// Below is the *correct* return since it uses the transformer, but we have to use the old, flat return for now until we can update Jamf2Snipe and Kanji2Snipe
/// return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.update.success')));
// / return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset), trans('admin/hardware/message.update.success')));
}
}
return response()->json(Helper::formatStandardApiResponse('error', null, $asset->getErrors()), 200);
}
/**
* Delete a given asset (mark as deleted).
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v4.0]
*/
public function destroy($id): JsonResponse
@@ -839,13 +879,13 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
/**
* Restore a soft-deleted asset.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v5.1.18]
*/
public function restore(Request $request, $assetId = null): JsonResponse
@@ -873,7 +913,9 @@ class AssetsController extends Controller
* Checkout an asset by its tag.
*
* @author [N. Butler]
* @param string $tag
*
* @param string $tag
*
* @since [v6.0.5]
*/
public function checkoutByTag(AssetCheckoutRequest $request, $tag): JsonResponse
@@ -881,6 +923,7 @@ class AssetsController extends Controller
if ($asset = Asset::where('asset_tag', $tag)->first()) {
return $this->checkout($request, $asset->id);
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
@@ -888,7 +931,9 @@ class AssetsController extends Controller
* Checkout an asset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v4.0]
*/
public function checkout(AssetCheckoutRequest $request, $asset_id): JsonResponse
@@ -929,11 +974,11 @@ class AssetsController extends Controller
}
if ($request->filled('status_id')) {
$asset->status_id = $request->get('status_id');
$asset->status_id = $request->input('status_id');
}
if (! isset($target)) {
return response()->json(Helper::formatStandardApiResponse('error', $error_payload, 'Checkout target for asset ' . e($asset->asset_tag) . ' is invalid - ' . $error_payload['target_type'] . ' does not exist.'));
return response()->json(Helper::formatStandardApiResponse('error', $error_payload, 'Checkout target for asset '.e($asset->asset_tag).' is invalid - '.$error_payload['target_type'].' does not exist.'));
}
$checkout_at = request('checkout_at', date('Y-m-d H:i:s'));
@@ -944,8 +989,7 @@ class AssetsController extends Controller
// Set the location ID to the RTD location id if there is one
// Wait, why are we doing this? This overrides the stuff we set further up, which makes no sense.
// TODO: Follow up here. WTF. Commented out for now.
// TODO: Follow up here. WTF. Commented out for now.
// if ((isset($target->rtd_location_id)) && ($asset->rtd_location_id!='')) {
// $asset->location_id = $target->rtd_location_id;
@@ -958,12 +1002,13 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', ['asset' => e($asset->asset_tag)], trans('admin/hardware/message.checkout.error')));
}
/**
* Checkin an asset
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $assetId
*
* @param int $assetId
*
* @since [v4.0]
*/
public function checkin(Request $request, $asset_id): JsonResponse
@@ -976,12 +1021,12 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', [
'asset_tag' => e($asset->asset_tag),
'model' => e($asset->model->name),
'model_number' => e($asset->model->model_number)
'model_number' => e($asset->model->model_number),
], trans('admin/hardware/message.checkin.already_checked_in')));
}
$asset->expected_checkin = null;
//$asset->last_checkout = null;
// $asset->last_checkout = null;
$asset->last_checkin = now();
$asset->assignedTo()->disassociate($asset);
$asset->accepted = null;
@@ -1006,10 +1051,10 @@ class AssetsController extends Controller
$asset->status_id = $request->input('status_id');
}
$checkin_at = $request->filled('checkin_at') ? $request->input('checkin_at') . ' ' . date('H:i:s') : date('Y-m-d H:i:s');
$checkin_at = $request->filled('checkin_at') ? $request->input('checkin_at').' '.date('H:i:s') : date('Y-m-d H:i:s');
$originalValues = $asset->getRawOriginal();
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
if (($request->filled('checkin_at')) && ($request->input('checkin_at') != date('Y-m-d'))) {
$originalValues['action_date'] = $checkin_at;
}
@@ -1037,7 +1082,7 @@ class AssetsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', [
'asset_tag' => e($asset->asset_tag),
'model' => e($asset->model->name),
'model_number' => e($asset->model->model_number)
'model_number' => e($asset->model->model_number),
], trans('admin/hardware/message.checkin.success')));
}
@@ -1048,12 +1093,13 @@ class AssetsController extends Controller
* Checkin an asset by asset tag
*
* @author [A. Janes] [<ajanes@adagiohealth.org>]
*
* @since [v6.0]
*/
public function checkinByTag(Request $request, $tag = null): JsonResponse
{
$this->authorize('checkin', Asset::class);
if (null == $tag && null !== ($request->input('asset_tag'))) {
if ($tag == null && null !== ($request->input('asset_tag'))) {
$tag = $request->input('asset_tag');
}
$asset = Asset::where('asset_tag', $tag)->first();
@@ -1063,20 +1109,20 @@ class AssetsController extends Controller
}
return response()->json(Helper::formatStandardApiResponse('error', [
'asset' => e($tag)
], 'Asset with tag ' . e($tag) . ' not found'));
'asset' => e($tag),
], 'Asset with tag '.e($tag).' not found'));
}
/**
* Mark an asset as audited
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
*
* @param int $id
*
* @since [v4.0]
*/
public function audit(Request $request, Asset $asset): JsonResponse
{
$this->authorize('audit', Asset::class);
@@ -1110,20 +1156,21 @@ class AssetsController extends Controller
$payload = [
'id' => $asset->id,
'asset_tag' => $asset->asset_tag,
'note' => $request->input('note'),
'note' => e($request->input('note')),
'status_label' => e($asset->assetstatus?->display_name),
'status_type' => $asset->assetstatus->getStatuslabelType(),
'next_audit_date' => Helper::getFormattedDateObject($asset->next_audit_date),
];
/**
* Update custom fields in the database.
* Validation for these fields is handled through the AssetRequest form request
* $model = AssetModel::find($request->get('model_id'));
*/
* $model = AssetModel::find($request->input('model_id'));
*/
if (($asset->model) && ($asset->model->fieldset)) {
$payload['custom_fields'] = [];
foreach ($asset->model->fieldset->fields as $field) {
if (($field->display_audit=='1') && ($request->has($field->db_column))) {
if (($field->display_audit == '1') && ($request->has($field->db_column))) {
if ($field->field_encrypted == '1') {
if (Gate::allows('assets.view.encrypted_custom_fields')) {
if (is_array($request->input($field->db_column))) {
@@ -1139,7 +1186,7 @@ class AssetsController extends Controller
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
$payload['custom_fields'][$field->db_column] = $request->input($field->db_column);
$payload['custom_fields'][$field->db_column] = $request->input($field->db_column);
}
}
@@ -1150,10 +1197,9 @@ class AssetsController extends Controller
// Validate the rest of the data before we turn off the event dispatcher
if ($asset->isInvalid()) {
return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag' => $asset->asset_tag], $asset->getErrors()));
return response()->json(Helper::formatStandardApiResponse('error', ['asset_tag' => $asset->asset_tag], $asset->getErrors()));
}
/**
* Even though we do a save() further down, we don't want to log this as a "normal" asset update,
* which would trigger the Asset Observer and would log an asset *update* log entry (because the
@@ -1167,12 +1213,10 @@ class AssetsController extends Controller
* We handle validation on the save() by checking if the asset is valid via the ->isValid() method,
* which manually invokes Watson Validating to make sure the asset's model is valid.
*
* @see \App\Observers\AssetObserver::updating()
* @see \App\Models\Asset::save()
* @see AssetObserver::updating()
* @see Asset::save()
*/
$asset->unsetEventDispatcher();
$asset->unsetEventDispatcher();
/**
* Invoke Watson Validating to check the asset itself and check to make sure it saved correctly.
@@ -1180,26 +1224,25 @@ class AssetsController extends Controller
*/
if ($asset->isValid() && $asset->save()) {
$asset->logAudit(request('note'), request('location_id'), null, $originalValues);
return response()->json(Helper::formatStandardApiResponse('success', $payload, trans('admin/hardware/message.audit.success')));
}
}
// No matching asset for the asset tag that was passed.
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
/**
* Returns JSON listing of all requestable assets
*
* @author [A. Gianotto] [<snipe@snipe.net>]
*
* @since [v4.0]
*/
public function requestable(Request $request): JsonResponse | array
public function requestable(Request $request): JsonResponse|array
{
$this->authorize('viewRequestable', Asset::class);
@@ -1213,7 +1256,7 @@ class AssetsController extends Controller
'expected_checkin',
];
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
$all_custom_fields = CustomField::all(); // used as a 'cache' of custom fields throughout this page load
foreach ($all_custom_fields as $field) {
$allowed_columns[] = $field->db_column_name();
@@ -1233,9 +1276,6 @@ class AssetsController extends Controller
'requests'
);
if ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
}
@@ -1281,15 +1321,24 @@ class AssetsController extends Controller
return (new AssetsTransformer)->transformRequestedAssets($assets, $total);
}
public function assignedAssets(Request $request, Asset $asset) : JsonResponse | array
public function assignedAssets(Request $request, Asset $asset): JsonResponse|array
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
return [];
// to do
$query = Asset::where([
'assigned_to' => $asset->id,
'assigned_type' => Asset::class,
]);
$total = $query->count();
$assets = $query->applyOffsetAndLimit($total)->get();
return (new AssetsTransformer)->transformAssets($assets, $total);
}
public function assignedAccessories(Request $request, Asset $asset) : JsonResponse | array
public function assignedAccessories(Request $request, Asset $asset): JsonResponse|array
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
@@ -1303,16 +1352,29 @@ class AssetsController extends Controller
$total = $accessory_checkouts->count();
$accessory_checkouts = $accessory_checkouts->skip($offset)->take($limit)->get();
return (new AssetsTransformer)->transformCheckedoutAccessories($accessory_checkouts, $total);
}
public function assignedComponents(Request $request, Asset $asset): JsonResponse|array
{
$this->authorize('view', Asset::class);
$this->authorize('view', $asset);
$asset->loadCount('components');
$total = $asset->components_count;
$components = $asset->load(['components' => fn ($query) => $query->applyOffsetAndLimit($total)])->components;
return (new ComponentsTransformer)->transformComponents($components, $total);
}
/**
* Generate asset labels by tag
*
*
* @author [Nebelkreis] [https://github.com/NebelKreis]
*
* @param Request $request Contains asset_tags array of asset tags to generate labels for
*
* @param Request $request Contains asset_tags array of asset tags to generate labels for
* @return JsonResponse Returns base64 encoded PDF on success, error message on failure
*/
public function getLabels(Request $request): JsonResponse
@@ -1320,17 +1382,17 @@ class AssetsController extends Controller
try {
$this->authorize('view', Asset::class);
// Validate that asset tags were provided in the request
if (!$request->filled('asset_tags')) {
return response()->json(Helper::formatStandardApiResponse('error', null,
// Validate that asset tags were provided in the request
if (! $request->filled('asset_tags')) {
return response()->json(Helper::formatStandardApiResponse('error', null,
trans('admin/hardware/message.no_assets_selected')), 400);
}
// Convert asset tags from request into collection and fetch matching assets
// Convert asset tags from request into collection and fetch matching assets
$asset_tags = collect($request->input('asset_tags'));
$assets = Asset::whereIn('asset_tag', $asset_tags)->get();
// Return error if no assets were found for the provided tags
// Return error if no assets were found for the provided tags
if ($assets->isEmpty()) {
return response()->json(Helper::formatStandardApiResponse('error', null,
trans('admin/hardware/message.does_not_exist')), 404);
@@ -1341,27 +1403,27 @@ class AssetsController extends Controller
// Check if logo file exists in storage and disable logo if not found
// This prevents errors when trying to include a non-existent logo in the PDF
$settings->label_logo = ($original_logo = $settings->label_logo) && !Storage::disk('public')->exists('/' . $original_logo) ? null : $settings->label_logo;
$settings->label_logo = ($original_logo = $settings->label_logo) && ! Storage::disk('public')->exists('/'.$original_logo) ? null : $settings->label_logo;
$label = new Label;
$label = new Label();
if (!$label) {
if (! $label) {
throw new \Exception('Label object could not be created');
}
// Configure label with assets and settings
// bulkedit=false and count=0 are default values for label generation
$label = $label->with('assets', $assets)
->with('settings', $settings)
->with('bulkedit', false)
->with('count', 0);
->with('settings', $settings)
->with('bulkedit', false)
->with('count', 0);
// Generate PDF using callback function
// The callback captures the PDF content in $pdf_content variable
$pdf_content = '';
$label->render(function($pdf) use (&$pdf_content) {
$label->render(function ($pdf) use (&$pdf_content) {
$pdf_content = $pdf->Output('', 'S');
return $pdf;
});
@@ -1373,21 +1435,21 @@ class AssetsController extends Controller
$encoded_content = base64_encode($pdf_content);
return response()->json(Helper::formatStandardApiResponse('success', [
'pdf' => $encoded_content
'pdf' => $encoded_content,
], trans('admin/hardware/message.labels_generated')));
} catch (\Exception $e) {
return response()->json(Helper::formatStandardApiResponse('error', [
'error_message' => $e->getMessage(),
'error_line' => $e->getLine(),
'error_file' => $e->getFile()
'error_file' => $e->getFile(),
], trans('admin/hardware/message.error_generating_labels')), 500);
}
} catch (\Exception $e) {
return response()->json(Helper::formatStandardApiResponse('error', [
'error_message' => $e->getMessage(),
'error_line' => $e->getLine(),
'error_file' => $e->getFile()
'error_file' => $e->getFile(),
], $e->getMessage()), 500);
}
}

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