Compare commits

...

341 Commits

Author SHA1 Message Date
snyk-bot
ba636caeb4 fix: upgrade webpack from 5.65.0 to 5.72.0
Snyk has created this PR to upgrade webpack from 5.65.0 to 5.72.0.

See this package in npm:
https://www.npmjs.com/package/webpack

See this project in Snyk:
https://app.snyk.io/org/snipe/project/3d53e1dd-b8bf-46b5-ba61-18ce26933166?utm_source=github&utm_medium=referral&page=upgrade-pr
2022-05-14 23:02:29 +00:00
snipe
a050be873b Merge pull request #11080 from snipe/fixes/remove_sr_only_for_backup_file
Removed sr-only class for now - not sure why it’s interfering with the upload button
2022-05-14 11:02:55 -07:00
snipe
ed8e82a606 Removed sr-only class for now - not sure why it’s interfering with the submit button JS
Signed-off-by: snipe <snipe@snipe.net>
2022-05-14 11:02:02 -07:00
snipe
8eed01bfa4 Merge pull request #11078 from snipe/fixes/show_encrypted_on_custom_field_view
Adds encrypted status to custom fields overview
2022-05-14 10:25:45 -07:00
snipe
418131df69 Merge pull request #11079 from snipe/fixes/adds_missing_backups_help_string
Fixed missing backups help string
2022-05-14 10:25:33 -07:00
snipe
5030c7e5ff Added missing backups help string
Signed-off-by: snipe <snipe@snipe.net>
2022-05-14 10:24:03 -07:00
snipe
91fb27ee00 Adds encrypted status to custom fields overview
Signed-off-by: snipe <snipe@snipe.net>
2022-05-14 10:20:04 -07:00
snipe
5f1f6baee9 Fixed unrelated typo
Signed-off-by: snipe <snipe@snipe.net>
2022-05-14 10:19:12 -07:00
snipe
cc35a9ab6b Merge pull request #11077 from snipe/fixes/11075_wrong_var_for_licenses
Fix route for people file deletion
2022-05-14 08:26:29 -07:00
snipe
3fe0e04d52 Fix roite for people file deletion
Signed-off-by: snipe <snipe@snipe.net>
2022-05-14 08:25:22 -07:00
snipe
d904fb1d80 Merge pull request #11076 from johnson-yi/fixes/saml_slo
Fixes #10706 - Fix saml slo for logout
2022-05-14 08:10:50 -07:00
Johnson Yi
4401dab8d6 fix saml slo for logout 2022-05-14 11:59:34 +00:00
snipe
c4d75dca68 Merge pull request #11073 from snipe/features/add_filesize_to_object_uploads
Fixed #11052 - add file sizes to upload displays
2022-05-13 19:39:07 -07:00
snipe
3a31104b5c Fixed #11052 - add file sizes to upload displays
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 19:33:14 -07:00
snipe
3ff745937a Merge pull request #11070 from snipe/fixes/11068_use_statement_for_login_attempts
Added missing use statement
2022-05-13 16:46:39 -07:00
snipe
333aa05809 Added missing use statement
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 16:46:13 -07:00
snipe
c5ec3efc70 Merge pull request #11065 from snipe/fixes/double_encoding_for_custom_fields
Fixed  #11014 - double encoding for custom fields
2022-05-13 16:12:24 -07:00
snipe
747b58cb59 Bumped laravel version in readme
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 16:09:00 -07:00
snipe
8794936e1a Merge pull request #11067 from uberbrady/master
Fix cancel button in two-factor sign-in screen
2022-05-13 14:56:00 -07:00
Brady Wetherington
ec65f7c72a Merge remote-tracking branch 'upstream/master' 2022-05-13 14:50:08 -07:00
Brady Wetherington
b6284e6651 Fix 'cancel' button in two-factor screen 2022-05-13 14:49:37 -07:00
snipe
5cc4f9bc2a Merge pull request #11066 from uberbrady/fix_two_factor_v6
Switch the barcode backend to SVG, and fix the two-factor middleware
2022-05-13 14:38:15 -07:00
snipe
d8a4509b22 Fix logout on 2fa
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 14:36:20 -07:00
Brady Wetherington
0ddb0f2c81 Switch the barcode backend to SVG, and fix the two-factor middleware 2022-05-13 14:22:27 -07:00
snipe
ce5ae80755 Regenerated assets
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 13:44:51 -07:00
snipe
c0868a68fb Removed console.log cruft
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 13:44:38 -07:00
snipe
eccc5e7cf0 Make logout a post on 2FA cancel
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 13:35:13 -07:00
snipe
1424e168d6 Switch logout back to post
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 13:30:11 -07:00
snipe
bda5d13c2b Fixed route name for appending models to kit
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 13:26:01 -07:00
snipe
7c82f5670b One more 2FA login change
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 12:48:55 -07:00
snipe
32bbe7c715 Fixed 2FA middleware
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 12:45:54 -07:00
snipe
293e3e02e4 Updated cookie name
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 12:07:00 -07:00
snipe
13d81f0a0c Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 11:55:19 -07:00
snipe
64dc6fbd9c Switched branch to master
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 11:52:27 -07:00
snipe
e55aac7fea Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 11:51:41 -07:00
snipe
6fc222a648 Fixed #11014 - Removed double escaping on custom fields
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:45:00 -07:00
snipe
b36bfad0ca Set maxlength on password confirmation form element
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:27:47 -07:00
snipe
6b27c0311d Updated help text on groups for more info on deselecting
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:23:12 -07:00
snipe
93454decec Fixed broken quotes
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:14:53 -07:00
snipe
47fb323d90 Adding feature request file back
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:03:48 -07:00
snipe
e4bd5be4fe Try deleting the issue template file because wtf?
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 05:03:27 -07:00
snipe
cf4b418b22 Merge pull request #11063 from snipe/fixes/set_maxlength_for_user_fields
Sets maxlength of user fields to 191
2022-05-13 04:56:09 -07:00
snipe
deb2d958d8 Sets maxlength of user fields to 191
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 04:54:12 -07:00
snipe
c3e8c35063 Replaced feature request
Signed-off-by: snipe <snipe@snipe.net>
2022-05-12 22:15:02 -07:00
snipe
aa04a9b2e2 Clear feature template to see if it fixes docker issue
Signed-off-by: snipe <snipe@snipe.net>
2022-05-12 22:14:49 -07:00
snipe
0cb6a9ce69 Bumped tableexport plugin
Signed-off-by: snipe <snipe@snipe.net>
2022-05-12 22:14:09 -07:00
snipe
ef1eb15a91 Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/permissions.php
2022-05-12 09:31:42 -07:00
snipe
714f6d80f2 Merge pull request #11059 from Godmartinz/feature/sc-19017/change-bootstrap-tables-export-to-be-landscape
Bootstrap tables export as landscape
2022-05-12 09:28:47 -07:00
Godfrey M
54f5e268a0 removed change from tableExport.js 2022-05-12 09:20:19 -07:00
Godfrey M
83d0743ab8 saves bootstrap pdf tables in landscape 2022-05-12 09:18:44 -07:00
snipe
722e88a472 Merge pull request #11058 from snipe/fixes/kit_permissions
Fixed kit checkout permissions if admin is not superadmin
2022-05-11 20:11:13 -07:00
snipe
91cc08d3fb Merge pull request #11050 from uberbrady/fix_encrypted_textareas
Make sure to decrypt Textareas as well as input type=text
2022-05-11 19:03:02 -07:00
snipe
c52faaf23d Added checkout to permissions check
Signed-off-by: snipe <snipe@snipe.net>
2022-05-11 19:02:23 -07:00
snipe
c0ef27fc9e Removed kit checkout permission - it’s just confusing
Signed-off-by: snipe <snipe@snipe.net>
2022-05-11 19:02:11 -07:00
snipe
5a5bb79188 Merge pull request #11055 from uberbrady/update_livewire_assets
Update Livewire assets, and make Composer auto-update Livewire assets
2022-05-11 14:02:04 -07:00
Brady Wetherington
35450aebdd Update Livewire assets, and make Composer auto-update Livewire assets as needed 2022-05-11 14:00:10 -07:00
Brady Wetherington
e3696ff84c Make sure to decrypt Textareas as well as input type=text 2022-05-10 18:39:03 -07:00
snipe
446e44deb6 Merge pull request #11048 from Godmartinz/bug/sc-18989/purchase-cost-can-be-negative
Fixed validation for purchase cost allowed to be negative
2022-05-10 17:36:01 -07:00
snipe
816437b4d8 Updated hash
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 17:28:11 -07:00
snipe
5dfdf73e01 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 17:28:06 -07:00
snipe
780222d372 Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Auth/LoginController.php
#	resources/views/users/print.blade.php
2022-05-10 17:26:26 -07:00
Godfrey M
2c1f368828 adds validation for all purchase costs variables 2022-05-10 16:26:06 -07:00
Godfrey M
33b1ab3658 prevents values for assets being negative through validation 2022-05-10 16:19:06 -07:00
snipe
f4650c65db Clearer phrasing for log
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 13:00:48 -07:00
snipe
d3830a44d8 Added more verbose messaging
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:40:50 -07:00
snipe
5869b6ed0c And still more debugging
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:38:46 -07:00
snipe
4fccf4ddc4 Few more log lines
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:27:42 -07:00
snipe
646166b2b6 Removed debug line
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:16:07 -07:00
snipe
f4e737eaf3 More SAML debugging
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:14:22 -07:00
snipe
f572eaa421 Added debugging for SAML login
Signed-off-by: snipe <snipe@snipe.net>
2022-05-10 12:07:07 -07:00
snipe
72fe0d22ea Merge pull request #11040 from snipe/uberbrady-patch-2
Remove extraneous `{` in migration
2022-05-09 11:59:23 -07:00
Brady Wetherington
5357b1fa10 Remove extraneous { in migration
It looks like we inadvertently got an extra `{` in here - I noticed it because my IDE threw a big red dot on this migration. We must've accidentally put that in when we were adding the 'id' column.
2022-05-09 11:56:05 -07:00
snipe
f3fc81b860 Merge pull request #11039 from snipe/features/adds_seat_id_to_seats_ui
Added license seat ID to the UI
2022-05-09 10:59:47 -07:00
snipe
dc8669121d Added license seat ID to the UI
Signed-off-by: snipe <snipe@snipe.net>
2022-05-09 10:59:06 -07:00
snipe
dfd4d54433 Fixed route name
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 15:46:25 -07:00
snipe
e353780b1b Merge pull request #11027 from snipe/features/add_bulk_edit_to_other_asset_views
Fixed #11026 - add bulk edit to other asset views
2022-05-06 14:21:10 -07:00
snipe
220f94faee Check that the session key exists
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 14:10:47 -07:00
snipe
d5edb0908b Added translation string to the correct file this time
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 14:07:05 -07:00
snipe
89fee23d32 Commented out console log that was pooping up the joint
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 08:34:30 -07:00
snipe
2982d78899 Added translation for no assets selected
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:42:02 -07:00
snipe
22ec3c1398 Use error style instead of warn/info when nothing was selected
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:41:52 -07:00
snipe
caf17d4f25 Fixed wrong variable name
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:41:32 -07:00
snipe
e1b24bb763 Added a comment
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:30:21 -07:00
snipe
304cd75af5 Fixed extra divs
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:20:44 -07:00
snipe
59a0f4722b Use partial for asset bulk edit
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:20:35 -07:00
snipe
418a797e7e Use partial for asset bulk edit
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:20:29 -07:00
snipe
adc017db23 Added checkbox to audit listing
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:16:13 -07:00
snipe
0c20543c49 Remove conflicting toolbar call in model listing
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:15:58 -07:00
snipe
fe98e505fe Use the new partial for bulk asset edit
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:15:31 -07:00
snipe
78a9c16761 Minor formatting improvements
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:15:10 -07:00
snipe
c4bf0045c8 Fixed stray < tag
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:14:55 -07:00
snipe
c64f34ebcc Check the "do not change” radio button by default
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:14:31 -07:00
snipe
76213ec3d9 Create a session on bulk actions, store it for redirect, then delete it
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:14:08 -07:00
snipe
243739e9c3 Added missing gate for bulk checkout
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:13:36 -07:00
snipe
cf0548bd1f Create a new partial for asset bulk actions
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 05:11:52 -07:00
snipe
a43b54cc8d Bumped hash for clarity
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 02:13:56 -07:00
snipe
caef98d36d Patched #11025 to develop
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 02:06:12 -07:00
snipe
f91be34baf Merge pull request #11025 from snipe/fixes/missed_a_few_trans_strings
Fixed #10890 - Missed a few hard coded english strings
2022-05-06 02:02:15 -07:00
snipe
fba731ac1c Missed a few hard coded english strings
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 02:01:17 -07:00
snipe
784bf4d784 Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	.github/ISSUE_TEMPLATE/feature_request.yml
#	app/Http/Controllers/CustomFieldsetsController.php
#	app/Http/Controllers/ReportsController.php
#	config/version.php
#	package-lock.json
#	package.json
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
#	resources/views/users/print.blade.php
#	webpack.mix.js
2022-05-06 01:52:43 -07:00
snipe
6304709c77 Merge pull request #11023 from snipe/fixes/10890_use_translation_strings_in_assigned_printout
Fixed #10890 - Use translation strings in assigned printout instead of hardcoded English
2022-05-06 01:33:46 -07:00
snipe
39ee825ba2 Fixed html lang specification
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 01:32:20 -07:00
snipe
c0e9393092 Fixed #10890 - use translation strings in user asset printout
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 01:30:58 -07:00
snipe
1ac626a43a Merge pull request #11022 from snipe/fixes/specify_full_url_in_favicons
Use full app_url in favicon paths
2022-05-06 00:22:14 -07:00
snipe
3a415b2fce Use full app_url in favicon paths
Signed-off-by: snipe <snipe@snipe.net>
2022-05-06 00:19:32 -07:00
snipe
b20921cb62 Removed duplicate session regenerate
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 21:35:05 -07:00
snipe
2e03270fca Updated feature request YAML
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 19:06:25 -07:00
snipe
5370c2ca42 Merge pull request #10941 from Godmartinz/gh8856_signature_not_showing_in_print_all
[Fix] changes the query for the accept signature on print blade
2022-05-05 13:32:37 -07:00
snipe
0939591efb Merge pull request #11003 from inietov/fixes/integrity_constraint_violation_column_order_cannot_be_null_develop
Fixes QueryException Integrity constraint violation: Column 'order' cannot be null for develop
2022-05-05 13:28:00 -07:00
snipe
a859eac4a0 Merge pull request #11002 from inietov/fixes/integrity_constraint_violation_column_order_cannot_be_null
Fixes QueryException Integrity constraint violation:  Column 'order' cannot be null
2022-05-05 13:27:45 -07:00
snipe
35d81be8d1 Merge pull request #11018 from snipe/update_bootstrap_table_to_latest
Update BS tables and table export to latest
2022-05-05 13:23:55 -07:00
snipe
a5760cfe7b Update BS tables and table export to latest
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 12:22:20 -07:00
snipe
cab29745e7 More small tweaks to feature request template
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 11:17:31 -07:00
snipe
41fa42f7d8 FR updates
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 11:14:55 -07:00
snipe
eb49c33e1b Reverting feature request YAML
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 11:10:11 -07:00
snipe
31f2b73e5a Bumped version to GM
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 10:55:29 -07:00
snipe
953b3a8d6e Merge pull request #10993 from snipe/rcs/merge_master_into_develop_for_rc_8
Merge master into develop for RC 6.0.0-8
2022-05-05 10:53:17 -07:00
snipe
c01f0880ef Changed language string
Signed-off-by: snipe <snipe@snipe.net>
2022-05-05 10:52:57 -07:00
snipe
c838354b74 Merge pull request #11016 from benwa/patch-1
Update feature_request.yml
2022-05-05 10:19:37 -07:00
Bennett Blodinger
46c4d1a3d6 Update feature_request.yml
Correcting the label/description fields
2022-05-05 09:49:41 -05:00
snipe
57ed3afcc4 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-05-04 16:50:50 -07:00
snipe
5c78a15835 Removed dupe lines from merge conflict
Signed-off-by: snipe <snipe@snipe.net>
2022-05-03 12:56:29 -07:00
snipe
011ab604f2 Merge pull request #11001 from inietov/fixes/download_all_triggers_getDisplayNameAttribute_on_null_develop
Fixes Activity Report Download all action fails creating the CSV report for develop.
2022-05-03 20:52:47 +01:00
snipe
fd71b48489 Merge pull request #11000 from inietov/fixes/download_all_triggers_getDisplayNameAttribute_on_null
Fixes Activity Report Download all action fails creating the CSV report.
2022-05-03 20:52:42 +01:00
Ivan Nieto Vivanco
37805509da Adds an integer casting to the order input field so it cannot be null 2022-05-01 15:27:05 -05:00
Ivan Nieto Vivanco
01232d9a54 Adds an integer casting to the order input field so it cannot be null 2022-05-01 15:16:56 -05:00
Ivan Nieto Vivanco
ac8da55270 Evaluate if an item still exists before trying to get its name in the report 2022-05-01 13:25:55 -05:00
Ivan Nieto Vivanco
1cbbf8f976 Evaluate if an item still exists before trying to get its name in the report 2022-05-01 13:11:05 -05:00
snipe
313150e6dd Merge pull request #10998 from johnson-yi/fixes/saml_logout
Fixes #10980 - Prevent immediate saml login after normal logout
2022-04-30 19:49:54 +01:00
Johnson Yi
281c6df7b3 Customize login page when REQUIRE_SAML is enabled 2022-04-29 15:35:40 +00:00
Johnson Yi
92fe1287ea Do not saml login automatically after normal logout 2022-04-29 15:35:08 +00:00
snipe
5a8c3444e2 Merge pull request #10994 from snipe/fixes/use_str_slug_for_fileName_export
Fixed model export filename to use str_slug for filename for JS export (like we do elsewhere)
2022-04-28 21:58:28 +01:00
snipe
edab4e1371 Uses str_slug for filename for JS export (like we do elsewhere)
Signed-off-by: snipe <snipe@snipe.net>
2022-04-28 21:55:26 +01:00
snipe
150724b744 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-04-28 17:51:27 +01:00
snipe
9aac1cbba4 Merge branch 'master' into rcs/merge_master_into_develop_for_rc_8
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	README.md
#	app/Console/Commands/MoveUploadsToNewDisk.php
#	app/Http/Controllers/ActionlogController.php
#	app/Http/Controllers/Api/LicensesController.php
#	app/Http/Controllers/Api/StatuslabelsController.php
#	app/Http/Controllers/Assets/AssetCheckinController.php
#	app/Http/Controllers/Licenses/LicensesController.php
#	app/Http/Controllers/Users/BulkUsersController.php
#	app/Http/Requests/AssetCheckoutRequest.php
#	app/Importer/LicenseImporter.php
#	app/Models/Actionlog.php
#	app/Models/License.php
#	app/Models/User.php
#	app/Observers/AssetObserver.php
#	composer.lock
#	config/version.php
#	database/factories/LicenseFactory.php
#	database/migrations/2015_09_21_235926_create_custom_field_custom_fieldset.php
#	database/migrations/2018_10_18_191228_add_kits_licenses_table.php
#	database/migrations/2018_10_19_153910_add_kits_table.php
#	database/migrations/2018_10_19_154013_add_kits_models_table.php
#	database/migrations/2019_02_07_185953_add_kits_consumables_table.php
#	database/migrations/2019_02_07_190030_add_kits_accessories_table.php
#	package-lock.json
#	package.json
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
#	resources/lang/ar/general.php
#	resources/lang/ar/passwords.php
#	resources/lang/cs/general.php
#	resources/lang/cs/passwords.php
#	resources/lang/de/admin/custom_fields/general.php
#	resources/lang/de/admin/settings/general.php
#	resources/lang/de/admin/settings/message.php
#	resources/lang/fr/admin/custom_fields/general.php
#	resources/lang/fr/admin/hardware/general.php
#	resources/lang/fr/admin/locations/table.php
#	resources/lang/fr/admin/settings/message.php
#	resources/lang/hu/admin/custom_fields/general.php
#	resources/lang/hu/admin/settings/general.php
#	resources/lang/hu/general.php
#	resources/lang/it/admin/settings/general.php
#	resources/lang/nl/admin/custom_fields/general.php
#	resources/lang/nl/admin/settings/general.php
#	resources/lang/nl/general.php
#	resources/lang/pl/admin/custom_fields/general.php
#	resources/lang/sv-SE/passwords.php
#	resources/lang/tr/general.php
#	resources/views/hardware/view.blade.php
#	resources/views/partials/bootstrap-table.blade.php
#	resources/views/reports/activity.blade.php
#	resources/views/users/print.blade.php
2022-04-28 17:49:06 +01:00
snipe
173ec44b9e Merge pull request #10991 from snipe/fixes/added_gate_to_requested_assets
Added access gate to the requested assets index
2022-04-28 15:47:54 +01:00
snipe
2e9cf8fa87 Added access gate to the requested assets index
Signed-off-by: snipe <snipe@snipe.net>
2022-04-28 15:45:37 +01:00
snipe
126bb486b5 Add @chrisweirich as a contributor 2022-04-28 15:30:12 +01:00
snipe
c8d5445178 Merge pull request #10982 from Trizelos/develop
Fixed #10983: Possibility to set region for AWS (SES)
2022-04-28 14:23:39 +01:00
Christian Weirich
4be6288ae3 Possibility to set region for AWS (SES) 2022-04-27 15:26:33 +02:00
snipe
0abc108686 Merge pull request #10971 from snipe/fixes/potential_xss_in_depreciation
Escape checkout target name
2022-04-24 15:27:58 +01:00
snipe
f623d05d0c Escape checkout target name
Signed-off-by: snipe <snipe@snipe.net>
2022-04-24 15:27:11 +01:00
snipe
ef7f21e3ba Merge pull request #10952 from Godmartinz/fixes_double_updates
fixes double updates from action log and history
2022-04-21 21:25:29 +01:00
Godfrey M
91694064fb fixes double updates from action log and history 2022-04-18 11:30:24 -07:00
snipe
9a0219eff7 Merge pull request #10943 from snipe/fixes/add_status_id_to_checkout_api
Added status_id to asset checkout API
2022-04-15 14:38:44 +01:00
snipe
b2087a9947 Adds validator to make sure the status ID is deployable
Signed-off-by: snipe <snipe@snipe.net>
2022-04-15 13:06:55 +01:00
snipe
6b1329133b Adds status ID to asset checkout API endpoint
Signed-off-by: snipe <snipe@snipe.net>
2022-04-15 13:06:35 +01:00
snipe
e4ef970934 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-04-15 12:26:58 +01:00
snipe
f211c11034 Merge pull request #10942 from snipe/fixes/xss_user_requested
Fixes potential XSS vuln in user requestable results
2022-04-15 12:25:56 +01:00
snipe
698c7f4904 Fixes potential XSS vuln in user requestable results
Signed-off-by: snipe <snipe@snipe.net>
2022-04-15 12:22:20 +01:00
Godfrey M
380cb38b7d changes the query for the accept signature on print blade 2022-04-14 17:17:28 -07:00
snipe
7479f5f12d Merge pull request #10936 from snipe/fixes/backport_licenses_loading
Ports #10494 to master
2022-04-12 21:31:19 +01:00
snipe
161c6b7d31 Removed security-advisories package for now
Signed-off-by: snipe <snipe@snipe.net>
2022-04-12 21:17:29 +01:00
snipe
1441cf9f4f Ports #10494 to master
Signed-off-by: snipe <snipe@snipe.net>
2022-04-12 21:04:57 +01:00
snipe
270143bb46 Merge pull request #10935 from uberbrady/backport_license_index_master
Backport the license index fix from Develop onto the v5 branch
2022-04-12 20:14:00 +01:00
Brady Wetherington
6b0a1ab3fb Backport the license index fix from Develop onto the v5 branch 2022-04-12 20:11:25 +01:00
snipe
809fe7f6d8 Compiled assets
Signed-off-by: snipe <snipe@snipe.net>
2022-04-12 19:28:58 +01:00
snipe
bdbb0c0ce5 Merge pull request #10928 from uberbrady/fix_remembered_columns_develop
Fix #10482 for develop - Downgrade bootstrap-table to fix remembered-columns feature
2022-04-11 18:57:24 +01:00
snipe
5fba8202d6 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2022-04-11 15:40:58 +01:00
snipe
61f5825c69 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-04-11 15:37:38 +01:00
snipe
5314ef97e5 Updated assets
Signed-off-by: snipe <snipe@snipe.net>
2022-04-11 15:08:39 +01:00
snipe
b7fbc5d018 Merge pull request #10927 from uberbrady/fix_columns_master
Fixes #10482 - Downgrade bootstrap-table so columns stay remembered
2022-04-11 15:03:08 +01:00
Brady Wetherington
3472aa9a46 Downgrade bootstrap-table to fix remembered-columns feature 2022-04-11 14:41:46 +01:00
Brady Wetherington
211a0820e5 Downgrade bootstrap-table so columns stay remembered 2022-04-11 14:29:59 +01:00
snipe
7b891f0952 Merge pull request #10913 from inietov/fixes/bulk_user_edit_not_updating_asset_locations
Fixes Bulk user edit not updating checked out asset locations
2022-04-07 19:41:01 +01:00
snipe
8218b5ef47 Merge pull request #10914 from inietov/fixes/bulk_user_edit_not_updating_asset_locations_develop
Fixes Bulk user edit not updating checked out asset locations
2022-04-07 19:40:42 +01:00
snipe
b73542664b Merge pull request #10919 from Godmartinz/gh10866-checkin_time_always_show_12am
Fixed #10866 - Checkin time always shows 12am
2022-04-07 19:40:11 +01:00
snipe
6c1bb89776 Merge pull request #10920 from Godmartinz/Fixed_#10866_-_Checkin_time_always_shows_12am-master
Fixed #10866 - action_date for check-in not including H:i:s
2022-04-07 19:39:59 +01:00
Godfrey M
3eb7a87a66 fixes action_date for check-in not including H:i:s 2022-04-07 11:24:12 -07:00
Godfrey M
1325628039 fixes typo 2022-04-07 11:18:16 -07:00
Godfrey M
8498082f21 fixes typo 2022-04-07 11:16:40 -07:00
Godfrey M
6dc45c189b removed deadspace 2022-04-07 11:10:36 -07:00
Godfrey M
5d0a1ebb7a fixes action_date for check-in not including H:i:s 2022-04-07 11:08:43 -07:00
snipe
30a5d57ce5 Merge pull request #10917 from uberbrady/bs_tables_export_without_html_develop
This disables the display of HTML content during exports
2022-04-07 16:44:36 +01:00
snipe
0cb4caa4cf Merge pull request #10918 from uberbrady/bs_tables_export_without_html_master
This disables the display of HTML content during exports (cherry-picked for master)
2022-04-07 16:44:21 +01:00
Brady Wetherington
4db7cb0e21 This disables the display of HTML content during exports, without enabling XSS attacks 2022-04-07 16:37:32 +01:00
Brady Wetherington
5a776af091 This disables the display of HTML content during exports, without enabling XSS attacks 2022-04-07 16:27:06 +01:00
Ivan Nieto Vivanco
e1927aa154 Update Assets locations when user's location changes whey they got bulk-edited 2022-04-06 19:23:49 -05:00
Ivan Nieto Vivanco
6529a75683 Update Assets locations when user's location changes whey they got bulk-edited 2022-04-06 19:12:02 -05:00
snipe
4b255ada70 Removed first()
Signed-off-by: snipe <snipe@snipe.net>
2022-04-06 12:08:51 +01:00
snipe
01342ca266 Fixed activity report
Signed-off-by: snipe <snipe@snipe.net>
2022-04-05 22:58:25 +01:00
snipe
8195a664a9 Merge pull request #10883 from inietov/fixes/update_existing_value_import_develop
Fixes Importer always update existing values develop
2022-04-05 21:11:24 +01:00
snipe
87fc856361 Merge pull request #10902 from snipe/fixes/added_primary_key_to_custom_fields_pivot
Fixed #10892 - MySQL 8 compatibilty requires primary key
2022-04-05 20:35:14 +01:00
snipe
7385a0765e Merge pull request #10889 from uberbrady/scim_squashed_grok_library
SCIM integration using laravel-scim-server library
2022-04-05 20:32:16 +01:00
Brady Wetherington
599d725d55 Just needed to adjust the hash so that the composer.lock is correct 2022-04-05 20:31:34 +01:00
snipe
3dd7c00a0b Update migration back in time
Signed-off-by: snipe <snipe@snipe.net>
2022-04-05 20:31:17 +01:00
Brady Wetherington
9bd04eb8c9 Use our forked version of the Laravel-SCIM-Server package (hopefully temporary) 2022-04-05 20:26:40 +01:00
Brady Wetherington
6756dd193e SCIM integration using the 're-do-the routes' approach, which seems like a dead-end
Cleaning up routes to match laravel-scim-server's recommended implementation

Some actually *working* changes for SCIM support?!

Whoops, forgot my route file

Fix public SCIM routes

Removed Ziggy, removed old generated file, yanked Ziggy references

Resolves the first set of comments for SCIM

Ensure all /api routes have baseUrl prepended

Fix the parent:: call to be, uh, actually correct :P

Clarify the route-ordering, as it is quite tricky

This gets it so that users can actually be saved..

Work around the lack of callbacks with some inheritance

Mapped a bunch more fields from SCIM into Snipe-IT's user table

More baseUrl shenanigans since we yanked Ziggy :/

Properly map job title and work with some other necessary attributes

Map more fields...

Finalized basic mapping for core and enterprise namespaces

Latest tuned settings for SCIM config to work with Azure (and others)
2022-04-05 20:26:37 +01:00
snipe
56ee5c50a9 Merge pull request #10897 from ubc-cpsc/develop
Security updates to enshrined/svg-sanitize and guzzlehttp/psr7
2022-04-05 20:19:26 +01:00
snipe
0c31e840c4 Merge pull request #10903 from inietov/fixes/erroneous_checkout_date_in_print_all_assigned_report
Fixes Dates in Print All Assigned report doesn't match to history
2022-04-05 20:19:10 +01:00
snipe
c12ef19fcc Fixed #10892 - MySQL 8 compatibilty requires primary key
Signed-off-by: snipe <snipe@snipe.net>
2022-04-05 18:58:14 +01:00
Ivan Nieto Vivanco
2d213a9c77 Make the report take the dates of pivot table instead of asset log 2022-04-05 12:57:49 -05:00
snipe
91e6acbfd9 Add @veenone as a contributor 2022-04-05 18:52:17 +01:00
snipe
08588a2e6a Merge pull request #10901 from veenone/fix/invalid_consumable_date_in_user_view
Fixes #10898 (invalid consumable date time info in user view)
2022-04-05 18:30:23 +01:00
snipe
0882cfede2 Merge pull request #10895 from ubc-cpsc/master
Security fixes to master branch
2022-04-05 18:29:25 +01:00
Achmad Fienan Rahardianto
231a34ace3 FIX: #10898 (invalid consumable date time info in user view) 2022-04-05 15:31:27 +07:00
Joël Pittet
472c94ef89 Security updates to enshrined/svg-sanitize and guzzlehttp/psr7 2022-04-04 12:31:27 -07:00
Joël Pittet
96cd90f842 Security fixes to master branch 2022-04-04 11:04:06 -07:00
Ivan Nieto Vivanco
1a448cc4b6 Take the values from the importer form to configure the used importer 2022-03-29 17:31:43 -06:00
snipe
f7cd21a007 Sigh.
Signed-off-by: snipe <snipe@snipe.net>
2022-03-29 22:59:52 +01:00
snipe
8ccf148799 Fixed #10881 - bad merge with bootstrap-tables changes
Signed-off-by: snipe <snipe@snipe.net>
2022-03-29 22:57:00 +01:00
snipe
b2056816c9 Use the same string for both radio buttons in bulk user edit
Signed-off-by: snipe <snipe@snipe.net>
2022-03-29 16:45:55 +01:00
snipe
67b0e731e5 Merge pull request #10879 from snipe/rcs/merge_master_into_develop
Merge master back down into develop
2022-03-29 16:40:31 +01:00
snipe
a937bd34f6 Merge master back down into develop
Signed-off-by: snipe <snipe@snipe.net>
2022-03-29 16:28:43 +01:00
snipe
d56552a8af Merge pull request #10876 from snipe/fixes/huntr_ebc26354_logout_user_when_deactivated
Logout user when their activated status is switched to off
2022-03-29 15:57:24 +01:00
snipe
bdabbbd4e9 Logout user when their activated status is switched to off
Signed-off-by: snipe <snipe@snipe.net>
2022-03-29 13:44:53 +01:00
snipe
7941a88623 Merge pull request #10817 from dampfklon/fix-10810-unaccepted-assets
Fix #10810 unaccepted assets
2022-03-29 12:10:37 +01:00
snipe
80dff41c00 Merge pull request #10843 from ahpaleus/features/add_codeql_to_sdlc
[Feature] Adds CodeQL to the SDLC process
2022-03-29 12:07:44 +01:00
snipe
b5f3a357e2 Merge pull request #10850 from Godmartinz/feature/sc-18937/add-manager-to-ldap-sync
This looks good, thanks!
2022-03-29 12:06:01 +01:00
snipe
ab18ceb2f9 Add @QveenSi as a contributor 2022-03-29 11:54:51 +01:00
snipe
e046db6d1e Merge pull request #10874 from QveenSi/patch-1
Fix problem with static paths
2022-03-29 11:52:32 +01:00
Yevhenii Huzii
863ea62551 Fix problem with static paths 2022-03-27 23:12:38 +03:00
snipe
70059f6f80 Merge pull request #10873 from uberbrady/fix_dashboard
Don't crash JS when there are no data-export-options (as is true in Dashboard) Fixes #10872
2022-03-27 07:21:34 +01:00
Brady Wetherington
e50ad8a442 Don't crash JS when there are no data-export-options (as is true in Dashboard) 2022-03-27 07:18:12 +01:00
snipe
639409fb3f Backporting #10829 to master
Signed-off-by: snipe <snipe@snipe.net>
2022-03-25 13:00:16 +00:00
snipe
e207a5043e Merge pull request #10737 from Godmartinz/feature/sc-15014/asset-acceptance-and-signed-eula-as-pdf
Fixed #7891, #3019 and #8260 [sc-15014] - added asset acceptance and signed eula as pdf
2022-03-24 20:52:41 +00:00
Godfrey M
a1429ce86b removed manager_name from user files 2022-03-24 11:47:13 -07:00
Godfrey M
c1f8252388 adds manager field to LDAP sync 2022-03-24 11:24:39 -07:00
snipe
edcf109b0f Merge pull request #10861 from andreaci/develop
next_audit_date error on saving asset
2022-03-23 18:44:21 +00:00
andreaci
ff5a95a6a4 next_audit_date error on saving asset
Solved error 500 when saving new Asset and no next_audit_date  is defined
2022-03-23 17:23:53 +01:00
Godfrey M
55680762de Merge branch 'develop' into feature/sc-18937/add-manager-to-ldap-sync 2022-03-22 16:33:58 -07:00
snipe
20e65804ef Removed comment
Signed-off-by: snipe <snipe@snipe.net>
2022-03-22 18:12:08 +00:00
Godfrey Martinez
fe6a6740db Merge branch 'develop' into feature/sc-15014/asset-acceptance-and-signed-eula-as-pdf 2022-03-22 10:10:56 -07:00
Godfrey M
3e01981576 clean up 2022-03-22 10:07:08 -07:00
Godfrey M
bc30eef23e clean up 2022-03-22 10:04:54 -07:00
Godfrey M
62352ef1a1 completes accessory eula agreement blade 2022-03-22 10:04:22 -07:00
snipe
729b23c0cf Merge pull request #10857 from uberbrady/fix_bs_tables_export_options
Fix bs tables export options
2022-03-22 17:03:18 +00:00
Brady Wetherington
af9f3d5e1e Clean up the bootstrap table export options 2022-03-22 16:05:08 +00:00
snipe
e9a59f55ab Merge pull request #10855 from inietov/fixes/exception_boolean_field_check_no_customfields
Validate custom fieldset only if the asset have one
2022-03-22 15:58:01 +00:00
Ivan Nieto Vivanco
98b78837e1 Validate custom fieldset only if the asset have one 2022-03-22 09:38:57 -06:00
Brady Wetherington
00ca30a205 WIP: fix bootstrap table export options 2022-03-22 15:12:11 +00:00
snipe
8c92198636 Possible fix for boolean field check
Signed-off-by: snipe <snipe@snipe.net>
2022-03-22 13:47:43 +00:00
snipe
169973e697 Merge pull request #10853 from inietov/fixes/customfields_boolean_format_not_saving_master
Fixes Customfields with boolean format not saving master[sc-9973]
2022-03-22 00:57:41 +00:00
Ivan Nieto Vivanco
7571c0b850 Add support for boolean type customfields 2022-03-21 18:48:42 -06:00
snipe
26cababc43 Merge pull request #10851 from inietov/fixes/licenses_assigned_to_assets_dont_follow_users
Fixes #10753 Licenses assigned to assets don't follow users
2022-03-21 21:22:41 +00:00
Ivan Nieto Vivanco
319d816002 Update in the license seat the user that the asset with that license have assigned 2022-03-21 15:06:43 -06:00
Godfrey M
4956eb0410 WIP: needs to be tested. adds ldap_manager field to ldap sync 2022-03-21 11:15:39 -07:00
Godfrey M
220df9710e adds most of the fields for an accessory eula agreement pdf 2022-03-21 09:18:29 -07:00
snipe
820f0a7f04 Merge pull request #10849 from snipe/fixes/10769_return_to_due_for_audit
Fixes #10769 - return to Due for Audit screen after auditing
2022-03-21 14:28:13 +00:00
snipe
df60729140 Fixed #10769 - redirect user back to due for audit page
This could probably take a little reworking, since if you are auditing from the Overdue for Audit page, we’d want to take you back *there* instead of the Due for Audit page.

Signed-off-by: snipe <snipe@snipe.net>
2022-03-21 14:27:18 +00:00
snipe
c01cc48482 Merge pull request #10848 from snipe/fixes/10819_use_full_url_for_barcodes_in_label_view
Fixed #10819 - use full url for label barcodes
2022-03-21 14:00:56 +00:00
snipe
760b78b584 Fixed #10819 - use full url for label barcodes
I don’t know when/why this would really be necessary, since it would be weird to call /hardware/123/label, but this fixes the broken barcodes

Signed-off-by: snipe <snipe@snipe.net>
2022-03-21 13:57:18 +00:00
Maciej Domanski
d53750d389 LdapSync 2022-03-21 10:37:14 +01:00
Maciej Domanski
565f4eb6a1 LdapSync 2022-03-21 10:36:15 +01:00
Maciej Domanski
4a9ff86941 revert LdapSync 2022-03-21 10:31:21 +01:00
Maciej Domanski
70b22784fe Delete LdapSync.php 2022-03-21 10:04:42 +01:00
Maciej Domanski
374bed3f0c info update codeql 2022-03-21 09:51:29 +01:00
snipe
ada0932e80 Merge pull request #10841 from snipe/fixes/default_id_suppliers
Fixed #10840 - defaulting to 0 on supplier ID if no value provided
2022-03-19 23:20:36 +00:00
snipe
e04ae63d02 Apply the fix to API controller too :(
Signed-off-by: snipe <snipe@snipe.net>
2022-03-19 23:12:48 +00:00
snipe
7db252ade3 Fixed #10840 - defaulting to 0 on supplier ID if no value provided
Signed-off-by: snipe <snipe@snipe.net>
2022-03-19 23:11:42 +00:00
snipe
42220cc566 Merge pull request #10809 from inietov/fixes/customfields_boolean_format_not_saving
Fixes Customfields with boolean format not saving [ch-9973]
2022-03-19 22:10:54 +00:00
Maciej Domanski
41e89123e1 revert from develop 2022-03-17 12:22:37 +01:00
Maciej Domanski
e09516d69b codeql sa 2022-03-17 12:10:44 +01:00
Ivan Nieto Vivanco
6ed9ed0e79 Add field type boolean to custom fields list all 2022-03-16 17:21:05 -06:00
Godfrey M
b2e78e3382 formats most of the pdf blade 2022-03-16 15:53:32 -07:00
Dampfklon
9818d16834 fix showDeletedFunction by reverting #9508 2022-03-16 20:20:46 +01:00
Godfrey M
5fcc3c39f3 routes eula agreements for download correctly to the asset history 2022-03-16 11:56:56 -07:00
snipe
d55c176199 Merge pull request #10831 from snipe/merges/master_down_to_develop_march_16
v6.0.0-RC-5 - Merges master down to develop
2022-03-16 18:35:42 +00:00
snipe
c0451fe17a Bumped version to v6.0.0-RC-5
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 18:10:17 +00:00
snipe
0f95802699 Fixed mis-automerge
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 18:05:47 +00:00
snipe
9db8bd782d Merging master down into develop
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 18:02:07 +00:00
snipe
93ff9524d6 Merge pull request #10829 from snipe/features/add_statuslabel_filter_by_type_in_api
Added filter by status_type in StatusLabels API index endpoint
2022-03-16 10:04:58 -07:00
Godfrey M
6386fa1c5e clean up 2022-03-16 09:54:10 -07:00
snipe
89ddbddada Fixed comment
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 16:53:18 +00:00
snipe
7498fe36e9 Removed extra space because pedantry
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 16:45:03 +00:00
snipe
babf7c064b Added ability to filter status label index endpoint by status type
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 16:38:45 +00:00
snipe
40a9470770 Merge pull request #10828 from snipe/fixes/10826_parse_error_on_print_all
Fixed #10826 - parse error on translation string for print all assets
2022-03-16 08:54:10 -07:00
snipe
781b426018 Fixed #10826 - parse error on translation string for print all assets
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 08:50:47 -07:00
snipe
f499dcf7c3 Merge pull request #10827 from snipe/fixes/modal_dropdowns_broken
Fixed #10825 - selectlists in modals b0rked
2022-03-16 08:25:29 -07:00
snipe
54d6a4d978 Fixed #10825 - selectlists in modals b0rked
Signed-off-by: snipe <snipe@snipe.net>
2022-03-16 08:23:50 -07:00
Maciej Domanski
44d5b589bb Update phpstan.neon 2022-03-16 15:22:45 +01:00
Maciej Domanski
0a98adb246 Update SA-phpstan.yml 2022-03-16 15:22:27 +01:00
Maciej Domanski
540f783ba2 phpstan-fixes 2022-03-16 15:11:40 +01:00
Maciej Domanski
67ed550743 phpstan update 2022-03-16 12:37:32 +01:00
Maciej Domanski
967ee714a1 sa tooling 2022-03-16 12:14:18 +01:00
Godfrey M
b2f7262cd2 adds table structure for asset history 2022-03-14 19:38:36 -07:00
Dampfklon
29e1d657e3 fix missed rename 2022-03-11 21:33:25 +01:00
snipe
7cbcd2d95c Merge pull request #10814 from snipe/features/add_clear_sessions_artisan_command
Added session killer artisan command
2022-03-10 13:35:55 -08:00
snipe
1ac293a12a Add a force override
Signed-off-by: snipe <snipe@snipe.net>
2022-03-10 13:30:03 -08:00
snipe
3e3c277a3f Better phrasing
Signed-off-by: snipe <snipe@snipe.net>
2022-03-10 13:29:52 -08:00
snipe
93d6ce1a6a Added session killer artisan command
Signed-off-by: snipe <snipe@snipe.net>
2022-03-10 13:20:23 -08:00
snipe
84aa26dd50 Merge pull request #10728 from Godmartinz/gh10191-css-dropdownmenu
Fixed #10191 - font color contrast on mobile menu
2022-03-10 13:02:45 -08:00
Godfrey M
e1a6a2afc6 adds translation for accept_eula, a bit more logic on the Acceptance Controller that is not working yet 2022-03-10 12:15:50 -08:00
snipe
dadc80d558 Merge pull request #10811 from inietov/fixes/CarbonExceptions_InvalidFormatException_DateTime
Fixes Carbon\Exceptions\InvalidFormatException: DateTime::__construct(): Failed to parse time string
2022-03-10 10:40:46 -08:00
snipe
8984b3a59d Merge pull request #10812 from inietov/fixes/CarbonExceptions_InvalidFormatException_DateTime_develop
Fixes Carbon\Exceptions\InvalidFormatException: DateTime::__construct(): Failed to parse time string develop
2022-03-10 10:40:33 -08:00
Ivan Nieto Vivanco
cdc0805fc4 Sanitize dates input in the importer before saving 2022-03-10 12:07:07 -06:00
Ivan Nieto Vivanco
9caf27ce60 Sanitize dates input in the importer before saving 2022-03-10 11:48:57 -06:00
Ivan Nieto Vivanco
86bd90c564 Show icons in the asset view for boolean customfields 2022-03-09 21:46:19 -06:00
Ivan Nieto Vivanco
e104195796 Convert value of the customfield element from string to boolean 2022-03-09 18:49:39 -06:00
snipe
d06ef4bdef Bumped lockfile
Signed-off-by: snipe <snipe@snipe.net>
2022-03-08 22:17:46 -08:00
snipe
c817daa4da Merge pull request #10767 from uberbrady/fix_double_request_datatable
One attempt to fix the 'datatable double-request' problem.
2022-03-08 20:34:15 -08:00
snipe
1b3631d57d Merge pull request #10806 from snipe/fixes/removed_experimental_content_policies
Removed experimental feature policies
2022-03-08 20:32:39 -08:00
snipe
968de7e469 Merge pull request #10804 from inietov/fixes/date_localization_not_working_custom_fields
Fixes #8143 Date localization not work in custom fields
2022-03-08 20:11:49 -08:00
snipe
e3d2f7cc96 Missed a few
Signed-off-by: snipe <snipe@snipe.net>
2022-03-08 20:05:17 -08:00
snipe
d1358b6249 Removed experimental feature policies
Signed-off-by: snipe <snipe@snipe.net>
2022-03-08 16:58:24 -08:00
Godfrey M
59c583ac74 adds the ability to save eula pdfs to storage, still working on storing them in the DB and exposing them in the UI 2022-03-08 16:42:27 -08:00
snipe
95d6e1a402 Merge pull request #10805 from inietov/fixes/date_localization_not_working_custom_fields_develop
Fixes #8143 Date localization not work in custom fields for develop branch
2022-03-08 16:36:31 -08:00
Ivan Nieto Vivanco
657cfddd3c Add a condition to show customfields as the user wants in localization settings 2022-03-08 18:28:13 -06:00
Ivan Nieto Vivanco
2410b1a146 Add a condition to show customfields as the user wants in localization settings 2022-03-08 18:25:15 -06:00
snipe
9311584f43 Merge pull request #10033 from uberbrady/ldap_troubleshooter_cherrypicked
Fixed [ch14855] - create LDAP troubleshooter
2022-03-07 20:24:11 -08:00
snipe
ed39df349f Merge pull request #10799 from snipe/fixes/check_if_tables_exist_before_trying_to_create
Check if table exists before trying to create in migrations
2022-03-07 20:22:28 -08:00
Brady Wetherington
ab7bf3c5d4 Get rid of stale commented-out line 2022-03-07 20:22:23 -08:00
snipe
86a2312a31 Check if table exists before trying to create
Signed-off-by: snipe <snipe@snipe.net>
2022-03-07 20:13:10 -08:00
snipe
e30d814ece Merge pull request #10798 from snipe/features/add_qr_and_barcode_urls_to_asset_transformer
Added QR and alt barcode urls to asset transformer
2022-03-07 19:53:08 -08:00
Brady Wetherington
0556c7653a Implement a generic timeout function, and run methods that need to run with a timeout using it. 2022-03-07 19:51:21 -08:00
Brady Wetherington
b96303cb38 Clean up errors, add new required package to Dockerfile 2022-03-07 19:51:21 -08:00
Brady Wetherington
312a90ce77 Add start of Tracing to LDAP troubleshooter 2022-03-07 19:51:21 -08:00
Brady Wetherington
71b5c0e80f Add new LDAP troubleshoot ldapsearch subcommand, broaden out troubleshooting 2022-03-07 19:51:21 -08:00
Brady Wetherington
519bd00bef WIP - just need to get authed connections to work 2022-03-07 19:51:21 -08:00
Brady Wetherington
ffd8f583b4 Got most of the stages working for the LDAP troubleshooter 2022-03-07 19:51:21 -08:00
Brady Wetherington
8cd5ec6799 Most of the host-port-tls discovery stuff is in-place now 2022-03-07 19:51:20 -08:00
Brady Wetherington
ef0e9a3c93 WIP: Enhancing stage 2 of LDAP troubleshooter 2022-03-07 19:51:20 -08:00
Brady Wetherington
8aa975e959 First pass at Artisan-based LDAP troubleshooter 2022-03-07 19:51:20 -08:00
snipe
e9d297e97d Added cache comment
Signed-off-by: snipe <snipe@snipe.net>
2022-03-07 19:37:06 -08:00
snipe
9269d5945e Added QR and alt barcode urls to asset transformer
Signed-off-by: snipe <snipe@snipe.net>
2022-03-07 19:32:18 -08:00
snipe
33ee63f985 Merge pull request #10797 from snipe/features/use_max_results_in_pagination
Use the max_results env value in the paginator
2022-03-07 19:14:49 -08:00
snipe
def570db4b Finer grain for > 200
Signed-off-by: snipe <snipe@snipe.net>
2022-03-07 18:51:49 -08:00
snipe
fcb81b9505 Use the max_results env value in the paginator
Signed-off-by: snipe <snipe@snipe.net>
2022-03-07 18:39:39 -08:00
Brady Wetherington
8d49d35463 Remove another data-toggle="table" - possibly the last one 2022-03-07 12:52:57 -08:00
Brady Wetherington
6f3e9033c2 One attempt to fix the 'datatable double-request' problem. 2022-03-07 12:52:57 -08:00
snipe
3e2fe10480 Fixed getAssetBySerial
Signed-off-by: snipe <snipe@snipe.net>
2022-03-05 09:03:29 -08:00
snipe
0c520476a3 Removed namespace
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 12:30:47 -08:00
snipe
ba010618f7 Throttle got merged out - re-adding it
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 12:15:09 -08:00
snipe
2d7a8b5e15 Merge pull request #10776 from snipe/added_trim_to_email_and_username
Added trim to email and username
2022-03-04 11:57:33 -08:00
snipe
1dabd6cc71 Merge pull request #10777 from snipe/added_remote_to_bulk_user_edit
Add remote user setting to bulk edit
2022-03-04 10:35:07 -08:00
snipe
9a358087ec Add remote user to bulk edit
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 06:47:23 -08:00
snipe
b6a1d245e8 Added trim to CC email as well
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 06:20:34 -08:00
snipe
67134ca387 Do a trim() before inserting/updating
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 06:18:52 -08:00
snipe
0dfc27f56e Added remote to allowed_columns for sorting
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 05:44:46 -08:00
snipe
eb8b4a2aa5 Merge pull request #10775 from snipe/features/add_remote_checkbox_to_user
Added remote checkbox to user
2022-03-04 05:39:23 -08:00
snipe
06a05e6340 Added remote to view
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 05:37:28 -08:00
snipe
43c1949092 Add remote option to user
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 05:35:26 -08:00
snipe
a9069e65e5 Don’t show groups in menu if there are none yet
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 04:39:39 -08:00
snipe
1400c610a1 Use correct button translation
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 04:22:44 -08:00
snipe
f840652395 Suppress errors for missing signatures
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 03:18:28 -08:00
snipe
67ed0d91c0 Handle file_get_contents more gracefully
Signed-off-by: snipe <snipe@snipe.net>
2022-03-04 02:54:37 -08:00
Godfrey M
14bd07e97d gerge branchevelop' into gh10191-css-dropdownmenu 2022-03-03 10:14:30 -08:00
Godfrey M
4435ea95fd removes changes to mix-manifest 2022-03-03 09:47:11 -08:00
Godfrey M
f115385243 C&P mix-manifest to be tracked 2022-03-03 09:32:05 -08:00
Godfrey M
708dc08b4f mixes color contrast on dropdown menu from navbar
on file
2022-03-03 09:27:52 -08:00
Godfrey M
533670f3f1 faulty method for converting asset acceptance to pdf 2022-02-24 14:50:16 -08:00
469 changed files with 4579 additions and 284671 deletions

View File

@@ -2585,6 +2585,42 @@
"contributions": [
"code"
]
},
{
"login": "QveenSi",
"name": "Yevhenii Huzii",
"avatar_url": "https://avatars.githubusercontent.com/u/19945501?v=4",
"profile": "https://github.com/QveenSi",
"contributions": [
"code"
]
},
{
"login": "veenone",
"name": "Achmad Fienan Rahardianto",
"avatar_url": "https://avatars.githubusercontent.com/u/3839381?v=4",
"profile": "https://github.com/veenone",
"contributions": [
"code"
]
},
{
"login": "QveenSi",
"name": "Yevhenii Huzii",
"avatar_url": "https://avatars.githubusercontent.com/u/19945501?v=4",
"profile": "https://github.com/QveenSi",
"contributions": [
"code"
]
},
{
"login": "chrisweirich",
"name": "Christian Weirich",
"avatar_url": "https://avatars.githubusercontent.com/u/97299851?v=4",
"profile": "https://github.com/chrisweirich",
"contributions": [
"code"
]
}
]
}

View File

@@ -138,6 +138,13 @@ PRIVATE_AWS_BUCKET=null
PRIVATE_AWS_URL=null
PRIVATE_AWS_BUCKET_ROOT=null
# --------------------------------------------
# OPTIONAL: AWS Settings
# --------------------------------------------
AWS_ACCESS_KEY_ID=null
AWS_SECRET_ACCESS_KEY=null
AWS_DEFAULT_REGION=null
# --------------------------------------------
# OPTIONAL: LOGIN THROTTLING
# --------------------------------------------

View File

@@ -134,6 +134,13 @@ PRIVATE_AWS_BUCKET=null
PRIVATE_AWS_URL=null
PRIVATE_AWS_BUCKET_ROOT=null
# --------------------------------------------
# OPTIONAL: AWS Settings
# --------------------------------------------
AWS_ACCESS_KEY_ID=null
AWS_SECRET_ACCESS_KEY=null
AWS_DEFAULT_REGION=null
# --------------------------------------------
# OPTIONAL: LOGIN THROTTLING
# --------------------------------------------

View File

@@ -38,7 +38,7 @@ IMAGE_LIB=gd
# --------------------------------------------
# OPTIONAL: AWS S3 SETTINGS
# OPTIONAL: AWS SETTINGS
# --------------------------------------------
AWS_SECRET_ACCESS_KEY=null
AWS_ACCESS_KEY_ID=null

View File

@@ -1,42 +1,27 @@
name: Feature Request
description: Suggest an idea for this project
body:
- type: input
attributes:
label: Snipe-IT Version
validations:
required: true
- type: input
id: server_operatingSystem
attributes:
label: Operating System
description: 'e.g. Ubuntu, Windows'
validations:
required: true
- type: input
attributes:
label: Web Server
description: 'e.g. Apache, IIS'
validations:
required: true
- type: input
attributes:
label: PHP Version
validations:
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context Add any other context or screenshots about the feature request here.
name: Feature Request
description: Suggest an idea for this project
title: "[Feature Request]: "
labels: ["feature request"]
assignees:
- snipe
body:
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. The more information you can provide about your use-case, the more liklely we are to consider your feature.
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.

39
.github/workflows/SA-codeql.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
# This workflow checks out code, performs a CodeQL analysis (for JavaScript) and integrates the results
# with the GitHub Advanced Security code scanning feature.
# More information: https://codeql.github.com/
name: CodeQL Security Scan
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# schedule:
# - cron: '15 17 * * 1'
jobs:
analyze:
name: CodeQL Security Scan
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -41,6 +41,7 @@ libmcrypt-dev \
php7.4-dev \
ca-certificates \
unzip \
dnsutils \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@@ -1,11 +1,11 @@
![Build Status](https://app.chipperci.com/projects/0e5f8979-31eb-4ee6-9abf-050b76ab0383/status/master) [![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/) [![Twitter Follow](https://img.shields.io/twitter/follow/snipeitapp.svg?style=social)](https://twitter.com/snipeitapp) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/553ce52037fc43ea99149785afcfe641)](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=snipe/snipe-it&amp;utm_campaign=Badge_Grade)
[![All Contributors](https://img.shields.io/badge/all_contributors-284-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
[![All Contributors](https://img.shields.io/badge/all_contributors-286-orange.svg?style=flat-square)](#contributors) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/yZFtShAcKk) [![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)
## Snipe-IT - Open Source Asset Management System
This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.
It is built on [Laravel 6](http://laravel.com).
It is built on [Laravel 8](http://laravel.com).
Snipe-IT is actively developed and we [release quite frequently](https://github.com/snipe/snipe-it/releases). ([Check out the live demo here](https://snipeitapp.com/demo/).)
@@ -131,7 +131,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/1975640?v=4" width="110px;"/><br /><sub>Evan Taylor</sub>](https://github.com/Delta5)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Delta5 "Code") | [<img src="https://avatars.githubusercontent.com/u/8735148?v=4" width="110px;"/><br /><sub>Petri Asikainen</sub>](https://github.com/PetriAsi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PetriAsi "Code") | [<img src="https://avatars.githubusercontent.com/u/11424540?v=4" width="110px;"/><br /><sub>derdeagle</sub>](https://github.com/derdeagle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=derdeagle "Code") | [<img src="https://avatars.githubusercontent.com/u/176950?v=4" width="110px;"/><br /><sub>Mike Frysinger</sub>](https://wh0rd.org/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vapier "Code") | [<img src="https://avatars.githubusercontent.com/u/22044358?v=4" width="110px;"/><br /><sub>ALPHA</sub>](https://github.com/AL4AL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AL4AL "Code") | [<img src="https://avatars.githubusercontent.com/u/1042587?v=4" width="110px;"/><br /><sub>FliegenKLATSCH</sub>](https://www.ifern.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FliegenKLATSCH "Code") | [<img src="https://avatars.githubusercontent.com/u/442138?v=4" width="110px;"/><br /><sub>Jeremy Price</sub>](https://github.com/jerm)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jerm "Code") |
| [<img src="https://avatars.githubusercontent.com/u/84392209?v=4" width="110px;"/><br /><sub>Toreg87</sub>](https://github.com/Toreg87)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Toreg87 "Code") | [<img src="https://avatars.githubusercontent.com/u/67638596?v=4" width="110px;"/><br /><sub>Matthew Nickson</sub>](https://github.com/Computroniks)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Computroniks "Code") | [<img src="https://avatars.githubusercontent.com/u/1646397?v=4" width="110px;"/><br /><sub>Jethro Nederhof</sub>](https://jethron.id.au)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jethron "Code") | [<img src="https://avatars.githubusercontent.com/u/23289826?v=4" width="110px;"/><br /><sub>Oskar Stenberg</sub>](https://github.com/01ste02)<br />[💻](https://github.com/snipe/snipe-it/commits?author=01ste02 "Code") | [<img src="https://avatars.githubusercontent.com/u/82208283?v=4" width="110px;"/><br /><sub>Robert-Azelis</sub>](https://github.com/Robert-Azelis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Robert-Azelis "Code") | [<img src="https://avatars.githubusercontent.com/u/60648387?v=4" width="110px;"/><br /><sub>Alexander William Smith</sub>](https://github.com/alwism)<br />[💻](https://github.com/snipe/snipe-it/commits?author=alwism "Code") | [<img src="https://avatars.githubusercontent.com/u/24418301?v=4" width="110px;"/><br /><sub>LEITWERK AG</sub>](https://www.leitwerk.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leitwerk-ag "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1911435?v=4" width="110px;"/><br /><sub>Adam</sub>](http://www.aboutcher.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adamboutcher "Code") | [<img src="https://avatars.githubusercontent.com/u/16104273?v=4" width="110px;"/><br /><sub>Ian</sub>](https://snksrv.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sneak-it "Code") | [<img src="https://avatars.githubusercontent.com/u/4023909?v=4" width="110px;"/><br /><sub>Shao Yu-Lung (Allen)</sub>](http://blog.bestlong.idv.tw/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bestlong "Code") | [<img src="https://avatars.githubusercontent.com/u/76475453?v=4" width="110px;"/><br /><sub>Haxatron</sub>](https://github.com/Haxatron)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Haxatron "Code") | [<img src="https://avatars.githubusercontent.com/u/88776392?v=4" width="110px;"/><br /><sub>PlaneNuts</sub>](https://github.com/PlaneNuts)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PlaneNuts "Code") | [<img src="https://avatars.githubusercontent.com/u/3842948?v=4" width="110px;"/><br /><sub>Bradley Coudriet</sub>](http://bjcpgd.cias.rit.edu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=exula "Code") | [<img src="https://avatars.githubusercontent.com/u/21966173?v=4" width="110px;"/><br /><sub>Dalton Durst</sub>](https://daltondur.st)<br />[💻](https://github.com/snipe/snipe-it/commits?author=UniversalSuperBox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

View File

@@ -0,0 +1,59 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class KillAllSessions extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:global-logout {--force : Skip the danger prompt; assuming you enter "y"} ';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This command will destroy all web sessions on disk and will force a re-login for all users.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
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");
}
$session_files = glob(storage_path("framework/sessions/*"));
$count = 0;
foreach ($session_files as $file) {
if (is_file($file))
unlink($file);
$count++;
}
\DB::table('users')->update(['remember_token' => null]);
$this->info($count. ' sessions cleared!');
}
}

View File

@@ -56,6 +56,7 @@ class LdapSync extends Command
$ldap_result_jobtitle = Setting::getSettings()->ldap_jobtitle;
$ldap_result_country = Setting::getSettings()->ldap_country;
$ldap_result_dept = Setting::getSettings()->ldap_dept;
$ldap_result_manager = Setting::getSettings()->ldap_manager;
try {
$ldapconn = Ldap::connectToLdap();
@@ -184,12 +185,12 @@ class LdapSync extends Command
$item['jobtitle'] = isset($results[$i][$ldap_result_jobtitle][0]) ? $results[$i][$ldap_result_jobtitle][0] : '';
$item['country'] = isset($results[$i][$ldap_result_country][0]) ? $results[$i][$ldap_result_country][0] : '';
$item['department'] = isset($results[$i][$ldap_result_dept][0]) ? $results[$i][$ldap_result_dept][0] : '';
$item['manager'] = isset($results[$i][$ldap_result_manager][0]) ? $results[$i][$ldap_result_manager][0] : '';
$department = Department::firstOrCreate([
'name' => $item['department'],
]);
$user = User::where('username', $item['username'])->first();
if ($user) {
// Updating an existing user.
@@ -212,6 +213,15 @@ class LdapSync extends Command
$user->country = $item['country'];
$user->department_id = $department->id;
if($item['manager']!= null) {
//Captures only the Canonical Name
$item['manager'] = ltrim($item['manager'], "CN=");
$item['manager'] = substr($item['manager'],0, strpos($item['manager'], ','));
$ldap_manager = User::where('username', $item['manager'])->first();
$user->manager_id = $ldap_manager->id;
}
// Sync activated state for Active Directory.
if (array_key_exists('useraccountcontrol', $results[$i])) {
/* The following is _probably_ the correct logic, but we can't use it because

View File

@@ -0,0 +1,503 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Setting;
use Exception;
use 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.
*/
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 ) );
}
// NOTE - this function was shamelessly stolen from this gist: https://gist.github.com/tott/7684443
class LdapTroubleshooter extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ldap:troubleshoot
{--ldap-search : Output an ldapsearch command-line for testing your LDAP config}
{--force : Skip the interactive yes/no prompt for confirmation}
{--debug : Include debugging output (verbose)}
{--trace : Include extremely verbose LDAP trace output}
{--timeout=15 : Timeout for LDAP Bind operations}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Runs a series of non-destructive LDAP commands to help try and determine correct LDAP settings for your environment.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Output something *only* if debug is enabled
*
* @return void
*/
public function debugout($string)
{
if($this->option('debug')) {
$this->line($string);
}
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
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')) {
$confirmation = $this->confirm('WARNING: This command will display your LDAP password on your terminal. Are you sure this is ok?');
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_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[] = $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));
if(substr($settings->ldap_filter,0,1) == "(" ) {
$output[] = escapeshellarg($settings->ldap_filter);
} else {
$output[] = escapeshellarg("(".$settings->ldap_filter.")");
}
if($settings->ldap_tls) {
$this->line("# adding STARTTLS option");
$output[] = "-Z";
}
$output[] = "-v";
$this->line("\n");
$this->line(implode(" \\\n",$output));
exit(0);
}
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) {
$this->error('ABORTING');
exit(-1);
}
}
//$this->line(print_r($settings,true));
$this->info("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)");
}
$ldap_conn = false;
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.");
}
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)
$parsed = parse_url($settings->ldap_server);
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.");
exit(-1);
} else {
$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(!$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'];
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");
}
}
$this->info("STAGE 2: Checking basic network connectivity");
$ports = [389,636];
if(@$parsed['port'] && !in_array($parsed['port'],$ports)) {
$ports[] = $parsed['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");
try {
$result = fsockopen($parsed['host'], $port, $errno, $errstr, 30.0);
} catch(Exception $e) {
$this->error("Exception: ".$e->getMessage());
}
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.");
exit(-1);
}
$this->info("STAGE 3: Determine encryption algorithm, if any");
$ldap_urls = [];
$pretty_ldap_urls = [];
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)) {
$this->info("Anonymous bind succesful to $ldap_url!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "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" ];
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)) {
$this->info("Plain connection to $ldap_url with STARTTLS succesful!");
$ldap_urls[] = [ $ldap_url, true, true ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "YES" ];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url with STARTTLS enabled. 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" ];
continue;
} else {
$this->error("WARNING: Failed to bind to $ldap_url. Giving up on port $port");
}
}
$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"));
}
$this->table(["URL", "Cert Checks Enabled?", "STARTTLS Enabled?"],$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->info("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)) {
$ldap_constants[$val] = $key; // INVERT the meaning here!
}
}
$this->debugout("LDAP constants are: ".print_r($ldap_constants,true));
// recursive function that 'cleans' the returned array from ldap_get_entries which are formatted awfully
$cleaner = function ($array) {
$cleaned = [];
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") {
$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) {
$clean_row[$key] = $val[0];
} else {
unset($val['count']); //these counts are annoying
$elements = [];
foreach($val as $entry) {
if(isset($ldap_constants[$entry])) {
$elements[] = $ldap_constants[$entry];
} else {
$elements[] = $entry;
}
}
$clean_row[$key] = $elements;
}
} else {
$clean_row[$key] = $val;
}
}
$cleaned[$i] = $clean_row;
}
return $cleaned;
};
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))) {
$this->info("Success getting informational bind!");
} else {
$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?")) {
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?
}
}
$this->info("LDAP TROUBLESHOOTING COMPLETE!");
}
public function connect_to_ldap($ldap_url, $check_cert, $start_tls)
{
$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) {
// 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");
return false;
}
}
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!");
}
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) {
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");
$bind_results = ldap_bind($lconn);
$this->info("Bind results are: ".$bind_results." which translate into boolean: ".(bool)$bind_results);
return (bool)$bind_results;
} catch (Exception $e) {
$this->error("WARNING: Exception caught during bind - ".$e->getMessage());
return false;
}
});
}
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) {
$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;
}
} 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)
{
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls, $username, $password) {
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) {
$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 = $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?");
$search_results = ldap_search($conn, $settings->base_dn, $settings->filter);
$this->info("Printing first 10 results: ");
for($i=0;$i<10;$i++) {
$this->info($search_results[$i]);
}
} catch (\Exception $e) {
$this->error("WARNING: Exception caught during Authed bind to $username - ".$e->getMessage());
return false;
}
});
}
/***********************************************
*
* 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'))) {
// 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');
return $function();
} else {
$parent_pid = posix_getpid();
$pid = pcntl_fork();
switch($pid) {
case 0:
//we're the 'child'
if($function()) {
//SUCCESS = SIGUSR1
posix_kill($parent_pid, SIGUSR1);
} else {
//FAILURE = SIGUSR2
posix_kill($parent_pid, SIGUSR2);
}
exit();
break; //yes I know we don't need it.
case -1:
//couldn't fork
$this->error("COULD NOT FORK - assuming failure");
return false;
break; //I still know that we don't need it
default:
//we remain the 'parent', $pid is the PID of the forked process.
$siginfo = [];
$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
return false;
}
break; //Yeah I get it already, shush.
}
}
}
}

View File

@@ -46,30 +46,31 @@ class MoveUploadsToNewDisk extends Command
}
$delete_local = $this->argument('delete_local');
$public_uploads['accessories'] = glob('public/accessories'.'/*.*');
$public_uploads['assets'] = glob('public/assets'.'/*.*');
$public_uploads['avatars'] = glob('public/avatars'.'/*.*');
$public_uploads['categories'] = glob('public/categories'.'/*.*');
$public_uploads['companies'] = glob('public/companies'.'/*.*');
$public_uploads['components'] = glob('public/components'.'/*.*');
$public_uploads['consumables'] = glob('public/consumables'.'/*.*');
$public_uploads['departments'] = glob('public/departments'.'/*.*');
$public_uploads['locations'] = glob('public/locations'.'/*.*');
$public_uploads['manufacturers'] = glob('public/manufacturers'.'/*.*');
$public_uploads['suppliers'] = glob('public/suppliers'.'/*.*');
$public_uploads['assetmodels'] = glob('public/models'.'/*.*');
$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 {
Storage::disk('public')->put('uploads/'.public_type.'/'.$filename, file_get_contents($public_upload[$i]));
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);
} catch (\Exception $e) {
@@ -79,83 +80,87 @@ 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/users'.'/*.*');
$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'."/*.*");
foreach ($private_uploads as $private_type => $private_upload) {
$this->info('- There are '.count($private_upload).' PRIVATE '.$private_type.' files.');
{
$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]);
$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[$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);
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);
}
}
}
}
if ($delete_local == 'true') {
$public_delete_count = 0;
$private_delete_count = 0;
$this->info("\n\n");
$this->error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
$this->warn("\nTHIS WILL DELETE ALL OF YOUR LOCAL UPLOADED FILES. \n\nThis cannot be undone, so you should take a backup of your system before you proceed.\n");
$this->error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
if ($delete_local == 'true') {
$public_delete_count = 0;
$private_delete_count = 0;
if ($this->confirm('Do you wish to continue?')) {
foreach ($public_uploads as $public_type => $public_upload) {
for ($i = 0; $i < count($public_upload); $i++) {
$filename = $public_upload[$i];
try {
unlink($filename);
$public_delete_count++;
} catch (\Exception $e) {
\Log::debug($e);
$this->error($e);
$this->info("\n\n");
$this->error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
$this->warn("\nTHIS WILL DELETE ALL OF YOUR LOCAL UPLOADED FILES. \n\nThis cannot be undone, so you should take a backup of your system before you proceed.\n");
$this->error('!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
if ($this->confirm('Do you wish to continue?')) {
foreach ($public_uploads as $public_type => $public_upload) {
for ($i = 0; $i < count($public_upload); $i++) {
$filename = $public_upload[$i];
try {
unlink($filename);
$public_delete_count++;
} catch (\Exception $e) {
\Log::debug($e);
$this->error($e);
}
}
}
}
foreach ($private_uploads as $private_type => $private_upload) {
for ($i = 0; $i < count($private_upload); $i++) {
$filename = $private_upload[$i];
try {
unlink($filename);
$private_delete_count++;
} catch (\Exception $e) {
\Log::debug($e);
$this->error($e);
foreach ($private_uploads as $private_type => $private_upload) {
for ($i = 0; $i < count($private_upload); $i++) {
$filename = $private_upload[$i];
try {
unlink($filename);
$private_delete_count++;
} catch (\Exception $e) {
\Log::debug($e);
$this->error($e);
}
}
}
}
$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

@@ -13,8 +13,8 @@ class RestoreFromBackup extends Command
* @var string
*/
protected $signature = 'snipeit:restore
{--force : Skip the danger prompt; assuming you hit "y"}
{filename : The full path of the .zip file to be migrated}
{--force : Skip the danger prompt; assuming you enter "y"}
{filename : The zip file to be migrated}
{--no-progress : Don\'t show a progress bar}';
/**
@@ -82,6 +82,7 @@ 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/assets', // these are asset _files_, not the pictures.
'storage/private_uploads/audits',
@@ -245,19 +246,21 @@ class RestoreFromBackup extends Command
return false;
}
$bytes_read = 0;
while (($buffer = fgets($sql_contents, self::$buffer_size)) !== false) {
$bytes_read += strlen($buffer);
// \Log::debug("Buffer is: '$buffer'");
$bytes_written = fwrite($pipes[0], $buffer);
if ($bytes_written === false) {
$stdout = fgets($pipes[1]);
$this->info($stdout);
$stderr = fgets($pipes[2]);
$this->info($stderr);
return false;
}
}
if (!feof($sql_contents) || $bytes_read == 0) {
return $this->error("Not at end of file for sql file, or zero bytes read. aborting!");
}

View File

@@ -1059,4 +1059,34 @@ class Helper
return $file_name;
}
public static function formatFilesizeUnits($bytes)
{
if ($bytes >= 1073741824)
{
$bytes = number_format($bytes / 1073741824, 2) . ' GB';
}
elseif ($bytes >= 1048576)
{
$bytes = number_format($bytes / 1048576, 2) . ' MB';
}
elseif ($bytes >= 1024)
{
$bytes = number_format($bytes / 1024, 2) . ' KB';
}
elseif ($bytes > 1)
{
$bytes = $bytes . ' bytes';
}
elseif ($bytes == 1)
{
$bytes = $bytes . ' byte';
}
else
{
$bytes = '0 bytes';
}
return $bytes;
}
}

View File

@@ -7,13 +7,22 @@ use App\Events\CheckoutDeclined;
use App\Events\ItemAccepted;
use App\Events\ItemDeclined;
use App\Http\Controllers\Controller;
use App\Models\Actionlog;
use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\Contracts\Acceptable;
use App\Models\User;
use App\Models\AssetModel;
use App\Models\Accessory;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use App\Http\Controllers\SettingsController;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
class AcceptanceController extends Controller
{
@@ -39,6 +48,7 @@ class AcceptanceController extends Controller
{
$acceptance = CheckoutAcceptance::find($id);
if (is_null($acceptance)) {
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
}
@@ -102,7 +112,8 @@ class AcceptanceController extends Controller
$data_uri = e($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);
$acceptance->stored_eula_file = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$path = Storage::put('private_uploads/signatures/'.$sig_filename, (string) $decoded_image);
}
if ($request->input('asset_acceptance') == 'accepted') {
@@ -111,6 +122,8 @@ class AcceptanceController extends Controller
event(new CheckoutAccepted($acceptance));
$return_msg = trans('admin/users/message.accepted');
} else {
$acceptance->decline($sig_filename);
@@ -119,6 +132,61 @@ class AcceptanceController extends Controller
$return_msg = trans('admin/users/message.declined');
}
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
if ($acceptance->checkoutable_type== 'App\Models\Asset') {
$assigned_to = User::find($item->assigned_to);
$asset_model = AssetModel::find($item->model_id);
$branding_settings = SettingsController::getPDFBranding();
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $asset_model->name,
'item_serial' => $item->serial,
'eula' => $item->getEula(),
'check_out_date' => Carbon::parse($acceptance->created_at)->format($branding_settings->date_display_format),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format),
'assigned_to' => $assigned_to->first_name . ' ' . $assigned_to->last_name,
'company_name' => $branding_settings->site_name,
'signature' => storage_path() . '/private_uploads/signatures/' . $sig_filename,
'logo' => public_path() . '/uploads/' . $branding_settings->logo,
'date_settings' => $branding_settings->date_display_format,
];
$pdf = Pdf::loadView('account.accept.accept-asset-eula', $data);
Storage::put('private_uploads/eula-pdfs/' . $acceptance->stored_eula_file, $pdf->output());
$a = new Actionlog();
$a->stored_eula = $item->getEula();
$a->stored_eula_file = $acceptance->stored_eula_file;
$a->save();
return redirect()->to('account/accept')->with('success', $return_msg);
}
//
$accessory_user= DB::table('checkout_acceptances')->find($acceptance->assigned_to_id);
$assigned_to = User::find($accessory_user->assigned_to_id);
$accessory_model = Accessory::find($item->id);
$branding_settings = SettingsController::getPDFBranding();
$data = [
'item_tag' => $item->model_number,
'item_model' => $accessory_model->name,
'eula' => $item->getEula(),
'check_out_date' => Carbon::parse($acceptance->created_at)->format($branding_settings->date_display_format),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format),
// 'assigned_by' => self
'assigned_to' => $assigned_to->first_name . ' ' . $assigned_to->last_name,
'company_name' => $branding_settings->site_name,
'signature' => storage_path() . '/private_uploads/signatures/' . $sig_filename,
'logo' => public_path() . '/uploads/' . $branding_settings->logo,
'date_settings' => $branding_settings->date_display_format,
];
$pdf = Pdf::loadView('account.accept.accept-accessory-eula', $data);
Storage::put('private_uploads/eula-pdfs/' . $acceptance->stored_eula_file, $pdf->output());
$a = new Actionlog();
$a->stored_eula = $item->getEula();
$a->stored_eula_file = $acceptance->stored_eula_file;
$a->save();
return redirect()->to('account/accept')->with('success', $return_msg);
}
}
}

View File

@@ -3,17 +3,34 @@
namespace App\Http\Controllers;
use App\Helpers\Helper;
use App\Models\Actionlog;
use Response;
class ActionlogController extends Controller
{
public function displaySig($filename)
{
// 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);
$this->authorize('view', \App\Models\Asset::class);
$file = config('app.private_uploads').'/signatures/'.$filename;
$filetype = Helper::checkUploadIsImage($file);
$contents = file_get_contents($file);
return Response::make($contents)->header('Content-Type', $filetype);
$contents = file_get_contents($file, false, stream_context_create(['http' => ['ignore_errors' => true]]));
if ($contents === false) {
\Log::warn('File '.$file.' not found');
return false;
} else {
return Response::make($contents)->header('Content-Type', $filetype);
}
}
public function getStoredEula($filename){
$this->authorize('view', \App\Models\Asset::class);
$file = config('app.private_uploads').'/eula-pdfs/'.$filename;
return Response::download($file);
}
}

View File

@@ -52,7 +52,7 @@ class AssetsController extends Controller
*/
public function index(Request $request, $audit = null)
{
\Log::debug(Route::currentRouteName());
$filter_non_deprecable_assets = false;
/**
@@ -345,6 +345,7 @@ class AssetsController extends Controller
}
/**
* Here we're just determining which Transformer (via $transformer) to use based on the
* variables we set earlier on in this method - we default to AssetsTransformer.
@@ -521,7 +522,7 @@ class AssetsController extends Controller
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost')); // this is the API's store method, so I don't know that I want to do this? Confusing. FIXME (or not?!)
$asset->purchase_date = $request->get('purchase_date', null);
$asset->assigned_to = $request->get('assigned_to', null);
$asset->supplier_id = $request->get('supplier_id', 0);
$asset->supplier_id = $request->get('supplier_id');
$asset->requestable = $request->get('requestable', 0);
$asset->rtd_location_id = $request->get('rtd_location_id', null);
$asset->location_id = $request->get('rtd_location_id', null);
@@ -730,6 +731,7 @@ class AssetsController extends Controller
$logaction->logaction('restored');
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/hardware/message.restore.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
@@ -786,6 +788,9 @@ class AssetsController extends Controller
$error_payload['target_type'] = 'user';
}
if ($request->filled('status_id')) {
$asset->status_id = $request->get('status_id');
}
if (! isset($target)) {

View File

@@ -26,7 +26,8 @@ class LicensesController extends Controller
public function index(Request $request)
{
$this->authorize('view', License::class);
$licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'supplier', 'category')->withCount('freeSeats as free_seats_count'));
$licenses = Company::scopeCompanyables(License::with('company', 'manufacturer', 'supplier','category')->withCount('freeSeats as free_seats_count'));
if ($request->filled('company_id')) {
$licenses->where('company_id', '=', $request->input('company_id'));
@@ -148,9 +149,10 @@ class LicensesController extends Controller
}
$total = $licenses->count();
$licenses = $licenses->skip($offset)->take($limit)->get();
$licenses = $licenses->skip($offset)->take($limit)->get();
return (new LicensesTransformer)->transformLicenses($licenses, $total);
}
/**

View File

@@ -29,11 +29,11 @@ class ProfileController extends Controller
// Make sure the asset and request still exist
if ($checkoutRequest && $checkoutRequest->itemRequested()) {
$results['rows'][] = [
'image' => $checkoutRequest->itemRequested()->present()->getImageUrl(),
'name' => $checkoutRequest->itemRequested()->present()->name(),
'type' => $checkoutRequest->itemType(),
'qty' => $checkoutRequest->quantity,
'location' => ($checkoutRequest->location()) ? $checkoutRequest->location()->name : null,
'image' => e($checkoutRequest->itemRequested()->present()->getImageUrl()),
'name' => e($checkoutRequest->itemRequested()->present()->name()),
'type' => e($checkoutRequest->itemType()),
'qty' => (int) $checkoutRequest->quantity,
'location' => ($checkoutRequest->location()) ? e($checkoutRequest->location()->name) : null,
'expected_checkin' => Helper::getFormattedDateObject($checkoutRequest->itemRequested()->expected_checkin, 'datetime'),
'request_date' => Helper::getFormattedDateObject($checkoutRequest->created_at, 'datetime'),
];

View File

@@ -52,6 +52,7 @@ class ReportsController extends Controller
'accept_signature',
'action_type',
'note',
'stored_eula_file',
];
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';

View File

@@ -18,6 +18,7 @@ use Illuminate\Support\Facades\Notification;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use App\Http\Requests\SlackSettingsRequest;
use App\Http\Transformers\LoginAttemptsTransformer;
class SettingsController extends Controller

View File

@@ -30,6 +30,20 @@ class StatuslabelsController extends Controller
$statuslabels = $statuslabels->TextSearch($request->input('search'));
}
// if a status_type is passed, filter by that
if ($request->filled('status_type')) {
if (strtolower($request->input('status_type')) == 'pending') {
$statuslabels = $statuslabels->Pending();
} elseif (strtolower($request->input('status_type')) == 'archived') {
$statuslabels = $statuslabels->Archived();
} elseif (strtolower($request->input('status_type')) == 'deployable') {
$statuslabels = $statuslabels->Deployable();
} elseif (strtolower($request->input('status_type')) == 'undeployable') {
$statuslabels = $statuslabels->Undeployable();
}
}
// Set the offset to the API call's offset, unless the offset is higher than the actual count of items in which
// case we override with the actual count, so we should return 0 items.
$offset = (($statuslabels) && ($request->get('offset') > $statuslabels->count())) ? $statuslabels->count() : $request->get('offset', 0);
@@ -80,8 +94,8 @@ class StatuslabelsController extends Controller
if ($statuslabel->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $statuslabel, trans('admin/statuslabels/message.create.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, $statuslabel->getErrors()));
}
/**
@@ -100,6 +114,7 @@ class StatuslabelsController extends Controller
return (new StatuslabelsTransformer)->transformStatuslabel($statuslabel);
}
/**
* Update the specified resource in storage.
*
@@ -116,6 +131,7 @@ class StatuslabelsController extends Controller
$request->except('deployable', 'pending', 'archived');
if (! $request->filled('type')) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'Status label type is required.'));
}
@@ -161,6 +177,8 @@ class StatuslabelsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/statuslabels/message.assoc_assets')));
}
/**
* Show a count of assets by status label for pie chart
*

View File

@@ -63,6 +63,7 @@ class UsersController extends Controller
'users.updated_at',
'users.username',
'users.zip',
'users.remote',
'users.ldap_import',
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables')
@@ -136,6 +137,10 @@ class UsersController extends Controller
$users = $users->where('ldap_import', '=', $request->input('ldap_import'));
}
if ($request->filled('remote')) {
$users = $users->where('remote', '=', $request->input('remote'));
}
if ($request->filled('assets_count')) {
$users->has('assets', '=', $request->input('assets_count'));
}
@@ -187,7 +192,7 @@ class UsersController extends Controller
'assets', 'accessories', 'consumables', 'licenses', 'groups', 'activated', 'created_at',
'two_factor_enrolled', 'two_factor_optin', 'last_login', 'assets_count', 'licenses_count',
'consumables_count', 'accessories_count', 'phone', 'address', 'city', 'state',
'country', 'zip', 'id', 'ldap_import',
'country', 'zip', 'id', 'ldap_import', 'remote',
];
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';

View File

@@ -101,14 +101,22 @@ class AssetCheckinController extends Controller
\Log::debug('After Location ID: '.$asset->location_id);
\Log::debug('After RTD Location ID: '.$asset->rtd_location_id);
if ($request->filled('location_id')) {
\Log::debug('NEW Location ID: '.$request->get('location_id'));
$asset->location_id = e($request->get('location_id'));
}
$checkin_at = date('Y-m-d');
if ($request->filled('checkin_at')) {
$checkin_at = $request->input('checkin_at');
$checkin_at = date('Y-m-d H:i:s');
if (($request->filled('checkin_at')) && ($request->get('checkin_at') != date('Y-m-d'))) {
$checkin_at = $request->get('checkin_at');
}
if(!empty($asset->licenseseats->all())){
foreach ($asset->licenseseats as $seat){
$seat->assigned_to = null;
$seat->save();
}
}
// Get all pending Acceptances for this asset and delete them

View File

@@ -80,6 +80,15 @@ class AssetCheckoutController extends Controller
$asset->status_id = $request->get('status_id');
}
if(!empty($asset->licenseseats->all())){
if(request('checkout_to_type') == 'user') {
foreach ($asset->licenseseats as $seat){
$seat->assigned_to = $target->id;
$seat->save();
}
}
}
if ($asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $request->get('name'))) {
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.checkout.success'));
}

View File

@@ -137,12 +137,12 @@ class AssetsController extends Controller
$asset->archived = '0';
$asset->physical = '1';
$asset->depreciate = '0';
$asset->status_id = request('status_id', 0);
$asset->status_id = request('status_id');
$asset->warranty_months = request('warranty_months', null);
$asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost'));
$asset->purchase_date = request('purchase_date', null);
$asset->assigned_to = request('assigned_to', null);
$asset->supplier_id = request('supplier_id', 0);
$asset->supplier_id = request('supplier_id', null);
$asset->requestable = request('requestable', 0);
$asset->rtd_location_id = request('rtd_location_id', null);
@@ -168,9 +168,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e(implode(', ', $request->input($field->convertUnicodeDbSlug()))));
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
} else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e($request->input($field->convertUnicodeDbSlug())));
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
}
}
} else {
@@ -235,6 +235,7 @@ class AssetsController extends Controller
->with('statuslabel_types', Helper::statusTypeList());
}
/**
* Returns a view that presents information about an asset for detail view.
*
@@ -309,6 +310,7 @@ class AssetsController extends Controller
$asset->location_id = $request->input('rtd_location_id', null);
}
if ($request->filled('image_delete')) {
try {
unlink(public_path().'/uploads/assets/'.$asset->image);
@@ -342,9 +344,9 @@ class AssetsController extends Controller
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e(implode(', ', $request->input($field->convertUnicodeDbSlug()))));
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
} else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(e($request->input($field->convertUnicodeDbSlug())));
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
}
}
} else {
@@ -401,6 +403,24 @@ class AssetsController extends Controller
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.delete.success'));
}
/**
* Searches the assets table by serial, and redirects if it finds one
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @return Redirect
*/
public function getAssetBySerial(Request $request)
{
$topsearch = ($request->get('topsearch')=="true");
if (!$asset = Asset::where('serial', '=', $request->get('serial'))->first()) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('view', $asset);
return redirect()->route('hardware.show', $asset->id)->with('topsearch', $topsearch);
}
/**
* Searches the assets table by asset tag, and redirects if it finds one
*
@@ -420,6 +440,7 @@ class AssetsController extends Controller
return redirect()->route('hardware.show', $asset->id)->with('topsearch', $topsearch);
}
/**
* Return a QR code for the asset
*
@@ -792,6 +813,7 @@ class AssetsController extends Controller
return view('hardware/audit-overdue');
}
public function auditStore(Request $request, $id)
{
$this->authorize('audit', Asset::class);
@@ -822,6 +844,7 @@ class AssetsController extends Controller
$asset->location_id = $request->input('location_id');
}
if ($asset->save()) {
$file_name = '';
// Upload an image, if attached
@@ -838,12 +861,13 @@ class AssetsController extends Controller
$asset->logAudit($request->input('note'), $request->input('location_id'), $file_name);
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.audit.success'));
return redirect()->route('assets.audit.due')->with('success', trans('admin/hardware/message.audit.success'));
}
}
public function getRequestedIndex($user_id = null)
{
$this->authorize('index', Asset::class);
$requestedItems = CheckoutRequest::with('user', 'requestedItem')->whereNull('canceled_at')->with('user', 'requestedItem');
if ($user_id) {

View File

@@ -11,6 +11,7 @@ use App\Models\Setting;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
class BulkAssetsController extends Controller
{
@@ -30,9 +31,17 @@ class BulkAssetsController extends Controller
$this->authorize('update', Asset::class);
if (! $request->filled('ids')) {
return redirect()->back()->with('error', 'No assets selected');
return redirect()->back()->with('error', trans('admin/hardware/message.update.no_assets_selected'));
}
// Figure out where we need to send the user after the update is complete, and store that in the session
$bulk_back_url = request()->headers->get('referer');
session(['bulk_back_url' => $bulk_back_url]);
\Log::debug('Back to url: '.$bulk_back_url);
$asset_ids = array_values(array_unique($request->input('ids')));
@@ -73,10 +82,15 @@ class BulkAssetsController extends Controller
{
$this->authorize('update', Asset::class);
\Log::debug($request->input('ids'));
// Get the back url from the session and then destroy the session
$bulk_back_url = route('hardware.index');
if ($request->session()->has('bulk_back_url')) {
$bulk_back_url = $request->session()->pull('bulk_back_url');
}
if (! $request->filled('ids') || count($request->input('ids')) <= 0) {
return redirect()->route('hardware.index')->with('warning', trans('No assets selected, so nothing was updated.'));
return redirect($bulk_back_url)->with('error', trans('admin/hardware/message.update.no_assets_selected'));
}
$assets = array_keys($request->input('ids'));
@@ -147,11 +161,13 @@ class BulkAssetsController extends Controller
->update($this->update_array);
} // endforeach
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.update.success'));
// no values given, nothing to update
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.update.success'));
}
return redirect()->route('hardware.index')->with('warning', trans('admin/hardware/message.update.nothing_updated'));
// no values given, nothing to update
return redirect($bulk_back_url)->with('warning', trans('admin/hardware/message.update.nothing_updated'));
}
/**
@@ -188,6 +204,11 @@ class BulkAssetsController extends Controller
{
$this->authorize('delete', Asset::class);
$bulk_back_url = route('hardware.index');
if ($request->session()->has('bulk_back_url')) {
$bulk_back_url = $request->session()->pull('bulk_back_url');
}
if ($request->filled('ids')) {
$assets = Asset::find($request->get('ids'));
foreach ($assets as $asset) {
@@ -199,11 +220,11 @@ class BulkAssetsController extends Controller
->update($update_array);
} // endforeach
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.delete.success'));
return redirect($bulk_back_url)->with('success', trans('admin/hardware/message.delete.success'));
// no values given, nothing to update
}
return redirect()->to('hardware')->with('info', trans('admin/hardware/message.delete.nothing_updated'));
return redirect($bulk_back_url)->with('error', trans('admin/hardware/message.delete.nothing_updated'));
}
/**
@@ -224,6 +245,9 @@ class BulkAssetsController extends Controller
*/
public function storeCheckout(Request $request)
{
$this->authorize('checkout', Asset::class);
try {
$admin = Auth::user();

View File

@@ -68,18 +68,21 @@ class LoginController extends Controller
return redirect()->intended('/');
}
// If the environment is set to ALWAYS require SAML, go straight to the SAML route.
// We don't need to check other settings, as this should override those.
if (config('app.require_saml')) {
return redirect()->route('saml.login');
}
if (!$request->session()->has('loggedout')) {
// If the environment is set to ALWAYS require SAML, go straight to the SAML route.
// We don't need to check other settings, as this should override those.
if (config('app.require_saml')) {
return redirect()->route('saml.login');
}
if ($this->saml->isEnabled() && Setting::getSettings()->saml_forcelogin == '1' && ! ($request->has('nosaml') || $request->session()->has('error'))) {
return redirect()->route('saml.login');
if ($this->saml->isEnabled() && Setting::getSettings()->saml_forcelogin == '1' && ! ($request->has('nosaml') || $request->session()->has('error'))) {
return redirect()->route('saml.login');
}
}
if (Setting::getSettings()->login_common_disabled == '1') {
\Log::debug('login_common_disabled is set to 1 - return a 403');
return view('errors.403');
}
@@ -101,13 +104,18 @@ class LoginController extends Controller
*/
private function loginViaSaml(Request $request)
{
\Log::debug('Attempting to login via SAML');
$saml = $this->saml;
$samlData = $request->session()->get('saml_login');
if ($saml->isEnabled() && ! empty($samlData)) {
\Log::debug('SAML is enabled, and the samleData is not empty');
try {
Log::debug('Attempting to log user in by SAML authentication.');
$user = $saml->samlLogin($samlData);
if (! is_null($user)) {
if (!is_null($user)) {
Auth::login($user);
} else {
$username = $saml->getUsername();
@@ -120,11 +128,26 @@ class LoginController extends Controller
$user->last_login = \Carbon::now();
$user->save();
}
} catch (\Exception $e) {
\Log::warning('There was an error authenticating the SAML user: '.$e->getMessage());
throw new \Exception($e->getMessage());
}
// Fallthrough with better logging
} else {
// Better logging
if (!$saml->isEnabled()) {
\Log::warning("SAML page requested, but SAML does not seem to enabled.");
} else {
\Log::warning("SAML page requested, but samlData seems empty.");
}
}
\Log::warning("Something else went wrong while trying to login as SAML user");
}
/**
@@ -239,10 +262,12 @@ class LoginController extends Controller
//If the environment is set to ALWAYS require SAML, return access denied
if (config('app.require_saml')) {
\Log::debug('require SAML is enabled in the .env - return a 403');
return view('errors.403');
}
if (Setting::getSettings()->login_common_disabled == '1') {
\Log::debug('login_common_disabled is set to 1 - return a 403');
return view('errors.403');
}
@@ -333,7 +358,6 @@ class LoginController extends Controller
$secret = Google2FA::generateSecretKey();
$user->two_factor_secret = $secret;
$user->save();
$barcode = new Barcode();
$barcode_obj =
@@ -351,6 +375,8 @@ class LoginController extends Controller
[-2, -2, -2, -2]
);
$user->save(); // make sure to save *AFTER* displaying the barcode, or else we might save a two_factor_secret that we never actually displayed to the user if the barcode fails
return view('auth.two_factor_enroll')->with('barcode_obj', $barcode_obj);
}
@@ -395,7 +421,7 @@ class LoginController extends Controller
return redirect()->route('two-factor')->with('error', trans('auth/message.two_factor.code_required'));
}
if (! $request->has('two_factor_secret')) {
if (! $request->has('two_factor_secret')) { // TODO this seems almost the same as above?
return redirect()->route('two-factor')->with('error', 'Two-factor code is required.');
}
@@ -423,10 +449,17 @@ class LoginController extends Controller
*/
public function logout(Request $request)
{
// Logout is only allowed with a http POST but we need to allow GET for SAML SLO
$settings = Setting::getSettings();
$saml = $this->saml;
$samlLogout = $request->session()->get('saml_logout');
$sloRedirectUrl = null;
$sloRequestUrl = null;
// Only allow GET if we are doing SAML SLO otherwise abort with 405
if ($request->isMethod('GET') && !$samlLogout) {
abort(405);
}
if ($saml->isEnabled()) {
$auth = $saml->getAuth();
@@ -443,8 +476,6 @@ class LoginController extends Controller
return redirect()->away($sloRequestUrl);
}
$request->session()->regenerate(true);
$request->session()->regenerate(true);
Auth::logout();
@@ -475,6 +506,7 @@ class LoginController extends Controller
]);
}
public function username()
{
return 'username';
@@ -501,6 +533,7 @@ class LoginController extends Controller
->withErrors([$this->username() => $message]);
}
/**
* Override the lockout time and duration
*

View File

@@ -51,6 +51,7 @@ class SamlController extends Controller
$metadata = $this->saml->getSPMetadata();
if (empty($metadata)) {
\Log::debug('SAML metadata is empty - return a 403');
return response()->view('errors.403', [], 403);
}
@@ -141,6 +142,6 @@ class SamlController extends Controller
return view('errors.403');
}
return redirect()->route('logout')->with('saml_slo_redirect_url', $sloUrl);
return redirect()->route('logout')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
}
}

View File

@@ -186,7 +186,7 @@ class CustomFieldsetsController extends Controller
}
}
$results = $set->fields()->attach($request->input('field_id'), ['required' => ($request->input('required') == 'on'), 'order' => $request->input('order', 1)]);
$results = $set->fields()->attach($request->input('field_id'), ['required' => ($request->input('required') == 'on'), 'order' => (int)$request->input('order', 1)]);
return redirect()->route('fieldsets.show', [$id])->with('success', trans('admin/custom_fields/message.field.create.assoc_success'));
}

View File

@@ -5,6 +5,7 @@ namespace App\Http\Controllers\Kits;
use App\Http\Controllers\CheckInOutRequest;
use App\Http\Controllers\Controller;
use App\Models\PredefinedKit;
use App\Models\Asset;
use App\Models\PredefinedLicence;
use App\Models\PredefinedModel;
use App\Models\User;

View File

@@ -134,6 +134,7 @@ class LicensesController extends Controller
->with('maintained_list', $maintained_list);
}
/**
* Validates and stores the license form data submitted from the edit
* license form.

View File

@@ -275,13 +275,18 @@ class ReportsController extends Controller
}
}
if($actionlog->item){
$item_name = e($actionlog->item->getDisplayNameAttribute());
} else {
$item_name = '';
}
$row = [
$actionlog->created_at,
($actionlog->user) ? e($actionlog->user->getFullNameAttribute()) : '',
$actionlog->present()->actionType(),
e($actionlog->itemType()),
($actionlog->itemType() == 'user') ? $actionlog->filename : e($actionlog->item->getDisplayNameAttribute()),
($actionlog->itemType() == 'user') ? $actionlog->filename : $item_name,
$target_name,
($actionlog->note) ? e($actionlog->note) : '',
$actionlog->log_meta,
@@ -933,12 +938,17 @@ class ReportsController extends Controller
/**
* Get all assets with pending checkout acceptances
*/
$acceptances = CheckoutAcceptance::pending()->with('assignedTo')->get();
if($showDeleted) {
$acceptances = CheckoutAcceptance::pending()->withTrashed()->with(['assignedTo' , 'checkoutable.assignedTo', 'checkoutable.model'])->get();
} else {
$acceptances = CheckoutAcceptance::pending()->with(['assignedTo' => function ($query) {
$query->withTrashed();
}, 'checkoutable.assignedTo', 'checkoutable.model'])->get();
}
$assetsForReport = $acceptances
->filter(function($acceptance) {
return $acceptance->checkoutable_type == 'App\Models\Asset' && !is_null($acceptance->assignedTo);
->filter(function ($acceptance) {
return $acceptance->checkoutable_type == 'App\Models\Asset';
})
->map(function($acceptance) {
return ['assetItem' => $acceptance->checkoutable, 'acceptance' => $acceptance];

View File

@@ -946,6 +946,7 @@ class SettingsController extends Controller
$setting->ldap_active_flag = $request->input('ldap_active_flag');
$setting->ldap_emp_num = $request->input('ldap_emp_num');
$setting->ldap_email = $request->input('ldap_email');
$setting->ldap_manager = $request->input('ldap_manager');
$setting->ad_domain = $request->input('ad_domain');
$setting->is_ad = $request->input('is_ad', '0');
$setting->ad_append_domain = $request->input('ad_append_domain', '0');
@@ -1025,6 +1026,12 @@ class SettingsController extends Controller
return redirect()->back()->withInput()->withErrors($setting->getErrors());
}
public static function getPDFBranding()
{
$pdf_branding= Setting::getSettings();
return $pdf_branding;
}
/**
* Show the listing of backups.

View File

@@ -51,8 +51,8 @@ class BulkUsersController extends Controller
});
}
}
return redirect()->back()->with('success', trans('admin/users/message.password_resets_sent'));
}
}
@@ -90,7 +90,9 @@ class BulkUsersController extends Controller
->conditionallyAddItem('department_id')
->conditionallyAddItem('company_id')
->conditionallyAddItem('locale')
->conditionallyAddItem('remote')
->conditionallyAddItem('activated');
// If the manager_id is one of the users being updated, generate a warning.
if (array_search($request->input('manager_id'), $user_raw_array)) {
$manager_conflict = true;
@@ -101,11 +103,16 @@ class BulkUsersController extends Controller
if (! $manager_conflict) {
$this->conditionallyAddItem('manager_id');
}
// Save the updated info
User::whereIn('id', $user_raw_array)
->where('id', '!=', Auth::id())->update($this->update_array);
if(array_key_exists('location_id', $this->update_array)){
Asset::where('assigned_type', User::class)
->whereIn('assigned_to', $user_raw_array)
->update(['location_id' => $this->update_array['location_id']]);
}
// Only sync groups if groups were selected
if ($request->filled('groups')) {
foreach ($users as $user) {
@@ -171,6 +178,7 @@ class BulkUsersController extends Controller
$accessories = DB::table('accessories_users')->whereIn('assigned_to', $user_raw_array)->get();
$licenses = DB::table('license_seats')->whereIn('assigned_to', $user_raw_array)->get();
$this->logItemCheckinAndDelete($assets, Asset::class);
$this->logItemCheckinAndDelete($accessories, Accessory::class);
$this->logItemCheckinAndDelete($licenses, LicenseSeat::class);
@@ -181,6 +189,7 @@ class BulkUsersController extends Controller
'assigned_type' => null,
]);
LicenseSeat::whereIn('id', $licenses->pluck('id'))->update(['assigned_to' => null]);
foreach ($users as $user) {

View File

@@ -93,8 +93,8 @@ class UsersController extends Controller
$this->authorize('create', User::class);
$user = new User;
//Username, email, and password need to be handled specially because the need to respect config values on an edit.
$user->email = e($request->input('email'));
$user->username = e($request->input('username'));
$user->email = trim($request->input('email'));
$user->username = trim($request->input('username'));
if ($request->filled('password')) {
$user->password = bcrypt($request->input('password'));
}
@@ -115,6 +115,7 @@ class UsersController extends Controller
$user->state = $request->input('state', null);
$user->country = $request->input('country', null);
$user->zip = $request->input('zip', null);
$user->remote = $request->input('remote', 0);
// Strip out the superuser permission if the user isn't a superadmin
$permissions_array = $request->input('permission');
@@ -179,7 +180,6 @@ class UsersController extends Controller
if ($user = User::find($id)) {
$this->authorize('update', $user);
$permissions = config('permissions');
$groups = Group::pluck('name', 'id');
$userGroups = $user->groups()->pluck('name', 'id');
@@ -190,9 +190,7 @@ class UsersController extends Controller
return view('users/edit', compact('user', 'groups', 'userGroups', 'permissions', 'userPermissions'))->with('item', $user);
}
$error = trans('admin/users/message.user_not_found', compact('id'));
return redirect()->route('users.index')->with('error', $error);
return redirect()->route('users.index')->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
/**
@@ -245,9 +243,9 @@ class UsersController extends Controller
// Update the user
if ($request->filled('username')) {
$user->username = $request->input('username');
$user->username = trim($request->input('username'));
}
$user->email = $request->input('email');
$user->email = trim($request->input('email'));
$user->first_name = $request->input('first_name');
$user->last_name = $request->input('last_name');
$user->two_factor_optin = $request->input('two_factor_optin') ?: 0;
@@ -267,6 +265,7 @@ class UsersController extends Controller
$user->country = $request->input('country', null);
$user->activated = $request->input('activated', 0);
$user->zip = $request->input('zip', null);
$user->remote = $request->input('remote', 0);
// Update the location of any assets checked out to this user
Asset::where('assigned_type', User::class)
@@ -623,7 +622,7 @@ class UsersController extends Controller
public function sendPasswordReset($id)
{
if (($user = User::find($id)) && ($user->activated == '1') && ($user->email != '') && ($user->ldap_import == '0')) {
$credentials = ['email' => $user->email];
$credentials = ['email' => trim($user->email)];
try {
\Password::sendResetLink($credentials, function (Message $message) use ($user) {

View File

@@ -39,6 +39,7 @@ class Kernel extends HttpKernel
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\CheckLocale::class,
\App\Http\Middleware\CheckUserIsActivated::class,
\App\Http\Middleware\CheckForTwoFactor::class,
\Laravel\Passport\Http\Middleware\CreateFreshApiToken::class,
\App\Http\Middleware\AssetCountForSidebar::class,

View File

@@ -24,7 +24,13 @@ class CheckForTwoFactor
public function handle($request, Closure $next)
{
// Skip the logic if the user is on the two factor pages or the setup pages
if (in_array($request->route()->getName(), self::IGNORE_ROUTES)) {
// TODO - what we have below only works because our ROUTE uri's look _exactly_ like the route *names*.
// The problem is that, in the new(-ish) Laravel routing system, the route-name doesn't match if the route _verb_ is wrong.
// so we can have a blade that POST's to a route('two-factor') - but that route *name* is only matched when the method is GET
// because we attached the name to the GET, not to the POST (as route names *SHOULD* be unique in Laravel)
// there has got to be a better way to do this, but this is the best I could come up with for now.
if (in_array($request->route()->getName(), self::IGNORE_ROUTES) || in_array($request->route()->uri(), self::IGNORE_ROUTES)) {
return $next($request);
}

View File

@@ -4,8 +4,9 @@ namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Auth;
class Authenticate
class CheckUserIsActivated
{
/**
* The Guard implementation.
@@ -34,14 +35,16 @@ class Authenticate
*/
public function handle($request, Closure $next)
{
if ($this->auth->guest()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('login');
}
// If there is a user AND the user is NOT activated, send them to the login page
// This prevents people who still have active sessions logged in and their status gets toggled
// to inactive (aka unable to login)
if (($request->user()) && (!$request->user()->isActivated())) {
Auth::logout();
return redirect()->guest('login');
}
return $next($request);
}
}

View File

@@ -42,30 +42,15 @@ class SecurityHeaders
// - https://github.com/w3c/webappsec-feature-policy/issues/189
$feature_policy[] = "accelerometer 'none'";
$feature_policy[] = "ambient-light-sensor 'none'";
$feature_policy[] = "animations 'none'";
$feature_policy[] = "autoplay 'none'";
$feature_policy[] = "battery 'none'";
$feature_policy[] = "camera 'none'";
$feature_policy[] = "display-capture 'none'";
$feature_policy[] = "document-domain 'none'";
$feature_policy[] = "encrypted-media 'none'";
$feature_policy[] = "fullscreen 'none'";
$feature_policy[] = "geolocation 'none'";
$feature_policy[] = "gyroscope 'none'";
$feature_policy[] = "legacy-image-formats 'none'";
$feature_policy[] = "magnetometer 'none'";
$feature_policy[] = "microphone 'none'";
$feature_policy[] = "midi 'none'";
$feature_policy[] = "oversized-images 'none'";
$feature_policy[] = "payment 'none'";
$feature_policy[] = "picture-in-picture 'none'";
$feature_policy[] = "publickey-credentials 'none'";
$feature_policy[] = "sync-xhr 'none'";
$feature_policy[] = "unsized-media 'none'";
$feature_policy[] = "usb 'none'";
$feature_policy[] = "vibrate 'none'";
$feature_policy[] = "wake-lock 'none'";
$feature_policy[] = "xr-spatial-tracking 'none'";
$feature_policy = implode(';', $feature_policy);

View File

@@ -25,6 +25,7 @@ class AssetCheckoutRequest extends Request
'assigned_user' => 'required_without_all:assigned_asset,assigned_location',
'assigned_asset' => 'required_without_all:assigned_user,assigned_location',
'assigned_location' => 'required_without_all:assigned_user,assigned_asset',
'status_id' => 'exists:status_labels,id,deployable,1',
'checkout_to_type' => 'required|in:asset,location,user',
];

View File

@@ -60,8 +60,8 @@ class ItemImportRequest extends FormRequest
}
$importer->setCallbacks([$this, 'log'], [$this, 'progress'], [$this, 'errorCallback'])
->setUserId(Auth::id())
->setUpdating($this->has('import-update'))
->setShouldNotify($this->has('send-welcome'))
->setUpdating($this->get('import-update'))
->setShouldNotify($this->get('send-welcome'))
->setUsernameFormat('firstname.lastname')
->setFieldMappings($fieldMappings);
$importer->import();

View File

@@ -96,7 +96,7 @@ class ActionlogsTransformer
'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null,
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): Helper::getFormattedDateObject($actionlog->created_at, 'datetime'),
'stored_eula_file' => ($actionlog->stored_eula_file) ? route('log.storedeula.download', ['filename' => $actionlog->stored_eula_file]) : null,
];
//\Log::info("Clean Meta is: ".print_r($clean_meta,true));

View File

@@ -4,6 +4,7 @@ namespace App\Http\Transformers;
use App\Helpers\Helper;
use App\Models\Asset;
use App\Models\Setting;
use Gate;
use Illuminate\Database\Eloquent\Collection;
@@ -21,6 +22,9 @@ class AssetsTransformer
public function transformAsset(Asset $asset)
{
// This uses the getSettings() method so we're pulling from the cache versus querying the settings on single asset
$setting = Setting::getSettings();
$array = [
'id' => (int) $asset->id,
'name' => e($asset->name),
@@ -65,6 +69,8 @@ class AssetsTransformer
'name'=> e($asset->defaultLoc->name),
] : null,
'image' => ($asset->getImageUrl()) ? $asset->getImageUrl() : null,
'qr' => ($setting->qr_code=='1') ? config('app.url').'/uploads/barcodes/qr-'.str_slug($asset->asset_tag).'-'.str_slug($asset->id).'.png' : null,
'alt_barcode' => ($setting->alt_barcode_enabled=='1') ? config('app.url').'/uploads/barcodes/'.str_slug($setting->alt_barcode).'-'.str_slug($asset->asset_tag).'.png' : null,
'assigned_to' => $this->transformAssignedTo($asset),
'warranty_months' => ($asset->warranty_months > 0) ? e($asset->warranty_months.' '.trans('admin/hardware/form.months')) : null,
'warranty_expires' => ($asset->warranty_months > 0) ? Helper::getFormattedDateObject($asset->warranty_expires, 'date') : null,

View File

@@ -98,7 +98,7 @@ class DepreciationReportTransformer
'purchase_cost' => Helper::formatCurrencyOutput($asset->purchase_cost),
'book_value' => Helper::formatCurrencyOutput($depreciated_value),
'monthly_depreciation' => $monthly_depreciation,
'checked_out_to' => $checkout_target,
'checked_out_to' => ($checkout_target) ? e($checkout_target) : null,
'diff' => Helper::formatCurrencyOutput($diff),
'number_of_months' => ($asset->model && $asset->model->depreciation) ? e($asset->model->depreciation->months) : null,
'depreciation' => (($asset->model) && ($asset->model->depreciation)) ? e($asset->model->depreciation->name) : null,

View File

@@ -28,6 +28,7 @@ class UsersTransformer
'first_name' => e($user->first_name),
'last_name' => e($user->last_name),
'username' => e($user->username),
'remote' => ($user->remote == '1') ? true : false,
'locale' => ($user->locale) ? e($user->locale) : null,
'employee_num' => e($user->employee_num),
'manager' => ($user->manager) ? [

View File

@@ -97,10 +97,12 @@ class AssetImporter extends ItemImporter
$item['rtd_location_id'] = $this->item['location_id'];
}
$item['last_audit_date'] = null;
if (isset($this->item['last_audit_date'])) {
$item['last_audit_date'] = $this->item['last_audit_date'];
}
$item['next_audit_date'] = null;
if (isset($this->item['next_audit_date'])) {
$item['next_audit_date'] = $this->item['next_audit_date'];
}

View File

@@ -35,7 +35,7 @@ class LicenseImporter extends ItemImporter
->first();
if ($license) {
if (! $this->updating) {
$this->log('A matching License '.$this->item['name'].'with serial '.$this->item['serial'].' already exists');
$this->log('A matching License '.$this->item['name'].' with serial '.$this->item['serial'].' already exists');
return;
}
@@ -47,14 +47,22 @@ class LicenseImporter extends ItemImporter
$license = new License;
}
$asset_tag = $this->item['asset_tag'] = $this->findCsvMatch($row, 'asset_tag'); // used for checkout out to an asset.
$this->item['expiration_date'] = $this->findCsvMatch($row, 'expiration_date');
$this->item["expiration_date"] = null;
if ($this->findCsvMatch($row, "expiration_date")!='') {
$this->item["expiration_date"] = date("Y-m-d 00:00:01", strtotime($this->findCsvMatch($row, "expiration_date")));
}
$this->item['license_email'] = $this->findCsvMatch($row, 'license_email');
$this->item['license_name'] = $this->findCsvMatch($row, 'license_name');
$this->item['maintained'] = $this->findCsvMatch($row, 'maintained');
$this->item['purchase_order'] = $this->findCsvMatch($row, 'purchase_order');
$this->item['reassignable'] = $this->findCsvMatch($row, 'reassignable');
$this->item['seats'] = $this->findCsvMatch($row, 'seats');
$this->item['termination_date'] = $this->findCsvMatch($row, 'termination_date');
$this->item["termination_date"] = null;
if ($this->findCsvMatch($row, "termination_date")!='') {
$this->item["termination_date"] = date("Y-m-d 00:00:01", strtotime($this->findCsvMatch($row, "termination_date")));
}
if ($editingLicense) {
$license->update($this->sanitizeItemForUpdating($license));

View File

@@ -34,11 +34,12 @@ class LogListener
public function onCheckoutAccepted(CheckoutAccepted $event)
{
$logaction = new Actionlog();
$logaction = new Actionlog();
$logaction->item()->associate($event->acceptance->checkoutable);
$logaction->target()->associate($event->acceptance->assignedTo);
$logaction->accept_signature = $event->acceptance->signature_filename;
$logaction->stored_eula_file = $event->acceptance->stored_eula_file;
$logaction->action_type = 'accepted';
// TODO: log the actual license seat that was checked out

View File

@@ -61,7 +61,7 @@ class Accessory extends SnipeModel
'category_id' => 'required|integer|exists:categories,id',
'company_id' => 'integer|nullable',
'min_amt' => 'integer|min:0|nullable',
'purchase_cost' => 'numeric|nullable',
'purchase_cost' => 'numeric|nullable|gte:0',
];

View File

@@ -25,7 +25,7 @@ class Actionlog extends SnipeModel
protected $table = 'action_logs';
public $timestamps = true;
protected $fillable = ['created_at', 'item_type', 'user_id', 'item_id', 'action_type', 'note', 'target_id', 'target_type'];
protected $fillable = ['created_at', 'item_type', 'user_id', 'item_id', 'action_type', 'note', 'target_id', 'target_type', 'stored_eula', 'stored_eula_file'];
use Searchable;
@@ -34,7 +34,7 @@ class Actionlog extends SnipeModel
*
* @var array
*/
protected $searchableAttributes = ['action_type', 'note', 'log_meta'];
protected $searchableAttributes = ['action_type', 'note', 'log_meta','user_id'];
/**
* The relations and their attributes that should be included when searching the model.
@@ -43,6 +43,7 @@ class Actionlog extends SnipeModel
*/
protected $searchableRelations = [
'company' => ['name'],
'user' => ['first_name','last_name','username'],
];
/**
@@ -69,6 +70,7 @@ class Actionlog extends SnipeModel
});
}
/**
* Establishes the actionlog -> item relationship
*
@@ -125,6 +127,7 @@ class Actionlog extends SnipeModel
return camel_case(class_basename($this->target_type));
}
/**
* Establishes the actionlog -> uploads relationship
*
@@ -188,6 +191,7 @@ class Actionlog extends SnipeModel
return $this->belongsTo(\App\Models\Location::class, 'location_id')->withTrashed();
}
/**
* Check if the file exists, and if it does, force a download
*

View File

@@ -111,7 +111,7 @@ class Asset extends Depreciable
'asset_tag' => 'required|min:1|max:255|unique_undeleted',
'status' => 'integer',
'serial' => 'unique_serial|nullable',
'purchase_cost' => 'numeric|nullable',
'purchase_cost' => 'numeric|nullable|gte:0',
'next_audit_date' => 'date|nullable',
'last_audit_date' => 'date|nullable',
'supplier_id' => 'exists:suppliers,id|nullable',
@@ -195,10 +195,25 @@ class Asset extends Depreciable
$model = AssetModel::find($this->model_id);
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field){
if($field->format == 'BOOLEAN'){
$this->{$field->db_column} = filter_var($this->{$field->db_column}, FILTER_VALIDATE_BOOLEAN);
}
}
$this->rules += $model->fieldset->validation_rules();
foreach ($this->model->fieldset->fields as $field){
if($field->format == 'BOOLEAN'){
$this->{$field->db_column} = filter_var($this->{$field->db_column}, FILTER_VALIDATE_BOOLEAN);
}
}
}
}
return parent::save($params);
}

View File

@@ -36,7 +36,7 @@ class Component extends SnipeModel
'company_id' => 'integer|nullable',
'min_amt' => 'integer|min:0|nullable',
'purchase_date' => 'date|nullable',
'purchase_cost' => 'numeric|nullable',
'purchase_cost' => 'numeric|nullable|gte:0',
];
/**

View File

@@ -39,7 +39,7 @@ class Consumable extends SnipeModel
'category_id' => 'required|integer',
'company_id' => 'integer|nullable',
'min_amt' => 'integer|min:0|nullable',
'purchase_cost' => 'numeric|nullable',
'purchase_cost' => 'numeric|nullable|gte:0',
];
/**

View File

@@ -208,6 +208,7 @@ class Ldap extends Model
$ldap_result_jobtitle = Setting::getSettings()->ldap_jobtitle;
$ldap_result_country = Setting::getSettings()->ldap_country;
$ldap_result_dept = Setting::getSettings()->ldap_dept;
$ldap_result_manager = Setting::getSettings()->ldap_manager;
// Get LDAP user data
$item = [];
$item['username'] = isset($ldapattributes[$ldap_result_username][0]) ? $ldapattributes[$ldap_result_username][0] : '';
@@ -219,6 +220,7 @@ class Ldap extends Model
$item['jobtitle'] = isset($ldapattributes[$ldap_result_jobtitle][0]) ? $ldapattributes[$ldap_result_jobtitle][0] : '';
$item['country'] = isset($ldapattributes[$ldap_result_country][0]) ? $ldapattributes[$ldap_result_country][0] : '';
$item['department'] = isset($ldapattributes[$ldap_result_dept][0]) ? $ldapattributes[$ldap_result_dept][0] : '';
$item['manager'] = isset($ldapattributes[$ldap_result_manager][0]) ? $ldapattributes[$ldap_result_manager][0] : '';
return $item;
}

View File

@@ -48,6 +48,7 @@ class License extends Depreciable
'notes' => 'string|nullable',
'category_id' => 'required|exists:categories,id',
'company_id' => 'integer|nullable',
'purchase_cost'=> 'numeric|nullable|gte:0',
];
/**
@@ -186,6 +187,7 @@ class License extends Depreciable
];
}
//Chunk and use DB transactions to prevent timeouts.
collect($licenseInsert)->chunk(1000)->each(function ($chunk) {
DB::transaction(function () use ($chunk) {
LicenseSeat::insert($chunk->toArray());
@@ -388,6 +390,7 @@ class License extends Depreciable
->orderBy('created_at', 'desc');
}
/**
* Establishes the license -> admin user relationship
*
@@ -617,6 +620,7 @@ class License extends Depreciable
->first();
}
/**
* Establishes the license -> free seats relationship
*

View File

@@ -114,6 +114,13 @@ trait Loggable
$log->location_id = null;
$log->note = $note;
$log->action_date = $action_date;
if (! $log->action_date) {
$log->action_date = date('Y-m-d H:i:s');
}
if (! $log->action_date) {
$log->action_date = date('Y-m-d H:i:s');
}
if (Auth::user()) {
$log->user_id = Auth::user()->id;

View File

@@ -9,6 +9,6 @@ class AdminRecipient extends Recipient
public function __construct()
{
$settings = Setting::getSettings();
$this->email = $settings->admin_cc_email;
$this->email = trim($settings->admin_cc_email);
}
}

16
app/Models/SCIMUser.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace App\Models;
class SCIMUser extends User
{
protected $table = 'users';
protected $throwValidationExceptions = true; // we want model-level validation to fully THROW, not just return false
public function __construct(array $attributes = []) {
$attributes['password'] = "*NO PASSWORD*";
// $attributes['activated'] = 1;
parent::__construct($attributes);
}
}

View File

@@ -0,0 +1,174 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Helper;
use ArieTimmerman\Laravel\SCIMServer\SCIM\Schema;
use ArieTimmerman\Laravel\SCIMServer\Attribute\AttributeMapping;
class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
{
public function getUserConfig()
{
$config = parent::getUserConfig();
// Much of this is copied verbatim from the library, then adjusted for our needs
$config['class'] = SCIMUser::class;
unset($config['mapping']['example:name:space']);
$config['map_unmapped'] = false; // anything we don't explicitly map will _not_ show up.
$core_namespace = 'urn:ietf:params:scim:schemas:core:2.0:User';
$core = $core_namespace.':';
$mappings =& $config['mapping'][$core_namespace]; //grab this entire key, we don't want to be repeating ourselves
//username - *REQUIRED*
$config['validations'][$core.'userName'] = 'required';
$mappings['userName'] = AttributeMapping::eloquent('username');
//human name - *FIRST NAME REQUIRED*
$config['validations'][$core.'name.givenName'] = 'required';
$config['validations'][$core.'name.familyName'] = 'string'; //not required
$mappings['name']['familyName'] = AttributeMapping::eloquent("last_name");
$mappings['name']['givenName'] = AttributeMapping::eloquent("first_name");
$mappings['name']['formatted'] = (new AttributeMapping())->ignoreWrite()->setRead(
function (&$object) {
return $object->getFullNameAttribute();
}
);
$config['validations'][$core.'emails'] = 'nullable|array'; // emails are not required in Snipe-IT...
$config['validations'][$core.'emails.*.value'] = 'required|email'; // ...but if you give us one, it better be an email address
$mappings['emails'] = [[
"value" => AttributeMapping::eloquent("email"),
"display" => null,
"type" => AttributeMapping::constant("work")->ignoreWrite(),
"primary" => AttributeMapping::constant(true)->ignoreWrite()
]];
//active
$config['validations'][$core.'active'] = 'boolean';
$mappings['active'] = AttributeMapping::eloquent('activated');
//phone
$config['validations'][$core.'phoneNumbers'] = 'nullable|array';
$config['validations'][$core.'phoneNumbers.*.value'] = 'required';
$mappings['phoneNumbers'] = [[
"value" => AttributeMapping::eloquent("phone"),
"display" => null,
"type" => AttributeMapping::constant("work")->ignoreWrite(),
"primary" => AttributeMapping::constant(true)->ignoreWrite()
]];
//address
$config['validations'][$core.'addresses'] = 'nullable|array';
$config['validations'][$core.'addresses.*.streetAddress'] = 'required';
$config['validations'][$core.'addresses.*.locality'] = 'string';
$config['validations'][$core.'addresses.*.region'] = 'string';
$config['validations'][$core.'addresses.*.postalCode'] = 'string';
$config['validations'][$core.'addresses.*.country'] = 'string';
$mappings['addresses'] = [[
'type' => AttributeMapping::constant("work")->ignoreWrite(),
'formatted' => AttributeMapping::constant("n/a")->ignoreWrite(), // TODO - is this right? This doesn't look right.
'streetAddress' => AttributeMapping::eloquent("address"),
'locality' => AttributeMapping::eloquent("city"),
'region' => AttributeMapping::eloquent("state"),
'postalCode' => AttributeMapping::eloquent("zip"),
'country' => AttributeMapping::eloquent("country"),
'primary' => AttributeMapping::constant(true)->ignoreWrite() //this isn't in the example?
]];
//title
$config['validations'][$core.'title'] = 'string';
$mappings['title'] = AttributeMapping::eloquent('jobtitle');
//Preferred Language
$config['validations'][$core.'preferredLanguage'] = 'string';
$mappings['preferredLanguage'] = AttributeMapping::eloquent('locale');
/*
more snipe-it attributes I'd like to check out (to map to 'enterprise' maybe?):
- website
- notes?
- remote???
- location_id ?
- company_id to "organization?"
*/
$enterprise_namespace = 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User';
$ent = $enterprise_namespace.':';
// we remove the 'example' namespace and add the Enterprise one
$config['mapping']['schemas'] = AttributeMapping::constant( [$core_namespace, $enterprise_namespace] )->ignoreWrite();
$config['validations'][$ent.'employeeNumber'] = 'string';
$config['validations'][$ent.'department'] = 'string';
$config['validations'][$ent.'manager'] = 'nullable';
$config['validations'][$ent.'manager.value'] = 'string';
$config['mapping'][$enterprise_namespace] = [
'employeeNumber' => AttributeMapping::eloquent('employee_num'),
'department' =>(new AttributeMapping())->setAdd( // FIXME parent?
function ($value, &$object) {
\Log::error("Department-Add: $value"); //FIXME
$department = Department::where("name", $value)->first();
if ($department) {
$object->department_id = $department->id;
}
}
)->setReplace(
function ($value, &$object) {
\Log::error("Department-Replace: $value"); //FIXME
$department = Department::where("name", $value)->first();
if ($department) {
$object->department_id = $department->id;
}
}
)->setRead(
function (&$object) {
\Log::error("Weird department reader firing..."); //FIXME
return $object->department ? $object->department->name : null;
}
),
'manager' => [
// FIXME - manager writes are disabled. This kinda works but it leaks errors all over the place. Not cool.
// '$ref' => (new AttributeMapping())->ignoreWrite()->ignoreRead(),
// 'displayName' => (new AttributeMapping())->ignoreWrite()->ignoreRead(),
// NOTE: you could probably do a 'plain' Eloquent mapping here, but we don't for future-proofing
'value' => (new AttributeMapping())->setAdd(
function ($value, &$object) {
\Log::error("Manager-Add: $value"); //FIXME
$manager = User::find($value);
if ($manager) {
$object->manager_id = $manager->id;
}
}
)->setReplace(
function ($value, &$object) {
\Log::error("Manager-Replace: $value"); //FIXME
$manager = User::find($value);
if ($manager) {
$object->manager_id = $manager->id;
}
}
)->setRead(
function (&$object) {
\Log::error("Weird manager reader firing..."); //FIXME
return $object->manager_id;
}
),
]
];
return $config;
}
}

View File

@@ -120,6 +120,18 @@ class Statuslabel extends SnipeModel
->where('deployable', '=', 1);
}
/**
* Query builder scope for undeployable status types
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeUndeployable()
{
return $this->where('pending', '=', 0)
->where('archived', '=', 0)
->where('deployable', '=', 0);
}
/**
* Helper function to determine type attributes
*

View File

@@ -58,6 +58,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'state',
'username',
'zip',
'remote',
];
protected $casts = [
@@ -73,14 +74,13 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
* @var array
*/
// 'username' => 'required|string|min:1|unique:users,username,NULL,id,deleted_at,NULL',
protected $rules = [
'first_name' => 'required|string|min:1',
'username' => 'required|string|min:1|unique_undeleted',
'email' => 'email|nullable',
'first_name' => 'required|string|min:1|max:191',
'username' => 'required|string|min:1|unique_undeleted|max:191',
'email' => 'email|nullable|max:191',
'password' => 'required|min:8',
'locale' => 'max:10|nullable',
'website' => 'url|nullable',
'website' => 'url|nullable|max:191',
'manager_id' => 'nullable|exists:users,id|cant_manage_self',
'location_id' => 'exists:locations,id|nullable',
];
@@ -258,6 +258,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
return $this->endpoint;
}
/**
* Establishes the user -> assets relationship
*
@@ -307,7 +308,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*/
public function consumables()
{
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id')->withTrashed();
return $this->belongsToMany(\App\Models\Consumable::class, 'consumables_users', 'assigned_to', 'consumable_id')->withPivot('id','created_at')->withTrashed();
}
/**
@@ -497,13 +498,15 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
$last_name = '';
$username = $users_name;
} else {
list($first_name, $last_name) = explode(' ', $users_name, 2);
// Assume filastname by default
$username = str_slug(substr($first_name, 0, 1).$last_name);
if ($format == 'firstname.lastname') {
$username = str_slug($first_name).'.'.str_slug($last_name);
if ($format=='firstname.lastname') {
$username = str_slug($first_name) . '.' . str_slug($last_name);
} elseif ($format == 'lastnamefirstinitial') {
$username = str_slug($last_name.substr($first_name, 0, 1));
} elseif ($format == 'firstintial.lastname') {
@@ -527,6 +530,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
$user['last_name'] = $last_name;
$user['username'] = strtolower($username);
return $user;
}
@@ -581,8 +585,8 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
elseif ((Setting::getSettings()->two_factor_enabled == '2') && ($this->two_factor_enrolled)) {
return true;
}
return false;
}
@@ -640,6 +644,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
});
}
/**
* Query builder scope to order on manager
*

View File

@@ -17,12 +17,15 @@ class AssetObserver
*/
public function updating(Asset $asset)
{
$attributes = $asset->getAttributes();
$attributesOriginal = $asset->getOriginal();
// If the asset isn't being checked out or audited, log the update.
// (Those other actions already create log entries.)
if (($asset->getAttributes()['assigned_to'] == $asset->getOriginal()['assigned_to'])
&& ($asset->getAttributes()['next_audit_date'] == $asset->getOriginal()['next_audit_date'])
&& ($asset->getAttributes()['last_checkout'] == $asset->getOriginal()['last_checkout'])) {
if (($attributes['assigned_to'] == $attributesOriginal['assigned_to'])
&& ((isset( $attributes['next_audit_date']) ? $attributes['next_audit_date'] : null) == (isset($attributesOriginal['next_audit_date']) ? $attributesOriginal['next_audit_date']: null))
&& ($attributes['last_checkout'] == $attributesOriginal['last_checkout']))
{
$changed = [];
foreach ($asset->getOriginal() as $key => $value) {

View File

@@ -83,6 +83,18 @@ abstract class SnipePermissionsPolicy
return $user->hasAccess($this->columnName().'.edit');
}
/**
* Determine whether the user can update the accessory.
*
* @param \App\Models\User $user
* @return mixed
*/
public function checkout(User $user, $item = null)
{
return $user->hasAccess($this->columnName().'.checkout');
}
/**
* Determine whether the user can delete the accessory.
*

View File

@@ -17,6 +17,10 @@ class AssetAuditPresenter extends Presenter
public static function dataTableLayout()
{
$layout = [
[
'field' => 'checkbox',
'checkbox' => true,
],
[
'field' => 'id',
'searchable' => false,

View File

@@ -189,6 +189,14 @@ class LicensePresenter extends Presenter
public static function dataTableLayoutSeats()
{
$layout = [
[
'field' => 'id',
'searchable' => false,
'sortable' => true,
'switchable' => true,
'title' => trans('general.id'),
'visible' => false,
],
[
'field' => 'name',
'searchable' => false,

View File

@@ -85,6 +85,15 @@ class UserPresenter extends Presenter
'visible' => true,
'formatter' => 'usersLinkFormatter',
],
[
'field' => 'remote',
'searchable' => false,
'sortable' => true,
'switchable' => true,
'title' => trans('admin/users/general.remote'),
'visible' => false,
'formatter' => 'trueFalseFormatter',
],
[
'field' => 'email',
'searchable' => true,

View File

@@ -8,6 +8,7 @@ use App\Models\Component;
use App\Models\Consumable;
use App\Models\License;
use App\Models\Setting;
use App\Models\SnipeSCIMConfig;
use App\Observers\AccessoryObserver;
use App\Observers\AssetObserver;
use App\Observers\ComponentObserver;
@@ -80,6 +81,8 @@ class AppServiceProvider extends ServiceProvider
if ($this->app->environment(['local', 'develop'])) {
$this->app->register(\Laravel\Dusk\DuskServiceProvider::class);
}
$this->app->singleton('ArieTimmerman\Laravel\SCIMServer\SCIMConfig', SnipeSCIMConfig::class); // this overrides the default SCIM configuration with our own
}
}

View File

@@ -24,7 +24,7 @@ class RouteServiceProvider extends ServiceProvider
$this->mapWebRoutes();
//
require base_path('routes/scim.php');
});
}

View File

@@ -130,9 +130,11 @@ class Saml
$this->clearData();
}
\Log::debug('Trying to create a new OneLogin_Saml2_Auth object ');
try {
$this->_auth = new OneLogin_Saml2_Auth($this->_settings);
} catch (Exception $e) {
\Log::error('Trying OneLogin_Saml2_Auth failed. Setting SAML enabled to false. OneLogin_Saml2_Auth error message is: '. $e->getMessage());
$this->_enabled = false;
}
}
@@ -155,6 +157,7 @@ class Saml
$this->_enabled = $setting->saml_enabled == '1';
if ($this->isEnabled()) {
\Log::debug('SAML is enabled according to loadSettings()');
//Let onelogin/php-saml know to use 'X-Forwarded-*' headers if it is from a trusted proxy
OneLogin_Saml2_Utils::setProxyVars(request()->isFromTrustedProxy());

View File

@@ -10,6 +10,12 @@
],
"license": "AGPL-3.0-or-later",
"type": "project",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/grokability/laravel-scim-server"
}
],
"require": {
"php": ">=7.4 <8.1",
"ext-curl": "*",
@@ -18,15 +24,17 @@
"ext-mbstring": "*",
"ext-pdo": "*",
"alek13/slack": "^2.0",
"arietimmerman/laravel-scim-server": "dev-master",
"bacon/bacon-qr-code": "^2.0",
"barryvdh/laravel-debugbar": "^3.6",
"barryvdh/laravel-dompdf": "^1.0",
"doctrine/cache": "^1.10",
"doctrine/common": "^2.12",
"doctrine/dbal": "^3.1",
"doctrine/inflector": "^1.3",
"doctrine/instantiator": "^1.3",
"eduardokum/laravel-mail-auto-embed": "^1.0",
"enshrined/svg-sanitize": "^0.13.3",
"enshrined/svg-sanitize": "^0.15.0",
"erusev/parsedown": "^1.7",
"facade/ignition": "^2.10",
"fideloper/proxy": "^4.3",
@@ -60,7 +68,6 @@
"rollbar/rollbar-laravel": "^7.0",
"spatie/laravel-backup": "^6.16",
"tecnickcom/tc-lib-barcode": "^1.15",
"tightenco/ziggy": "v1.2.0",
"unicodeveloper/laravel-password": "^1.0",
"watson/validating": "^6.1"
},
@@ -104,7 +111,9 @@
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump"
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan vendor:publish --force --tag=livewire:assets --ansi"
],
"post-create-project-cmd": [
"php artisan key:generate"

857
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -328,6 +328,7 @@ return [
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Barryvdh\DomPDF\ServiceProvider::class,
/*
* Package Service Providers...
@@ -341,7 +342,6 @@ return [
Laravel\Passport\PassportServiceProvider::class,
Laravel\Tinker\TinkerServiceProvider::class,
Unicodeveloper\DumbPassword\DumbPasswordServiceProvider::class,
Tightenco\Ziggy\ZiggyServiceProvider::class, // Laravel routes in vue
Eduardokum\LaravelMailAutoEmbed\ServiceProvider::class,
/*
@@ -396,6 +396,7 @@ return [
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'PDF' => Barryvdh\DomPDF\Facade::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,

84
config/google2fa.php Normal file
View File

@@ -0,0 +1,84 @@
<?php
return [
/*
* Enable / disable Google2FA.
*/
'enabled' => env('OTP_ENABLED', true),
/*
* Lifetime in minutes.
*
* In case you need your users to be asked for a new one time passwords from time to time.
*/
'lifetime' => env('OTP_LIFETIME', 0), // 0 = eternal
/*
* Renew lifetime at every new request.
*/
'keep_alive' => env('OTP_KEEP_ALIVE', true),
/*
* Auth container binding.
*/
'auth' => 'auth',
/*
* Guard.
*/
'guard' => '',
/*
* 2FA verified session var.
*/
'session_var' => 'google2fa',
/*
* One Time Password request input name.
*/
'otp_input' => 'one_time_password', //should this be 'two_factor_secret'?
/*
* One Time Password Window.
*/
'window' => 1,
/*
* Forbid user to reuse One Time Passwords.
*/
'forbid_old_passwords' => false,
/*
* User's table column for google2fa secret.
*/
'otp_secret_column' => 'google2fa_secret',
/*
* One Time Password View.
*/
'view' => 'google2fa.index', //should this be 'auth.two_factor_enroll'?
/*
* One Time Password error message.
*/
'error_messages' => [
'wrong_otp' => "The 'One Time Password' typed was wrong.",
'cannot_be_empty' => 'One Time Password cannot be empty.',
'unknown' => 'An unknown error has occurred. Please try again.',
],
/*
* Throw exceptions or just fire events?
*/
'throw_exceptions' => env('OTP_THROW_EXCEPTION', true),
/*
* Which image backend to use for generating QR codes?
*
* Supports imagemagick, svg and eps
*/
'qrcode_image_backend' => \PragmaRX\Google2FALaravel\Support\Constants::QRCODE_IMAGE_BACKEND_SVG,
];

View File

@@ -6,6 +6,7 @@
|--------------------------------------------------------------------------
*/
return [
'Global' => [
@@ -97,6 +98,7 @@ return [
'display' => true,
],
[
'permission' => 'assets.view.requestable',
'label' => 'View Requestable Assets',
@@ -178,6 +180,7 @@ return [
],
],
'Licenses' => [
[
'permission' => 'licenses.view',
@@ -223,6 +226,7 @@ return [
],
],
'Components' => [
[
'permission' => 'components.view',
@@ -288,13 +292,6 @@ return [
'note' => '',
'display' => true,
],
[
'permission' => 'kits.checkout',
'label' => 'Checkout ',
'note' => '',
'display' => true,
],
],
'Users' => [
@@ -488,6 +485,7 @@ return [
],
],
'Manufacturers' => [
[
'permission' => 'manufacturers.view',
@@ -596,6 +594,9 @@ return [
],
],
'Self' => [
[
'permission' => 'self.two_factor',

5
config/scim.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
return [
"publish_routes" => false
];

View File

@@ -32,9 +32,9 @@ return [
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'stripe' => [

View File

@@ -117,7 +117,7 @@ return [
|
*/
'cookie' => env('COOKIE_NAME', 'snipeitv4_session'),
'cookie' => env('COOKIE_NAME', 'snipeitv6_session'),
/*
|--------------------------------------------------------------------------

View File

@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v6.0.0-RC-4',
'full_app_version' => 'v6.0.0-RC-4 - build 6754-gafd83311a',
'build_version' => '6754',
'app_version' => 'v6.0.0',
'full_app_version' => 'v6.0.0 - build 6860-g722e88a47',
'build_version' => '6860',
'prerelease_version' => '',
'hash_version' => 'gafd83311a',
'full_hash' => 'v6.0.0-RC-4-1-gafd83311a',
'branch' => 'develop',
'hash_version' => 'g722e88a47',
'full_hash' => 'v6.0.0-30-g722e88a47',
'branch' => 'master',
);

View File

@@ -1,5 +1,4 @@
<?php
namespace Database\Factories;
use App\Models\Category;
@@ -99,6 +98,7 @@ class LicenseFactory extends Factory
'seats' => 10,
'category_id' => 14,
];
return $data;
});

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCustomFieldCustomFieldset extends Migration
{
@@ -13,13 +13,14 @@ class CreateCustomFieldCustomFieldset extends Migration
public function up()
{
Schema::create('custom_field_custom_fieldset', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('custom_field_id');
$table->integer('custom_fieldset_id');
$table->integer('order');
$table->boolean('required');
$table->engine = 'InnoDB';
});
}
/**

View File

@@ -13,20 +13,22 @@ class CreateCheckoutAcceptancesTable extends Migration
*/
public function up()
{
Schema::create('checkout_acceptances', function (Blueprint $table) {
$table->increments('id');
if (!Schema::hasTable('checkout_acceptances')) {
Schema::create('checkout_acceptances', function (Blueprint $table) {
$table->increments('id');
$table->morphs('checkoutable');
$table->integer('assigned_to_id')->nullable();
$table->morphs('checkoutable');
$table->integer('assigned_to_id')->nullable();
$table->string('signature_filename')->nullable();
$table->string('signature_filename')->nullable();
$table->timestamp('accepted_at')->nullable();
$table->timestamp('declined_at')->nullable();
$table->timestamp('accepted_at')->nullable();
$table->timestamp('declined_at')->nullable();
$table->timestamps();
$table->softDeletes();
});
$table->timestamps();
$table->softDeletes();
});
}
}
/**
@@ -36,6 +38,8 @@ class CreateCheckoutAcceptancesTable extends Migration
*/
public function down()
{
Schema::dropIfExists('checkout_acceptances');
if (Schema::hasTable('checkout_acceptances')) {
Schema::dropIfExists('checkout_acceptances');
}
}
}

View File

@@ -1,7 +1,9 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class AddKitsLicensesTable extends Migration
{
@@ -12,15 +14,16 @@ class AddKitsLicensesTable extends Migration
*/
public function up()
{
//
Schema::create('kits_licenses', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(null);
$table->integer('license_id')->nullable()->default(null);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
if (!Schema::hasTable('kits_licenses')) {
Schema::create('kits_licenses', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(NULL);
$table->integer('license_id')->nullable()->default(NULL);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
@@ -29,7 +32,9 @@ class AddKitsLicensesTable extends Migration
*/
public function down()
{
//
Schema::drop('kits_licenses');
}
if (Schema::hasTable('kits_licenses')) {
Schema::drop('kits_licenses');
}
}
}

View File

@@ -1,7 +1,8 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class AddKitsTable extends Migration
{
@@ -12,14 +13,16 @@ class AddKitsTable extends Migration
*/
public function up()
{
//
Schema::create('kits', function ($table) {
$table->increments('id');
$table->string('name')->nullable()->default(null);
$table->timestamps();
$table->engine = 'InnoDB';
});
}
if (!Schema::hasTable('kits')) {
Schema::create('kits', function ($table) {
$table->increments('id');
$table->string('name')->nullable()->default(NULL);
$table->timestamps();
$table->engine = 'InnoDB';
});
}
}
/**
* Reverse the migrations.
@@ -28,7 +31,10 @@ class AddKitsTable extends Migration
*/
public function down()
{
//
Schema::drop('kits');
}
if (Schema::hasTable('kits')) {
Schema::drop('kits');
}
}
}

View File

@@ -1,7 +1,9 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class AddKitsModelsTable extends Migration
{
@@ -12,15 +14,16 @@ class AddKitsModelsTable extends Migration
*/
public function up()
{
//
Schema::create('kits_models', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(null);
$table->integer('model_id')->nullable()->default(null);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
if (!Schema::hasTable('kits_models')) {
Schema::create('kits_models', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(NULL);
$table->integer('model_id')->nullable()->default(NULL);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
}
/**
* Reverse the migrations.
@@ -29,7 +32,9 @@ class AddKitsModelsTable extends Migration
*/
public function down()
{
//
Schema::drop('kits_models');
if (Schema::hasTable('kits_models')) {
Schema::drop('kits_models');
}
}
}

View File

@@ -1,8 +1,8 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddKitsConsumablesTable extends Migration
{
@@ -13,14 +13,15 @@ class AddKitsConsumablesTable extends Migration
*/
public function up()
{
//
Schema::create('kits_consumables', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(null);
$table->integer('consumable_id')->nullable()->default(null);
$table->integer('quantity')->default(1);
$table->timestamps();
});
if (!Schema::hasTable('kits_consumables')) {
Schema::create('kits_consumables', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(NULL);
$table->integer('consumable_id')->nullable()->default(NULL);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
}
/**
@@ -30,7 +31,8 @@ class AddKitsConsumablesTable extends Migration
*/
public function down()
{
//
Schema::drop('kits_consumables');
if (Schema::hasTable('kits_consumables')) {
Schema::drop('kits_consumables');
}
}
}

View File

@@ -1,8 +1,8 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddKitsAccessoriesTable extends Migration
{
@@ -13,14 +13,15 @@ class AddKitsAccessoriesTable extends Migration
*/
public function up()
{
//
Schema::create('kits_accessories', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(null);
$table->integer('accessory_id')->nullable()->default(null);
$table->integer('quantity')->default(1);
$table->timestamps();
});
if (!Schema::hasTable('kits_accessories')) {
Schema::create('kits_accessories', function ($table) {
$table->increments('id');
$table->integer('kit_id')->nullable()->default(NULL);
$table->integer('accessory_id')->nullable()->default(NULL);
$table->integer('quantity')->default(1);
$table->timestamps();
});
}
}
/**
@@ -30,7 +31,8 @@ class AddKitsAccessoriesTable extends Migration
*/
public function down()
{
//
Schema::drop('kits_accessories');
if (Schema::hasTable('kits_accessories')) {
Schema::drop('kits_accessories');
}
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddRemoteToUser extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('remote')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
if (Schema::hasColumn('users', 'remote')) {
$table->dropColumn('remote');
}
});
}
}

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddEulaToCheckoutAcceptance extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('checkout_acceptances', function (Blueprint $table) {
$table->text('stored_eula')->nullable()->default(null);
$table->string('stored_eula_file')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('checkout_acceptances', function (Blueprint $table) {
if (Schema::hasColumn('checkout_acceptances', 'stored_eula')) {
$table->dropColumn('stored_eula');
}
if (Schema::hasColumn('checkout_acceptances', 'stored_eula_file')) {
$table->dropColumn('stored_eula_file');
}
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddEulaToActionLogs extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('action_logs', function (Blueprint $table) {
$table->text('stored_eula')->nullable()->default(null);
$table->string('stored_eula_file')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('action_logs', function (Blueprint $table) {
$table->dropColumn('stored_eula');
$table->dropColumn('stored_eula_file');
});
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddsLdapManager extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//Updates the Settings Table
Schema::table('settings', function (Blueprint $table) {
$table->string('ldap_manager')->after('ldap_jobtitle')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::table('settings', function (Blueprint $table) {
$table->dropColumn('ldap_manager');
});
}
}

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddPrimaryKeyToCustomFieldsPivot extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// Check if the ID primary key already exists, if not, add it
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
if (!Schema::hasColumn('custom_field_custom_fieldset', 'id')) {
$table->bigIncrements('id')->first();
}
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
if (Schema::hasColumn('custom_field_custom_fieldset', 'id')) {
$table->dropColumn('id');
}
});
}
}

253
package-lock.json generated
View File

@@ -1388,27 +1388,27 @@
}
},
"@types/eslint": {
"version": "8.2.1",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.2.1.tgz",
"integrity": "sha512-UP9rzNn/XyGwb5RQ2fok+DzcIRIYwc16qTXse5+Smsy8MOIccCChT15KAwnsgQx4PzJkaMq4myFyZ4CL5TjhIQ==",
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz",
"integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==",
"requires": {
"@types/estree": "*",
"@types/json-schema": "*"
}
},
"@types/eslint-scope": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.2.tgz",
"integrity": "sha512-TzgYCWoPiTeRg6RQYgtuW7iODtVoKu3RVL72k3WohqhjfaOLK5Mg2T4Tg1o2bSfu0vPkoI48wdQFv5b/Xe04wQ==",
"version": "3.7.3",
"resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz",
"integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==",
"requires": {
"@types/eslint": "*",
"@types/estree": "*"
}
},
"@types/estree": {
"version": "0.0.50",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz",
"integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw=="
"version": "0.0.51",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
"integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ=="
},
"@types/glob": {
"version": "7.2.0",
@@ -1842,13 +1842,9 @@
"integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA=="
},
"adler-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
"integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
"requires": {
"exit-on-epipe": "~1.0.1",
"printj": "~1.1.0"
}
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="
},
"admin-lte": {
"version": "2.4.18",
@@ -2790,9 +2786,9 @@
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"base64-arraybuffer": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.2.0.tgz",
"integrity": "sha512-7emyCsu1/xiBXgQZrscw/8KPRT44I4Yq9Pe6EGs3aPRTsWuggML1/1DTuZUuIaJPIm1FTDUVXl4x/yW8s0kQDQ=="
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
},
"base64-js": {
"version": "1.5.1",
@@ -2942,9 +2938,9 @@
"integrity": "sha1-EQPWvADPv6jPyaJZmrUYxVZD2j8="
},
"bootstrap-table": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.19.1.tgz",
"integrity": "sha512-WvV+l1AI/C+zThaKmfHmi/IuayVNB0qdFyEhFx1jyZhO0oLtNJNANkCR3rvJf6Dkh72dsLElxpE/bzK9seEQLA=="
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/bootstrap-table/-/bootstrap-table-1.20.0.tgz",
"integrity": "sha512-e6lOTG44aAeSFuOqFSjuMakXUlVF2jSkgtlDqa2lXbwq/Hn3Sn4TMSSJgSKdMnwX8WOpdlF3DIGUKQLiQ9vlXA=="
},
"brace-expansion": {
"version": "1.1.11",
@@ -3375,9 +3371,9 @@
"integrity": "sha512-jnT4Tq0Q4ma+6nncYQVe7d73kmDmE9C3OGTx3MvW7lBM/eY1S1DZTMBON7dqV481RhNiS5OxD7k9JQvmDOTirw=="
},
"canvg": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.9.tgz",
"integrity": "sha512-rDXcnRPuz4QHoCilMeoTxql+fvGqNAxp+qV/KHD8rOiJSAfVjFclbdUNHD2Uqfthr+VMg17bD2bVuk6F07oLGw==",
"version": "3.0.10",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.10.tgz",
"integrity": "sha512-qwR2FRNO9NlzTeKIPIKpnTY6fqwuYSequ8Ru8c0YkYU7U0oW+hLUvWadLvAu1Rl72OMNiFhoLu4f8eUjQ7l/+Q==",
"optional": true,
"requires": {
"@babel/runtime": "^7.12.5",
@@ -3391,9 +3387,9 @@
},
"dependencies": {
"core-js": {
"version": "3.20.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.1.tgz",
"integrity": "sha512-btdpStYFQScnNVQ5slVcr858KP0YWYjV16eGJQw8Gg7CWtu/2qNvIM3qVRIR3n1pK2R9NNOrTevbvAYxajwEjg==",
"version": "3.22.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz",
"integrity": "sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==",
"optional": true
},
"regenerator-runtime": {
@@ -3405,35 +3401,12 @@
}
},
"cfb": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.1.tgz",
"integrity": "sha512-wT2ScPAFGSVy7CY+aauMezZBnNrfnaLSrxHUHdea+Td/86vrk6ZquggV+ssBR88zNs0OnBkL2+lf9q0K+zVGzQ==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"requires": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0",
"printj": "~1.3.0"
},
"dependencies": {
"adler-32": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.0.tgz",
"integrity": "sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==",
"requires": {
"printj": "~1.2.2"
},
"dependencies": {
"printj": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.2.3.tgz",
"integrity": "sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA=="
}
}
},
"printj": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.3.0.tgz",
"integrity": "sha512-017o8YIaz8gLhaNxRB9eBv2mWXI2CtzhPJALnQTP+OPpuUfP0RMWqr/mHCzqVeu1AQxfzSfAtAq66vKB8y7Lzg=="
}
"crc-32": "~1.2.0"
}
},
"chalk": {
@@ -3907,13 +3880,9 @@
}
},
"crc-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz",
"integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==",
"requires": {
"exit-on-epipe": "~1.0.1",
"printj": "~1.1.0"
}
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
},
"create-ecdh": {
"version": "4.0.4",
@@ -4006,11 +3975,11 @@
}
},
"css-line-break": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.0.1.tgz",
"integrity": "sha512-gwKYIMUn7xodIcb346wgUhE2Dt5O1Kmrc16PWi8sL4FTfyDj8P5095rzH7+O8CTZudJr+uw2GCI/hwEkDJFI2w==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"requires": {
"base64-arraybuffer": "^0.2.0"
"utrie": "^1.0.2"
}
},
"css-loader": {
@@ -4487,9 +4456,9 @@
}
},
"dompurify": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.4.tgz",
"integrity": "sha512-6BVcgOAVFXjI0JTjEvZy901Rghm+7fDQOrNIcxB4+gdhj6Kwp6T9VBhBY/AbagKHJocRkDYGd6wvI+p4/10xtQ==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.7.tgz",
"integrity": "sha512-fsVZLywBd3awZIG3qU4JEdw7DCb0uUCajTfWRrLhsgKjTBd5CIIluPoAkNfco05GuNYQGj4/+bQIhlq96eT9eQ==",
"optional": true
},
"domutils": {
@@ -4596,9 +4565,9 @@
}
},
"enhanced-resolve": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
"integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==",
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz",
"integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==",
"requires": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
@@ -4671,13 +4640,13 @@
}
},
"es5-ext": {
"version": "0.10.53",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
"integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
"version": "0.10.61",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.61.tgz",
"integrity": "sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA==",
"requires": {
"es6-iterator": "~2.0.3",
"es6-symbol": "~3.1.3",
"next-tick": "~1.0.0"
"es6-iterator": "^2.0.3",
"es6-symbol": "^3.1.3",
"next-tick": "^1.1.0"
}
},
"es6-iterator": {
@@ -4880,11 +4849,6 @@
}
}
},
"exit-on-epipe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz",
"integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw=="
},
"express": {
"version": "4.17.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz",
@@ -4946,9 +4910,9 @@
},
"dependencies": {
"type": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
"integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw=="
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/type/-/type-2.6.0.tgz",
"integrity": "sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ=="
}
}
},
@@ -15016,12 +14980,12 @@
}
},
"html2canvas": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.3.3.tgz",
"integrity": "sha512-nQi0ayEY1cMiUMbq/F5hRwMAqsRMo7NIP6VaCqaXnXO6b/FfZO49oSfIJjdyRha28EuY8D6FBCzQOXPQV0TCrA==",
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"requires": {
"css-line-break": "2.0.1",
"text-segmentation": "^1.0.2"
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
}
},
"htmlescape": {
@@ -15662,7 +15626,7 @@
"jquery": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
"integrity": "sha1-xyoJ8Vwb3OFC9J2/EXC9+K2sJHA="
"integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
},
"jquery-form-validator": {
"version": "2.3.79",
@@ -15773,9 +15737,9 @@
"integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA="
},
"jspdf": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.0.tgz",
"integrity": "sha512-XT0E2m8A9P1xl7ItA2OUbmhokzbDQEyZEdWQZD2olADiTiBEZGDRiK1J1zWxBRUG2KezQJOZq//GYZTkvEZuJg==",
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.1.tgz",
"integrity": "sha512-hXObxz7ZqoyhxET78+XR34Xu2qFGrJJ2I2bE5w4SM8eFaFEkW2xcGRVUss360fYelwRSid/jT078kbNvmoW0QA==",
"requires": {
"@babel/runtime": "^7.14.0",
"atob": "^2.1.2",
@@ -15788,9 +15752,9 @@
},
"dependencies": {
"core-js": {
"version": "3.20.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.1.tgz",
"integrity": "sha512-btdpStYFQScnNVQ5slVcr858KP0YWYjV16eGJQw8Gg7CWtu/2qNvIM3qVRIR3n1pK2R9NNOrTevbvAYxajwEjg==",
"version": "3.22.5",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.5.tgz",
"integrity": "sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==",
"optional": true
}
}
@@ -16248,9 +16212,9 @@
}
},
"loader-runner": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz",
"integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw=="
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
"integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg=="
},
"loader-utils": {
"version": "1.4.0",
@@ -16715,9 +16679,9 @@
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"next-tick": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz",
"integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ=="
},
"no-case": {
"version": "3.0.4",
@@ -18020,11 +17984,6 @@
"integrity": "sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==",
"dev": true
},
"printj": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz",
"integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ=="
},
"private": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
@@ -19192,13 +19151,13 @@
}
},
"tableexport.jquery.plugin": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.21.0.tgz",
"integrity": "sha512-oCI9hn3XY7fKEepsL5IZbGhkT43pyWM6jE44PY0IwFJYGwhacKKxG1QhremY9CkCvUBaZ+Ks+FhBjA2qnS2uQg==",
"version": "1.26.0",
"resolved": "https://registry.npmjs.org/tableexport.jquery.plugin/-/tableexport.jquery.plugin-1.26.0.tgz",
"integrity": "sha512-PMad8npkQviiZG/J0kV6zphmcpNwMglxbxZjGR/7DtcKOTfiOzpcQQFIjHVqpnnKgpHHzOfV6GB9km6EkUAt4A==",
"requires": {
"file-saver": ">=2.0.1",
"html2canvas": ">=1.0.0",
"jquery": ">=1.9.1",
"jquery": ">=3.2.1",
"jspdf": ">=2.0.0",
"pdfmake": "^0.1.71",
"xlsx": ">=0.16.0"
@@ -19271,11 +19230,11 @@
"integrity": "sha1-1WqBhZDY/nLjh/d6Z/k6uW2OH7I="
},
"text-segmentation": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.2.tgz",
"integrity": "sha512-uTqvLxdBrVnx/CFQOtnf8tfzSXFm+1Qxau7Xi54j4OPTZokuDOX8qncQzrg2G8ZicAMOM8TgzFAYTb+AqNO4Cw==",
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"requires": {
"utrie": "^1.0.1"
"utrie": "^1.0.2"
}
},
"through": {
@@ -19575,18 +19534,11 @@
"dev": true
},
"utrie": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.1.tgz",
"integrity": "sha512-JPaDXF3vzgZxfeEwutdGzlrNoVFL5UvZcbO6Qo9D4GoahrieUPoMU8GCpVpR7MQqcKhmShIh8VlbEN3PLM3EBg==",
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"requires": {
"base64-arraybuffer": "^1.0.1"
},
"dependencies": {
"base64-arraybuffer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.1.tgz",
"integrity": "sha512-vFIUq7FdLtjZMhATwDul5RZWv2jpXQ09Pd6jcVEOvIsqCWTRFD/ONHNfyOS8dA/Ippi5dsIgpyKWKZaAKZltbA=="
}
"base64-arraybuffer": "^1.0.2"
}
},
"uuid": {
@@ -19684,12 +19636,12 @@
}
},
"webpack": {
"version": "5.65.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.65.0.tgz",
"integrity": "sha512-Q5or2o6EKs7+oKmJo7LaqZaMOlDWQse9Tm5l1WAfU/ujLGN5Pb0SqGeVkN/4bpPmEqEP5RnVhiqsOtWtUVwGRw==",
"version": "5.72.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.0.tgz",
"integrity": "sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w==",
"requires": {
"@types/eslint-scope": "^3.7.0",
"@types/estree": "^0.0.50",
"@types/eslint-scope": "^3.7.3",
"@types/estree": "^0.0.51",
"@webassemblyjs/ast": "1.11.1",
"@webassemblyjs/wasm-edit": "1.11.1",
"@webassemblyjs/wasm-parser": "1.11.1",
@@ -19697,12 +19649,12 @@
"acorn-import-assertions": "^1.7.6",
"browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.8.3",
"enhanced-resolve": "^5.9.2",
"es-module-lexer": "^0.9.0",
"eslint-scope": "5.1.1",
"events": "^3.2.0",
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.2.4",
"graceful-fs": "^4.2.9",
"json-parse-better-errors": "^1.0.2",
"loader-runner": "^4.2.0",
"mime-types": "^2.1.27",
@@ -19711,13 +19663,18 @@
"tapable": "^2.1.1",
"terser-webpack-plugin": "^5.1.3",
"watchpack": "^2.3.1",
"webpack-sources": "^3.2.2"
"webpack-sources": "^3.2.3"
},
"dependencies": {
"@types/json-schema": {
"version": "7.0.9",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
"integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ=="
"version": "7.0.11",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ=="
},
"graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
"integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="
},
"schema-utils": {
"version": "3.1.1",
@@ -19730,9 +19687,9 @@
}
},
"webpack-sources": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.2.tgz",
"integrity": "sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w=="
}
}
},
@@ -20114,14 +20071,14 @@
"dev": true
},
"xlsx": {
"version": "0.17.4",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.4.tgz",
"integrity": "sha512-9aKt8g9ZLP0CUdBX8L5xnoMDFwSiLI997eQnDThCaqQMYB9AEBIRzblSSNN/ICMGLYIHUO3VKaItcedZJ3ijIg==",
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"requires": {
"adler-32": "~1.2.0",
"cfb": "^1.1.4",
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"

View File

@@ -34,7 +34,7 @@
"bootstrap-colorpicker": "^2.5.3",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-less": "^3.3.8",
"bootstrap-table": "^1.19.1",
"bootstrap-table": "1.20.0",
"chart.js": "^2.9.4",
"css-loader": "^3.6.0",
"ekko-lightbox": "^5.1.1",
@@ -53,9 +53,9 @@
"papaparse": "^4.3.3",
"select2": "4.0.13",
"sheetjs": "^2.0.0",
"tableexport.jquery.plugin": "^1.21.0",
"tableexport.jquery.plugin": "1.26.0",
"tether": "^1.4.0",
"vue-resource": "^1.5.2",
"webpack": "^5.65.0"
"webpack": "^5.72.0"
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

21526
public/css/dist/all.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,135 +1 @@
#signature-pad {
padding-top: 250px;
margin: auto;
}
.m-signature-pad {
position: relative;
font-size: 10px;
width: 100%;
height: 300px;
border: 1px solid #e8e8e8;
background-color: #fff;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.08) inset;
border-radius: 4px;
}
.m-signature-pad:before, .m-signature-pad:after {
position: absolute;
z-index: -1;
content: "";
width: 40%;
height: 10px;
left: 20px;
bottom: 10px;
background: transparent;
-webkit-transform: skew(-3deg) rotate(-3deg);
-moz-transform: skew(-3deg) rotate(-3deg);
-ms-transform: skew(-3deg) rotate(-3deg);
-o-transform: skew(-3deg) rotate(-3deg);
transform: skew(-3deg) rotate(-3deg);
box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
}
.m-signature-pad:after {
left: auto;
right: 20px;
-webkit-transform: skew(3deg) rotate(3deg);
-moz-transform: skew(3deg) rotate(3deg);
-ms-transform: skew(3deg) rotate(3deg);
-o-transform: skew(3deg) rotate(3deg);
transform: skew(3deg) rotate(3deg);
}
.m-signature-pad--body {
position: absolute;
top: 20px;
bottom: 60px;
border: 1px solid #f4f4f4;
background-color: white;
}
.m-signature-pad--body
canvas {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 4px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
}
.m-signature-pad--footer {
position: absolute;
left: 20px;
right: 20px;
bottom: 20px;
height: 40px;
}
.m-signature-pad--footer
.description {
color: #C3C3C3;
text-align: center;
font-size: 1.2em;
margin-top: 1.8em;
}
.m-signature-pad--footer
.button {
position: absolute;
bottom: 0;
}
.m-signature-pad--footer
.button.clear {
left: 0;
}
.m-signature-pad--footer
.button.save {
right: 0;
}
@media screen and (max-width: 1024px) {
.m-signature-pad {
top: 0;
left: 0;
right: 0;
bottom: 0;
width: auto;
height: auto;
min-width: 250px;
min-height: 140px;
margin: 5%;
}
}
@media screen and (min-device-width: 768px) and (max-device-width: 1024px) {
.m-signature-pad {
margin: 10%;
}
}
@media screen and (max-height: 320px) {
.m-signature-pad--body {
left: 0;
right: 0;
top: 0;
bottom: 32px;
}
.m-signature-pad--footer {
left: 20px;
right: 20px;
bottom: 4px;
height: 28px;
}
.m-signature-pad--footer
.description {
font-size: 1em;
margin-top: 1em;
}
}
#signature-pad{padding-top:250px;margin:auto}.m-signature-pad{position:relative;font-size:10px;width:100%;height:300px;border:1px solid #e8e8e8;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.27),0 0 40px rgba(0,0,0,.08) inset;border-radius:4px}.m-signature-pad:after,.m-signature-pad:before{position:absolute;z-index:-1;content:"";width:40%;height:10px;left:20px;bottom:10px;background:0 0;-webkit-transform:skew(-3deg) rotate(-3deg);-moz-transform:skew(-3deg) rotate(-3deg);-ms-transform:skew(-3deg) rotate(-3deg);-o-transform:skew(-3deg) rotate(-3deg);transform:skew(-3deg) rotate(-3deg);box-shadow:0 8px 12px rgba(0,0,0,.4)}.m-signature-pad:after{left:auto;right:20px;-webkit-transform:skew(3deg) rotate(3deg);-moz-transform:skew(3deg) rotate(3deg);-ms-transform:skew(3deg) rotate(3deg);-o-transform:skew(3deg) rotate(3deg);transform:skew(3deg) rotate(3deg)}.m-signature-pad--body{position:absolute;top:20px;bottom:60px;border:1px solid #f4f4f4;background-color:#fff}.m-signature-pad--body canvas{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:4px;box-shadow:0 0 5px rgba(0,0,0,.02) inset}.m-signature-pad--footer{position:absolute;left:20px;right:20px;bottom:20px;height:40px}.m-signature-pad--footer .description{color:#c3c3c3;text-align:center;font-size:1.2em;margin-top:1.8em}.m-signature-pad--footer .button{position:absolute;bottom:0}.m-signature-pad--footer .button.clear{left:0}.m-signature-pad--footer .button.save{right:0}@media screen and (max-width:1024px){.m-signature-pad{top:0;left:0;right:0;bottom:0;width:auto;height:auto;min-width:250px;min-height:140px;margin:5%}}@media screen and (min-device-width:768px) and (max-device-width:1024px){.m-signature-pad{margin:10%}}@media screen and (max-height:320px){.m-signature-pad--body{left:0;right:0;top:0;bottom:32px}.m-signature-pad--footer{left:20px;right:20px;bottom:4px;height:28px}.m-signature-pad--footer .description{font-size:1em;margin-top:1em}}

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