Compare commits

...

3048 Commits

Author SHA1 Message Date
snipe 61fd427678 Bumped version
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-07-05 14:41:34 +01:00
snipe d890d923ff Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2023-07-05 14:40:54 +01:00
snipe 32747cafde Merge remote-tracking branch 'origin/develop' 2023-07-05 14:37:53 +01:00
snipe 4b4983e550 Merge pull request #13253 from uberbrady/improve_scim_404s
Properly return SCIM Exceptions
2023-07-05 14:37:32 +01:00
Brady Wetherington a6a89ddd6c Also log(debug) the error - could be useful for troubleshooting 2023-07-05 14:31:08 +01:00
Brady Wetherington 1f4d2f1e4a Properly return SCIM Exceptions 2023-07-05 14:27:10 +01:00
snipe e18c3e08be Merge remote-tracking branch 'origin/develop' 2023-06-29 21:23:53 +01:00
snipe bbbeaaee2b Merge pull request #13232 from Godmartinz/labels_overlapping_issue
fixed barcode and info from overlapping
2023-06-29 21:23:31 +01:00
snipe 33b1a31ed3 Merge remote-tracking branch 'origin/develop' 2023-06-29 21:19:25 +01:00
Godfrey M df90e924b4 prevent labels from overlapping 2023-06-29 13:18:17 -07:00
snipe 630b6496ec Merge pull request #13231 from snipe/fixes/small_fix_for_error_during_seeding
Redirect if the license can’t be found
2023-06-29 21:18:02 +01:00
snipe 7937542dcb Redirect if the license can’t be found
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 21:15:50 +01:00
snipe 1b71ab6d86 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:41:16 +01:00
snipe af26ec471f Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-06-29 20:41:05 +01:00
snipe e236bf412c Merge pull request #13230 from snipe/fixes/windows_backup_filename_colon_wtf_issue
Fixed windows backup filename - swapped colon in timestamp to hyphen to handle windows filesystems
2023-06-29 20:37:09 +01:00
snipe fb9b3a5453 Switched from a colon to a hyphen to handle windows filesystems
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:32:20 +01:00
snipe faf2a235fb Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 20:31:13 +01:00
snipe 9f99f8275c Merge pull request #13229 from Godmartinz/status_label_color
fixed custom fields labels being unreadable
2023-06-29 20:21:46 +01:00
Godfrey M f83effbb85 removed unnecessary css rule 2023-06-29 11:25:40 -07:00
Godfrey M d4cddebba5 fixes custom fields labels being unreadable 2023-06-29 11:21:21 -07:00
snipe 4dd71e0332 Merge remote-tracking branch 'origin/develop' 2023-06-29 17:14:15 +01:00
snipe 825e988dfa Merge pull request #13228 from snipe/bug/sc-23434
Use proper alias for table scope
2023-06-29 17:11:50 +01:00
snipe bcefe73c9c Use proper alias for table scope
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 16:52:09 +01:00
snipe 4908082240 Merge remote-tracking branch 'origin/develop' 2023-06-29 16:23:35 +01:00
snipe a3096e1b47 Merge pull request #13219 from inietov/features/cancel_request_asset
Cancel requested assets without checkin/out [ch-17606]
2023-06-29 16:18:13 +01:00
snipe 16ce06a3cc Merge pull request #13222 from snipe/feature/sc-23427
Fixed #13213 - Use the Helper::parseEscapedMarkedown in notes
2023-06-29 16:16:25 +01:00
snipe 8be3a6985b Merge pull request #13227 from snipe/bug/sc-23433
More reshuffling of scopes in assets API
2023-06-29 16:10:26 +01:00
snipe ead5f039b4 Merge remote-tracking branch 'origin/develop' 2023-06-29 15:33:12 +01:00
snipe 4c3a306a6e More shuffling of scopes
Signed-off-by: snipe <snipe@snipe.net>
2023-06-29 13:35:41 +01:00
snipe f7f2d799f2 Merge pull request #13223 from inietov/fixes/delete_notes_map_from_asset_importer
Delete notes column map from assets importer
2023-06-28 20:06:33 +01:00
Ivan Nieto Vivanco a4b8723dcb Delete notes column map from assets importer 2023-06-28 11:38:51 -06:00
Ivan Nieto Vivanco e2c2736a9c Delete (gulp) Form for bulk edit since is not used in this view 2023-06-28 11:23:37 -06:00
Ivan Nieto Vivanco 85e717bc4e Fix cancel button style and translate title 2023-06-28 10:38:44 -06:00
snipe 2c23c71823 Merge remote-tracking branch 'origin/develop' 2023-06-28 16:41:49 +01:00
snipe 161f4c8d83 Merge pull request #13045 from akemidx/feature/sc-23261
Checkin/out info on side bar
2023-06-28 16:41:21 +01:00
snipe e1fdfd01f6 Merge pull request #13211 from marcusmoore/company-scoping
Improve testing around company scoping
2023-06-28 16:17:07 +01:00
snipe 4278471d81 Merge pull request #13207 from Godmartinz/half_year_dep_fix
adds half_year fix from jdickerson71388
2023-06-28 15:12:30 +01:00
snipe e3f381a1e1 Merge pull request #13212 from marcusmoore/feature/sc-23419
Allow running tests in parallel
2023-06-28 15:12:13 +01:00
snipe 8d8adc1639 Use the Helper::parseEscapedMarkedown in notes
Signed-off-by: snipe <snipe@snipe.net>
2023-06-28 15:02:32 +01:00
snipe a455f67d62 Merge pull request #13216 from marcusmoore/bug/sc-23420
Fix translation string in user importer
2023-06-28 07:03:11 +01:00
snipe b6a11cde65 Merge pull request #13218 from marcusmoore/chore/sc-23424
Have ChipperCI run on each PR
2023-06-28 07:01:14 +01:00
snipe a8d4494e68 Merge pull request #13220 from marcusmoore/bug/sc-23425
Add missing relationship check in Asset Transformer
2023-06-28 06:59:33 +01:00
Marcus Moore ab51857854 Check to see if model relationship exists before using it 2023-06-27 19:35:55 -07:00
Ivan Nieto Vivanco 8496e64e16 Adds ternary to set a quantity when needed 2023-06-27 18:37:22 -06:00
Ivan Nieto Vivanco b4b84f91d0 Redirect to correct page after cancel action 2023-06-27 18:25:38 -06:00
Ivan Nieto Vivanco 1c29bd37a6 Added feature to cancel requests from the Requested Assets view 2023-06-27 18:11:10 -06:00
Marcus Moore 6df7be8c13 Have ChipperCI run on each PR 2023-06-27 16:55:20 -07:00
Ivan Nieto Vivanco eb4d764601 Refactor Requestable@cancelRequest() firm to admit a user_id so we can cancel a request of whatever user we want 2023-06-27 17:13:11 -06:00
Ivan Nieto Vivanco b647a8fcd2 Change the inline form HTML label to the Form:: facade 2023-06-27 17:02:25 -06:00
Ivan Nieto Vivanco 62347a56ba Add button with cancel action in requested assets view 2023-06-27 16:41:30 -06:00
Marcus Moore b0177d513a Fix translation 2023-06-27 12:37:19 -07:00
Marcus Moore 3f09e6017b Install paratest to allow for parallel test running 2023-06-26 16:22:28 -07:00
Marcus Moore 2abdb8a5fd Revert unneeded changes 2023-06-26 14:01:09 -07:00
Marcus Moore 7cb22d3d49 Remove incomplete tests 2023-06-26 14:00:53 -07:00
Marcus Moore 3cb0920411 Merge branch 'develop' into company-scoping 2023-06-26 12:32:10 -07:00
Godfrey M 114d946437 adds half_year fix from jdickerson71388 2023-06-26 11:26:46 -07:00
snipe 4cb9c25e83 Merge remote-tracking branch 'origin/develop' 2023-06-26 08:30:35 +01:00
snipe 49b50d81ee Merge pull request #13200 from snipe/bug/sc-23417
Set table alias for model number sort scope
2023-06-26 08:29:16 +01:00
snipe 4f7b2836b5 Set table alias for model number sort scope
Signed-off-by: snipe <snipe@snipe.net>
2023-06-26 08:27:17 +01:00
Marcus Moore acd06927ac Add helper method for authenticating with passport 2023-06-22 17:37:30 -07:00
Marcus Moore a35d83d14a Migrate to response macros for readability 2023-06-22 14:41:56 -07:00
snipe 8c6bde335e Merge pull request #13196 from inietov/fixes/default_status_labels_when_import
Fixed issue when importing Assets and no status labels exists [sc-23359]
2023-06-22 21:34:25 +01:00
snipe b2d74f7e95 Merge pull request #13186 from snipe/bug/sc-23386
Moved logic for tighter constraints when ids are passed
2023-06-22 21:32:36 +01:00
snipe 78d8e32a22 Fixed weird order number thing
Signed-off-by: snipe <snipe@snipe.net>
2023-06-22 21:16:24 +01:00
snipe 4029efebfd Merge pull request #13159 from Godmartinz/audit_image_bug
fixed audit log image not appearing
2023-06-22 21:11:39 +01:00
Marcus Moore 8aae5beaba Add explicit select back to query 2023-06-22 13:09:08 -07:00
Marcus Moore a8133f62e8 Add explicit select back to query 2023-06-22 13:07:49 -07:00
Ivan Nieto Vivanco 67e47a7d8b Add guard clause to obtain the default ID of imported asset's status label 2023-06-22 13:53:58 -06:00
Marcus Moore a333d7b72f Add context to incomplete tests 2023-06-22 12:48:09 -07:00
Marcus Moore ab5fed09db Remove scopeCompanyables call from AssetsController@requestable 2023-06-22 12:36:43 -07:00
Marcus Moore 74b072f1b5 Improve messaging in testing helper 2023-06-22 12:36:30 -07:00
Marcus Moore 0a5e1e3190 Remove scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:21:36 -07:00
Marcus Moore effd969284 Scaffold test before removing scopeCompanyables call from AssetsController@selectlist 2023-06-21 17:15:02 -07:00
Marcus Moore fd55c99b87 Remove scopeCompanyables call from AssetsController@index 2023-06-21 16:29:44 -07:00
Marcus Moore af77fefc61 Scaffold test before removing scopeCompanyables call from AssetsController 2023-06-21 16:19:56 -07:00
Marcus Moore 65e8e4e163 Guard against attempting to use invalid property 2023-06-21 16:18:09 -07:00
snipe c377e0617c Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-06-21 19:07:07 +01:00
snipe 17a10a4342 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 19:06:21 +01:00
snipe 5d4e704fac Added a comment
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 09:26:54 +01:00
snipe 2d9ddab3f0 Moved logic for tighter constraints when ids are passed
Signed-off-by: snipe <snipe@snipe.net>
2023-06-21 09:24:17 +01:00
snipe 2ac4449ea3 Merge remote-tracking branch 'origin/develop' 2023-06-15 20:30:07 +01:00
snipe f890e1f8b1 Merge pull request #13171 from snipe/features/importer/allow_update_by_user_id
Accept user ID as authoratative field for updates
2023-06-15 20:08:20 +01:00
snipe 7a425f8a49 Merge pull request #13093 from NojoudAlshehri/features/added_asset_tag_colum_in_requestable_assets
feature: Added asset_tag column in requestable assets page
2023-06-15 19:37:18 +01:00
snipe 21a27f43a9 Merge pull request #13158 from Godmartinz/asset_maint_warranty_bug
Added warranty confirmation to asset maintenance table
2023-06-15 19:34:16 +01:00
snipe 09d65f810e Merge pull request #13124 from m4us1ne/fix_dompdf_chroot
Fixed #12434: Include Docker Specific Paths for dompdf chroot
2023-06-15 19:32:34 +01:00
snipe 004992086e Merge pull request #13098 from ak-piracha/feature/snipe-13049-status-label-chart-color
Fixed #13098: Status Label Chart Color, resets to default when editing a Status Label
2023-06-15 16:55:32 +01:00
snipe 6c684bccd0 Accept user ID as authoratative field for updates
Signed-off-by: snipe <snipe@snipe.net>
2023-06-15 10:02:05 +01:00
Godfrey M ee50906e44 attempt to add warranty to api controller 2023-06-13 11:20:55 -07:00
snipe 83708e1be9 Merge remote-tracking branch 'origin/develop' 2023-06-13 18:36:22 +01:00
snipe 157a4341ea Merge pull request #13041 from snipe/features/refactor_importer_for_localization
Refactor importer for localization
2023-06-13 18:12:07 +01:00
snipe f1bf7267f7 Merge pull request #13164 from snipe/localizations/updated_strings
Updated translation strings
2023-06-13 17:24:01 +01:00
snipe 0bb8cc63c5 Updated translation strings
Signed-off-by: snipe <snipe@snipe.net>
2023-06-13 17:12:01 +01:00
Godfrey M fc86530c94 uses the trueFalseFormatter now 2023-06-13 09:10:42 -07:00
Godfrey M 6dd7181d09 fixed audit log image not appearing 2023-06-12 12:10:19 -07:00
Godfrey M 69325beddb adds warranty confirmation to asset maintenance table 2023-06-12 11:03:32 -07:00
snipe d1ab139b0f Add @qay21 as a contributor 2023-06-12 14:05:43 +01:00
snipe dc43985884 Applied #13143 to develop
Signed-off-by: snipe <snipe@snipe.net>
2023-06-12 14:05:26 +01:00
snipe f552bcef78 Merge pull request #13143 from qay21/patch-1
Fixed #13129: Add missing LDAP lib required for LDAPS support
2023-06-12 14:04:05 +01:00
Quentin Aymard fc6c5eadd7 Fix missing ldap packages
This should provide LDAPS support out of the box, and fix #13129
2023-06-09 11:14:41 +02:00
Lukas Jung 9fca8c2438 Fixed #12434: Include Docker Specific Paths for dompdf chroot 2023-06-09 11:00:46 +02:00
snipe 924d0b25e8 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-06-08 08:53:22 +01:00
snipe c78c69700f Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:49:55 +01:00
snipe 4775eef392 Merge pull request #13140 from snipe/security/misc_libraries
Updated libraries and dev assets
2023-06-08 08:48:55 +01:00
snipe 14727700ab Updated libraries and dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:48:18 +01:00
snipe a6b1320b39 Add @stefanstidlffg as a contributor 2023-06-08 08:11:34 +01:00
snipe 4672f6a699 Merge pull request #13139 from snipe/security/updated_webpack
Updated webpack, added new dev assets
2023-06-08 08:11:07 +01:00
snipe 03233465c7 Updated webpack, added new dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-06-08 08:10:12 +01:00
snipe 8a72056bfd Merge pull request #13123 from osterr-forschungsforderungsges-mbh/fix-slack-notifications
fix slack channel notifications
2023-06-08 05:51:08 +01:00
Marcus Moore 7672861b96 Scaffold test before removing scopeCompanyables call from DashboardController 2023-06-07 17:38:23 -07:00
Marcus Moore 6f5252449e Scaffold test before removing scopeCompanyables call from UsersController 2023-06-07 16:25:18 -07:00
Marcus Moore 0f6051bbe5 Inline method call 2023-06-07 16:18:02 -07:00
Marcus Moore abaf59c990 Extract and use helper methods 2023-06-07 16:16:30 -07:00
Marcus Moore 27d4d107bb Scaffold test before removing scopeCompanyables call from DepartmentsController 2023-06-07 16:10:29 -07:00
Marcus Moore 8e6e525b47 Remove scopeCompanyables call from LicensesController 2023-06-07 16:09:45 -07:00
Marcus Moore a18f5e7fc0 Remove scopeCompanyables call from ConsumablesController 2023-06-07 14:22:22 -07:00
snipe adb2757532 Add @NojoudAlshehri as a contributor 2023-06-07 16:52:22 +01:00
snipe b57730ee9d Added missing assets_fields declaration
Signed-off-by: snipe <snipe@snipe.net>
2023-06-07 15:52:18 +01:00
snipe 9335bf7033 Merge pull request #13122 from marcusmoore/fixes/increase-consumable-factory-name-length
Fixes potentially invalid name in consumable factory
2023-06-07 11:43:13 +01:00
snipe 45b76c4c75 Merge pull request #13127 from NojoudAlshehri/fixes/typo-in-a-html-tag
Fix of typo in an HTML tag
2023-06-07 09:21:51 +01:00
NojoudAlshehri d06bdc2db4 Fix of typo in an HTML tag 2023-06-07 13:46:17 +07:00
Marcus Moore 48850f3597 Remove scopeCompanyables call from ComponentsController 2023-06-06 18:02:18 -07:00
Marcus Moore 4fb86ad2fb Get name as a string and not an array 2023-06-06 16:31:26 -07:00
Marcus Moore 42a4941ad2 Ensure consumable name is valid in factory 2023-06-06 16:31:26 -07:00
Marcus Moore 6585aa0cf0 Add unit tests for company scoping 2023-06-06 16:31:14 -07:00
Stefan Stidl ad8c36a51a fix: slack channel 2023-06-06 10:30:01 +02:00
Marcus Moore d3a0bacb98 Get name as a string and not an array 2023-06-05 12:57:09 -07:00
Marcus Moore 371d11305b Ensure consumable name is valid in factory 2023-06-05 12:17:44 -07:00
snipe fc5b02e392 Merge remote-tracking branch 'origin/develop' 2023-06-01 19:51:49 +01:00
snipe 7ae260b489 More license translations
Signed-off-by: snipe <snipe@snipe.net>
2023-06-01 19:51:06 +01:00
snipe ff480a7247 Merge pull request #13114 from inietov/fixes/broken_sorting_manufacturers
Fixed Broken order by manufacturer in Assets table [sc-23313]
2023-06-01 19:40:16 +01:00
Ivan Nieto Vivanco f9a20bc917 Replace join with left join in pertinent eloquent query 2023-06-01 12:08:51 -06:00
ak-piracha daf6bcb6d5 follow best practices when working with blade and javascript 2023-06-01 11:07:21 +09:30
snipe 18eda15ec1 Merge remote-tracking branch 'origin/develop' 2023-05-31 16:19:34 +01:00
snipe e431cd5146 Merge pull request #13085 from inietov/fixes/checkboxes_not_holding_value
Fixed #12978 Custom Field Checkboxes not holding assigned values
2023-05-31 10:55:37 -04:00
snipe 35942361b6 Add @ak-piracha as a contributor 2023-05-31 15:51:39 +01:00
snipe 596b510a25 Merge pull request #13108 from ak-piracha/fixes/component_delete_showing_in_assest
Fixes: issue #13073: deleted component addearing in asset component t…
2023-05-31 10:50:34 -04:00
ak-piracha 1cdf089306 Fixes: issue #13073: deleted component addearing in asset component tab fixed 2023-05-31 00:11:11 +09:30
snipe c05a4452bc Merge + update assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-05-29 18:20:12 -04:00
snipe 13e8f91a59 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-29 18:18:46 -04:00
ak-piracha 825a9a384d Fixed 2023-05-29 14:07:53 +09:30
NojoudAlshehri 980cb53efa Added asset_tag column in requestable assets page 2023-05-27 07:05:59 +07:00
snipe 60d2046b6d Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:13:33 -07:00
snipe 67e0eb3193 Merge pull request #13046 from Godmartinz/asset_info_overflow
Added Asset info overflow-wrap
2023-05-24 16:13:01 -07:00
snipe 44cbb0c2e9 Merge branch 'develop' into asset_info_overflow 2023-05-24 16:11:34 -07:00
snipe a3a64be19b Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-05-24 16:06:26 -07:00
snipe fb5e33c50f Updated hash
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:03:15 -07:00
snipe d7f4fa146b Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:02:28 -07:00
snipe 064dbdd3d4 Fixed missing brace from conflict
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 16:02:23 -07:00
snipe cc07921608 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-24 15:59:52 -07:00
snipe 267a0ffc59 Merge pull request #13077 from Godmartinz/fix_unclickable_nav_bar_and_notifcation_block
fixes mobile nav bar and notification position
2023-05-24 15:58:27 -07:00
snipe 9086cb5310 Merge branch 'develop' into fix_unclickable_nav_bar_and_notifcation_block 2023-05-24 15:56:01 -07:00
Ivan Nieto Vivanco f4947bfa93 Use trim() function when format the custom field values as array 2023-05-24 04:06:31 -06:00
snipe 5e96fd200f Refactor to remove general_fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 20:31:53 -07:00
snipe d020825a17 Renamed import samples
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:31:42 -07:00
snipe 3ef081e739 Indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:28:42 -07:00
snipe 47fa490e8a More translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:28:23 -07:00
snipe 01768bf649 Renamed sample csv
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:23:29 -07:00
snipe 52cf54d211 New assets CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:22:08 -07:00
snipe 55683c29dc Removed method that does the same return
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:22:00 -07:00
snipe f355a6e9e1 Added first name and last name
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:21:31 -07:00
snipe 3e4426c68c Clearer comments
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 19:20:52 -07:00
snipe 2e5486a62e Merge pull request #13076 from marcusmoore/fixes/allow-multi-column-search-in-sqlite
Dynamically adapt concatenation searches for MySQL and sqlite
2023-05-23 16:27:12 -07:00
Marcus Moore 0a3d46824e Automatically add table prefixes when building multi-column search string 2023-05-23 15:58:58 -07:00
snipe f69caf77e5 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 14:57:57 -07:00
snipe 61d5bd8567 Removed comment
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 14:57:15 -07:00
snipe 80e8022c76 Merge pull request #13044 from Godmartinz/bug/sc-23260_multi_select_example_text
Bug/sc 23260 multi select example text
2023-05-23 14:45:55 -07:00
Marcus Moore 6300909fee Add test for searching for user's first and last name 2023-05-23 13:39:01 -07:00
Marcus Moore b2b6f0cf96 Use new dynamic scope where possible 2023-05-23 13:38:50 -07:00
Marcus Moore 054d71aedc Add docblock 2023-05-23 13:37:04 -07:00
Marcus Moore 9078d4c71c Add dynamic scope for prettier multiple column search 2023-05-23 13:35:19 -07:00
snipe d4c5a4eb2e More aliases
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 13:18:32 -07:00
snipe 35794c8ba2 More translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:48 -07:00
snipe 62384260bc Clarifying comment
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:40 -07:00
snipe f2e9b41199 More user fields in asset importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:34 -07:00
snipe 479350ed7b Removed unneeded mapping file
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:57:24 -07:00
Godfrey M 68a43cb590 fixes mobile nav bar and notification position 2023-05-23 12:43:32 -07:00
snipe 809dcdc50c Updated CSVs
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:13:17 -07:00
snipe d0f5a044ba More refactoring
Signed-off-by: snipe <snipe@snipe.net>
2023-05-23 12:13:06 -07:00
Marcus Moore 05a2e568d7 Add comment 2023-05-23 11:37:09 -07:00
snipe fbed18a984 Merge pull request #13075 from inietov/fixes/api_incorrect_remaining_accessories
Fixed #13074 [API] Remaining accessories quantity not correct
2023-05-23 11:08:37 -07:00
Ivan Nieto Vivanco 086265455d Pass user count to the eloquent query 2023-05-23 11:53:09 -06:00
Marcus Moore f40e722397 Add docblock 2023-05-22 17:44:17 -07:00
Marcus Moore 50234bc9a5 Formatting 2023-05-22 17:40:06 -07:00
Marcus Moore 9b512648a3 Update searchRelations in Searchable trait 2023-05-22 17:33:19 -07:00
Marcus Moore 64e83ed9f5 Update scopeAssignedSearch in Asset 2023-05-22 16:54:54 -07:00
snipe 0c7acd6a3b Merge pull request #13070 from inietov/fixes/accessory_image_shown_when_disabled
Fixed #12947 Accessory image in checkin email when Show images in emails is disabled
2023-05-22 15:30:14 -07:00
Ivan Nieto Vivanco 6df9a33eab Add a condition to check if images should be shown in notification 2023-05-22 16:24:16 -06:00
snipe f9449aa81f Merge pull request #13069 from marcusmoore/fixes/add-eager-load-to-asset-model-endpoint
Add eager loading to Asset Models controller
2023-05-22 14:39:32 -07:00
Marcus Moore a6eeae6541 Eager load fieldset default values in asset model endpoint 2023-05-22 14:19:03 -07:00
snipe b2d922f127 New user import sample CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:20:20 -07:00
snipe 96e86501ad Additional alias fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:20:08 -07:00
snipe 4dfe6f0a28 Added gravatar, avatar, start_date and end_date to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-22 13:19:57 -07:00
snipe 511d83cc47 Added/fixed a few more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:52:42 -07:00
snipe 2171d8c83c Removed requestable field in sample consumable CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:52:28 -07:00
snipe 0ea29a0224 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:36 -07:00
snipe 18bedb736e Removed item number, since not everything will have it
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:29 -07:00
snipe 1396e314c4 Updated arrays with translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:21:13 -07:00
snipe b75109dcac Added component mapping switch
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:20:49 -07:00
snipe b7149d8339 Added translation
Signed-off-by: snipe <snipe@snipe.net>
2023-05-20 14:20:38 -07:00
Marcus Moore 2d86c8f030 Update advancedTextSearch methods in Asset and User models 2023-05-18 17:06:41 -07:00
Marcus Moore 3a9670930d Define required fields in Custom Field seeder so sqlite can be seeded 2023-05-18 13:17:35 -07:00
Marcus Moore 85974c7f65 Apply formatting 2023-05-18 13:16:52 -07:00
Marcus Moore ffbde46180 Simplify sqlite query 2023-05-18 13:06:50 -07:00
Marcus Moore d8d672c4c1 Move multiple column search function to Searchable trait 2023-05-18 13:05:40 -07:00
Marcus Moore 9cb0decf35 Adapt multiple column search based on database driver 2023-05-18 12:54:00 -07:00
Godfrey M 608d07d03c adds overflow-wrap to asset info table 2023-05-17 13:08:53 -07:00
Godfrey M addd806653 testing overflow solutions 2023-05-17 10:47:50 -07:00
Godfrey M fe60309dfd adds padding to multi select2 inputs 2023-05-17 10:19:25 -07:00
akemidx deca80ba71 checkin/out info on side bar 2023-05-17 13:17:48 -04:00
Godfrey M 448472b6d3 testing input paddings 2023-05-17 09:45:45 -07:00
snipe f1b4bba3ae Merge remote-tracking branch 'origin/develop' 2023-05-16 23:12:41 -07:00
snipe 2c4c9a16c9 Refactored the static arrays into mount arrays for translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:31:58 -07:00
snipe d228b7f347 Remove 99% of the defaultMap stuff (might pull all of this later)
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:31:01 -07:00
snipe 7012018e22 Removed todo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 22:30:17 -07:00
snipe 13c6a7f89b Merge pull request #13039 from snipe/features/add_eol_date_to_importer
Added EOL date to importer
2023-05-16 20:12:10 -07:00
snipe 3296716dfa Added EOL date to importer
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 19:06:35 -07:00
snipe dbae01f545 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/mix-manifest.json
2023-05-16 17:41:39 -07:00
snipe c4876865cf Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 17:36:58 -07:00
snipe 3cbb4620c3 Merge pull request #13008 from Godmartinz/importer_happy_changes
Added standardized colors to the importer
2023-05-16 17:26:32 -07:00
snipe 5a1e6c8e29 Merge pull request #13003 from marcusmoore/chipper-config-updates
Disable browser tests in ChipperCI
2023-05-16 17:26:09 -07:00
snipe f1575d2020 Merge pull request #13024 from Godmartinz/adds_localization_to_checkout_notif
adds translation to checkout notification
2023-05-16 17:25:50 -07:00
snipe 71234228b4 Merge pull request #13025 from Godmartinz/archived_clears_assigned_to
removes assigned_to if archived
2023-05-16 17:25:24 -07:00
snipe 5be993df8d Merge remote-tracking branch 'origin/develop' 2023-05-16 16:42:17 -07:00
snipe 4ca914d773 Merge pull request #13038 from uberbrady/fix_asset_checkout_on_update
Importer fix for non-Location imports
2023-05-16 16:41:27 -07:00
Brady Wetherington 2eb34d423f Importer fix for non-Location imports 2023-05-16 16:33:07 -07:00
snipe 37f75c5001 Merge remote-tracking branch 'origin/develop' 2023-05-16 16:29:36 -07:00
snipe b9b9eb86d9 Merge pull request #13036 from snipe/features/multiselect_locations_custom_report
Added multi-select option for location, more to custom report
2023-05-16 16:29:13 -07:00
snipe 9e4e9cc708 Merge pull request #13037 from snipe/fixes/actions_text
Uses actions text in backups table
2023-05-16 16:06:05 -07:00
snipe fe92667812 Use actions text in backups table
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 16:02:48 -07:00
snipe 02cacf76c6 Additional multi-select options for custom report
Signed-off-by: snipe <snipe@snipe.net>
2023-05-16 13:58:21 -07:00
Godfrey M 8e3cbdad90 removes assigned_to if archived 2023-05-15 11:52:57 -07:00
Godfrey M 46d6783fc5 adds translation to checkout notification 2023-05-15 09:01:30 -07:00
Godfrey M 763176c86b standardizes the importer colors no matter the theme 2023-05-10 14:52:08 -07:00
snipe 0f3b77ee2d Added multi-select option to custom report
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 14:45:31 -07:00
snipe 869d195b35 Merge pull request #13007 from snipe/fixes/multiselect_company
Fixed multiselect for companies
2023-05-10 13:17:36 -07:00
snipe a49257ad4b Wrong eval
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 13:16:59 -07:00
snipe c6eef86661 Fixed multiselect for companies
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 13:15:22 -07:00
snipe 71c7c82398 Merge pull request #13006 from snipe/fixes/12831_array_for_company_id
Fixes PR #12831 use array bracket for multi select company
2023-05-10 12:36:59 -07:00
snipe 23e3d18931 Used brackets for multiselect company
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 12:35:30 -07:00
snipe 5f6e528560 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-05-10 11:36:28 -07:00
snipe 9f39d71f16 Merge pull request #12831 from Godmartinz/adds_multi_select_to_custom_report
Added Multiselect of companies for custom reports
2023-05-10 11:36:21 -07:00
snipe 4c78b49b97 Add @vikaas-cyper as a contributor 2023-05-10 11:31:26 -07:00
snipe b1fda46e11 Production assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 11:25:28 -07:00
snipe 6b7a7b8aee Merge remote-tracking branch 'origin/develop' 2023-05-10 11:23:29 -07:00
snipe aca287d28c Merge pull request #13004 from snipe/security/upgrade_webpack
Updated webpack, new asset files
2023-05-10 11:23:02 -07:00
snipe 1f5e4309fa Updated webpack, new asset files
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 11:20:06 -07:00
Marcus Moore a1a11d788f Disable browser tests in ChipperCI 2023-05-10 11:06:05 -07:00
snipe 63c660f306 Merge pull request #12999 from snipe/develop
Google Oauth Recap
2023-05-10 10:01:23 -07:00
snipe b8a59cc2d8 Merge branch 'master' into develop 2023-05-10 09:32:26 -07:00
snipe 04aedce47e Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:29:42 -07:00
snipe d648e9a01c Added Google test user
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:13:34 -07:00
snipe 7c77f4a697 Extra debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 09:10:53 -07:00
snipe 27e0484072 I lied. Missed one
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 03:12:22 -07:00
snipe ec76de607b Final google login tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 03:08:29 -07:00
snipe 14da8934c5 Few more login page tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:53:11 -07:00
snipe ed370a0104 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:47:28 -07:00
snipe b99640ecb2 Added ends_with validation message
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:40:55 -07:00
snipe 8bad72a80f Added validation on google client ID
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:40:45 -07:00
snipe f3c977aa9d Nicer button
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:37:01 -07:00
snipe 788c03ef57 Hide client secret if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:22:49 -07:00
snipe 3c00f68bda Added translation string for google auth failure
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:50 -07:00
snipe 7062583710 Check for http or https in avatar value
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:38 -07:00
snipe 2dd32d8785 Re-add the image update
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:27 -07:00
snipe ff66a938c1 Clearer comments
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:15 -07:00
snipe 7f0e677908 Use normal translation style
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 02:18:05 -07:00
snipe e8a0c7f2ce Remove avatar update, since we don’t take URLs for that
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:59:33 -07:00
snipe e950cf4279 Switch to using username as match for google login
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:58:36 -07:00
snipe 567a800c51 Added debugging
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:47:52 -07:00
snipe e5eb5932ca Create constructor to override expected config variables
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:37:03 -07:00
snipe a90fc1ab59 Merge pull request #12994 from snipe/features/google_socialite
Google OAuth login
2023-05-10 01:23:37 -07:00
snipe 3612526632 Disallow saving data if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:14:54 -07:00
snipe 1ef4ea6381 Very ugly login shim just to test functionality
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:14:31 -07:00
snipe 37bc47290c Disabled fields in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:12:55 -07:00
snipe 4da40792ea Use google logo
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 01:08:28 -07:00
snipe 63bf93b786 Pulled redirect from settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:56:04 -07:00
snipe f57e39191d Added google settings blade
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:55:16 -07:00
snipe 6ab214d3a6 Added google option to settings index
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:55:04 -07:00
snipe 3fb5188037 Removed redirect option
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:46 -07:00
snipe aefd330e4e Added methods for google settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:28 -07:00
snipe b7e8ce3064 Changed redirect
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:54:14 -07:00
snipe b183e53c45 Added settings routes for google auth
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:34:48 -07:00
snipe 054a2ab9d4 Add validation and fillable fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:34:31 -07:00
snipe bc9b47c46d Removed env dependency, switched to DB
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:27:47 -07:00
snipe 72d1c08fbc Added migration
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:21:17 -07:00
snipe c52b48c383 Google oauth login
Signed-off-by: snipe <snipe@snipe.net>
2023-05-10 00:14:28 -07:00
snipe 11cd875c6d Merge remote-tracking branch 'origin/develop' 2023-05-09 22:42:45 -07:00
snipe a1ec8cf490 Merge pull request #12993 from snipe/fixes/checkbox_layout_in_ldap
Tightened up some layout issues, checkbox issues in LDAP settings
2023-05-09 22:37:49 -07:00
snipe 0680405f4d Tightened up some layout issues, checkbox issues in LDAP settings
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 22:34:46 -07:00
snipe cbe70c9cc1 Merge remote-tracking branch 'origin/develop' 2023-05-09 20:14:44 -07:00
snipe 6a7bab453f Made spacing more compact
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 20:14:00 -07:00
snipe 7412bc32e2 Merge pull request #12991 from snipe/fixes/accessories_view
Fixed width of columns in details
2023-05-09 20:11:36 -07:00
snipe ec4697fd3e Merge remote-tracking branch 'origin/develop' 2023-05-09 19:45:10 -07:00
snipe 5a461d62bc Merge pull request #12990 from snipe/fixes/12881_missing_icon
Added icon field back into assets page
2023-05-09 19:44:30 -07:00
snipe 999dc3c358 Added icon field back into assets page
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 19:43:37 -07:00
snipe a10652797f Fixed width of columns in details
Signed-off-by: snipe <snipe@snipe.net>
2023-05-09 19:42:32 -07:00
snipe 090cbab60e Merge pull request #12989 from marcusmoore/chipper-ci
Add ChipperCI configuration
2023-05-09 18:09:23 -07:00
Marcus Moore 1e7986d75b Limit ChipperCI to running on push to master or develop 2023-05-09 16:39:56 -07:00
snipe a43dea3c04 Merge remote-tracking branch 'origin/develop' 2023-05-09 16:29:53 -07:00
Marcus Moore 1f11a8a2c1 Configure Dusk for ChipperCI 2023-05-09 14:45:18 -07:00
Marcus Moore 8d205e80e5 Add ejected pipeline configuration for ChipperCI 2023-05-09 14:44:43 -07:00
snipe 2d5da67b1e Merge pull request #12982 from akemidx/feature/sc-23214
Buttons on the Accessory View Page
2023-05-09 14:26:28 -07:00
snipe 7dd41aa574 Removed whitespace
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 15:49:12 -07:00
snipe c4d40cdbd4 Merge remote-tracking branch 'origin/develop' 2023-05-08 15:11:25 -07:00
snipe b76c5206ff Merge pull request #12986 from snipe/features/import_backup_filename
Pass filename to pre-import backup
2023-05-08 15:08:59 -07:00
snipe 17efc78816 Merge pull request #12985 from snipe/fixes/increase_state_from_3_chars
Increase state from 3 chars
2023-05-08 15:08:44 -07:00
snipe 332b017dcc Pass filename for manual backups
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 15:00:02 -07:00
snipe 5960a5425d Pass filename to pre-import backup
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:48:26 -07:00
snipe 277618bf16 Added maxlenth to form fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:13:24 -07:00
snipe f84f4ffe99 Migration to embiggen state fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:13:06 -07:00
snipe f1d85c67f1 Make validation match database fields
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 14:12:54 -07:00
snipe 6cb6beb6c7 Merge remote-tracking branch 'origin/develop' 2023-05-08 13:21:43 -07:00
snipe 6486ea4fb7 Merge pull request #12976 from inietov/fixes/validate_soft-deleted_models_in_asset_model
Refactor of #12955
2023-05-08 13:14:02 -07:00
snipe d685335aea Merge pull request #12975 from inietov/fixes/import_asset_notes
Fixed Notes field doesn't get populate when creating/updating assets via Importer [sc-23222]
2023-05-08 13:11:50 -07:00
snipe d70e14de61 Merge pull request #12972 from marcusmoore/bug/sc-23177
Fixes user name missing in accessory acceptance notifications
2023-05-08 13:04:37 -07:00
snipe 480ef23505 Merge remote-tracking branch 'origin/develop' 2023-05-08 12:44:01 -07:00
snipe 4503815ad7 Merge pull request #12984 from snipe/features/check_for_zip_in_backup_filename
Check that the filename we pass ends in zip, add it if not
2023-05-08 12:43:34 -07:00
snipe ba462d1e93 Check that the filename we pass ends in zip, add it if not
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 12:41:32 -07:00
snipe 3429d1f4b4 Merge remote-tracking branch 'origin/develop' 2023-05-08 12:22:22 -07:00
snipe 0f76eda4af Merge pull request #12983 from snipe/features/add_optional_filename_to_backup_artisan
Add optional filename to backup
2023-05-08 12:21:55 -07:00
snipe 85243423cf Add optional filename to backup
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 12:20:43 -07:00
snipe a73205f228 Merge remote-tracking branch 'origin/develop' 2023-05-08 11:24:03 -07:00
snipe 06ffe64f62 Merge pull request #12981 from snipe/fixes/wonky_div_when_saml_disabled
Fixed misplaced div when saml is disabled
2023-05-08 11:22:54 -07:00
snipe 223ff5e97e Fixed misplaced div when saml is disabled
Signed-off-by: snipe <snipe@snipe.net>
2023-05-08 11:20:26 -07:00
snipe fe40902765 Merge remote-tracking branch 'origin/develop' 2023-05-06 06:37:29 -07:00
snipe 689ef433b3 Merge pull request #12979 from snipe/fixes/added_use_for_fieldsets_controller
Added missing use statement
2023-05-06 06:37:01 -07:00
snipe 8b73fa0053 Added missing use statement
Signed-off-by: snipe <snipe@snipe.net>
2023-05-06 06:36:09 -07:00
snipe 3d345d15ac Merge remote-tracking branch 'origin/develop' 2023-05-04 11:01:15 -07:00
snipe 4efa84270a Merge pull request #12974 from snipe/fixes/show_sig_column_regardless_of_sig_status
Show signature column in asset history regardless of “require sig” state
2023-05-04 11:00:51 -07:00
snipe 60515f1262 Show signature column regardless of “require sig” state
Signed-off-by: snipe <snipe@snipe.net>
2023-05-04 10:56:35 -07:00
Ivan Nieto Vivanco fbb7c55450 Tweak 'exist' rule in Asset->model_id field so it ignores soft-deleted models 2023-05-04 03:12:36 -06:00
Ivan Nieto Vivanco 89fbd60d97 Restore the 'Asset Notes' and 'Model Notes' in the Map Asset Import Fields form 2023-05-04 02:00:04 -06:00
Marcus Moore 96c6d8896f Add additional information to acceptance notifications for assets, accessories, and consumables 2023-05-03 17:04:01 -07:00
Marcus Moore 9efe13bb5e Capitalize "declined" in acceptance in notification 2023-05-03 17:03:22 -07:00
Marcus Moore 4a0b3efd1f Include user's name in Acceptance result notifications for accessories 2023-05-03 14:22:05 -07:00
Marcus Moore f96d8fe674 Add CheckoutAcceptance factory 2023-05-03 14:21:13 -07:00
snipe 5950ec27ab Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-05-03 13:49:36 -07:00
snipe cd6f6ee8ff Bumped version to 6.1.1-pre
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 13:47:46 -07:00
akemidx 526c089424 Buttons on the accessory view page 2023-05-03 16:40:06 -04:00
akemidx 67105528d1 Buttons on the accessory view page 2023-05-03 16:31:56 -04:00
akemidx 12f0c42545 buttons added 2023-05-03 16:31:56 -04:00
snipe fe710efb40 Merge pull request #12874 from Godmartinz/feature/sc-23130
Adds a checkout range for custom asset reports
2023-05-03 11:43:44 -07:00
snipe fc53b56481 Merge pull request #12955 from inietov/fixes/error_500_after_sign_and_accept_asset
Fixed Error 500 after sign and accept asset
2023-05-03 11:43:14 -07:00
snipe b716f9f55e Merge pull request #12916 from snipe/features/auto_add_to_fieldset
Added ability to auto-add fields to new fieldsets
2023-05-03 11:04:33 -07:00
snipe ea17fdeba5 Merge pull request #12846 from snipe/features/livewire_location_import
Location importer via Livewire Importer
2023-05-03 11:02:06 -07:00
snipe f5cd58e9b7 Unmix return type variables
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:57:02 -07:00
snipe da4841987e Use translation string
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:55:30 -07:00
snipe 4a643c1252 Merge pull request #12880 from Godmartinz/asset_total_cost
Added component costs to asset view
2023-05-03 10:49:03 -07:00
snipe cdbd68012f Merge pull request #12878 from joelpittet/patch-2
Use environment variable and default to PHP's sendmail_path
2023-05-03 10:48:39 -07:00
snipe 577fff7d65 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:45:36 -07:00
snipe 79a27085c9 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-05-03 10:43:45 -07:00
snipe 27600e1553 Snyk webpack upgrade
Signed-off-by: snipe <snipe@snipe.net>
2023-05-03 10:43:05 -07:00
snipe 914b2658cc Merge pull request #12943 from marcusmoore/fixes/avoid-loading-unused-models-for-report
Remove the loading of asset maintenances that are not used by view
2023-05-03 10:41:52 -07:00
snipe 6a12d5d9a0 Merge pull request #12964 from marcusmoore/fixes/restrict-php-version
Restrict PHP version to <8.2
2023-05-03 10:40:52 -07:00
snipe 466c2fd47c Merge pull request #12966 from Godmartinz/bug/sc-23161
fixed color differences in dark themes
2023-05-03 10:38:54 -07:00
Godfrey M 87d1a82e35 moar changes to red 2023-05-02 15:15:02 -07:00
Godfrey M 1d494252ef corrections for dark red 2023-05-02 14:05:29 -07:00
Godfrey M 786e8deb91 removed dead space 2023-05-02 13:54:14 -07:00
Godfrey M 0a3cb5286d fixes dark red 2023-05-02 12:37:05 -07:00
Godfrey M f91e76e0f2 fixes dark blue and btn-warning bg 2023-05-02 12:33:40 -07:00
Godfrey M af2f288286 fixes dark orange theme 2023-05-02 12:17:22 -07:00
Godfrey M 5de30db0a9 fixes dark green theme 2023-05-02 12:10:55 -07:00
Marcus Moore 48ef8443f5 Restrict PHP to >=7.4.3 <8.2 2023-05-02 12:01:09 -07:00
Godfrey M 47370da924 adds fixes to dark black theme 2023-05-02 11:08:37 -07:00
snipe 63af17da74 Merge pull request #12954 from marcusmoore/fixes/test-suite-fixes
Clear the settings cache on app destruction
2023-05-01 16:28:47 -07:00
Godfrey M 7711938f4b fixes dark yellow 2023-05-01 16:27:21 -07:00
Marcus Moore f7d2b62d87 Improve method name 2023-05-01 16:06:28 -07:00
Marcus Moore da08f6ef8c Add InteractsWithSettings trait to required tests 2023-05-01 16:05:26 -07:00
Marcus Moore 6d594faae7 Clear the settings cache on app destruction 2023-05-01 16:04:43 -07:00
Ivan Nieto Vivanco 6936d76661 Prevent hard fail when retrieving acceptance data 2023-05-01 16:50:18 -06:00
Ivan Nieto Vivanco 1b2d830380 Check if model exists before create asset via API 2023-05-01 16:05:03 -06:00
snipe 609b1646e9 Merge remote-tracking branch 'origin/develop' 2023-04-30 18:40:52 -07:00
snipe 031c9c1204 Added nobr tag to prevent external link icon and link from breaking
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:40:40 -07:00
snipe 77b51136cf Merge remote-tracking branch 'origin/develop' 2023-04-30 18:38:19 -07:00
snipe 0222a922a1 Added tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:20:23 -07:00
snipe 8ad600085a Moved external link icon into link
Signed-off-by: snipe <snipe@snipe.net>
2023-04-30 18:17:56 -07:00
snipe 7fdbc10122 Merge remote-tracking branch 'origin/develop' 2023-04-29 13:49:14 -07:00
snipe 4c27b65d45 Merge pull request #12950 from snipe/fixes/warranty_lookup_validation
Fixed  #12946 - warranty lookup url was not nullable
2023-04-29 13:48:54 -07:00
snipe aa814cf761 Fixed #12946 - warranty lookup url was not nullable
Signed-off-by: snipe <snipe@snipe.net>
2023-04-29 13:47:52 -07:00
Marcus Moore 3cae32b236 Eager load default locations 2023-04-27 17:13:09 -07:00
Marcus Moore 429c4cb99f Remove the loading of asset maintenances that are not used by view 2023-04-27 17:12:53 -07:00
snipe e250d4c884 Merge remote-tracking branch 'origin/develop' 2023-04-27 17:00:29 -07:00
snipe 8b476e55b6 Merge pull request #12941 from akemidx/feature/sc-23153
Created At and Updated At fields on License table view
2023-04-27 16:59:30 -07:00
snipe b76d2973f7 Merge pull request #12928 from snipe/features/make_hashing_work_rounds_an_env
Env-ify hashing variables, setting the normal defaults
2023-04-27 16:57:45 -07:00
snipe b001f6771d Merge remote-tracking branch 'origin/develop' 2023-04-27 16:28:42 -07:00
snipe 956bc41e48 Merge pull request #12942 from snipe/bug/sc-23197
Added missing case for licenses for item_count
2023-04-27 16:28:12 -07:00
snipe 567e19bcc0 Added missing case for licenses for item_count
Signed-off-by: snipe <snipe@snipe.net>
2023-04-27 16:26:50 -07:00
akemidx 67a2b796a4 requested edits 2023-04-27 19:19:53 -04:00
snipe 1384ca658a Merge remote-tracking branch 'origin/develop' 2023-04-26 18:42:58 -07:00
snipe e25dc42121 Switch to externalLinkFormatter
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:42:34 -07:00
snipe dcb7eadfc7 Merge pull request #12933 from snipe/features/unlink_dynamic_urls_if_variables_used
Remove auto-link from from manufacturer warranty
2023-04-26 18:40:33 -07:00
snipe 99ef435d40 Fixed translation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:32:38 -07:00
snipe e853f8b7fd Removed SR text for exporting
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:23:21 -07:00
snipe deff312381 Remove auto-link from from manufacturer warranty
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 18:16:23 -07:00
snipe 7bffe30fae Merge remote-tracking branch 'origin/develop' 2023-04-26 17:55:48 -07:00
snipe 73d45bb587 Merge pull request #12932 from snipe/features/add_warranty_url_to_mfgs
Added dynamic warranty URL to manufacturers
2023-04-26 17:55:03 -07:00
snipe 7974c172fd Switch back to “normal” url for support
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 16:48:38 -07:00
snipe 54a766c4f9 Added dynamic warranty URL to manufacturers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 16:39:15 -07:00
snipe 27de5c62c5 Merge remote-tracking branch 'origin/develop' 2023-04-26 15:15:43 -07:00
snipe ef69df2cdf Merge pull request #12930 from snipe/fixes/added_help_text_to_support_url
Added help text to the now-dynamic manufacturer URLS
2023-04-26 15:15:19 -07:00
snipe 7c0ef581c5 Added help text to the now-dynamic manufacturer URLS
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 15:12:36 -07:00
snipe 0c5837e4a0 Merge pull request #12929 from snipe/fixes/use_asset_tag_if_no_asset_name_given
Use the asset tag instead of asset name if no name is given
2023-04-26 14:49:38 -07:00
snipe 5eac314f4d Merge pull request #12906 from akemidx/feature/sc-20622
Dynamic warranty link for manufacturers' support urls
2023-04-26 14:49:22 -07:00
snipe b5b335a2ca Use the asset tag instead of asset name if no name is given
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 14:41:19 -07:00
akemidx 497d17835f requested edits 2023-04-26 17:06:08 -04:00
snipe 68417a4c15 Env-ify hashing variables, setting the normal defaults
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 13:01:42 -07:00
akemidx aab53cf683 remove regex, add in starts_with 2023-04-26 15:18:13 -04:00
snipe 75fdd0ac96 Merge remote-tracking branch 'origin/develop' 2023-04-26 09:54:44 -07:00
snipe 4c16dcf5d0 Merge pull request #12922 from snipe/fixes/12918_route_name_for_clone_locations
Fixed #12918 - wrong route for clone location
2023-04-26 09:54:18 -07:00
snipe b6889ff399 Fixed #12918 - wrong toite for clone location
Signed-off-by: snipe <snipe@snipe.net>
2023-04-26 09:52:13 -07:00
snipe 12cc576b52 Merge remote-tracking branch 'origin/develop' 2023-04-25 23:41:45 -07:00
snipe 19554a7dc2 Merge pull request #12917 from snipe/fixes/applies_pr_12868
Applies #12868 - fixes EOL date on asset creation
2023-04-25 23:40:43 -07:00
snipe 8f0b823fb3 Applies #12868
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 23:39:32 -07:00
snipe 2299771e10 Add @zacharyfleck as a contributor 2023-04-25 22:37:17 -07:00
snipe 37b881b906 Add @dboth as a contributor 2023-04-25 22:32:45 -07:00
snipe 22d73f503a Merge pull request #12756 from dboth/develop
Fixed #8208, #8896, #8985 and #9789:  Currency issues when using non-english locales (resubmission)
2023-04-25 22:32:13 -07:00
snipe 970b5e556c Merge pull request #12903 from marcusmoore/bug/sc-15034
Fixes sending webhook notifications for checkout and checkin
2023-04-25 22:22:58 -07:00
snipe 17275cbeb8 Merge pull request #12905 from marcusmoore/fixes/checkout-via-artisan
Fixes where clause operator in artisan checkout command
2023-04-25 22:21:59 -07:00
snipe d6ea5de5b8 Merge remote-tracking branch 'origin/develop' into features/auto_add_to_fieldset 2023-04-25 22:20:50 -07:00
snipe 42f0975414 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-25 22:19:27 -07:00
snipe 470a36a7c9 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 22:12:56 -07:00
snipe b7632cdbb7 Updated js packages
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 22:12:47 -07:00
snipe 9529cd8235 Merge pull request #12891 from snipe/snyk-upgrade-38ca074c3dd0aada16ad8b85f20ebaa8
[Snyk] Upgrade bootstrap-table from 1.21.3 to 1.21.4
2023-04-25 22:04:40 -07:00
snipe fcddd0827c Merge pull request #12888 from snipe/snyk-upgrade-4c8ffc584b299eb1e71d6be555624f4e
[Snyk] Upgrade webpack from 5.76.2 to 5.77.0
2023-04-25 22:03:49 -07:00
snipe c8c6f879d4 Merge pull request #12912 from Godmartinz/ldap_location_sync
added ldap_location to settings
2023-04-25 21:54:28 -07:00
snipe 31a3be4c6a Small refactor of HTML, added top submit button
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:51:59 -07:00
snipe 27477085fe Merge branch 'develop' into features/auto_add_to_fieldset 2023-04-25 21:31:50 -07:00
snipe 45f22e7561 Updated the sync to disassociate if all boxed are unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:31:23 -07:00
snipe 5759d2c948 Added a check to fail validation if the associated fieldsets are not value
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:30:47 -07:00
snipe 15dc4e4779 Added fieldset sync
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:29:57 -07:00
snipe 5eeca937cb Added logic for syncing fieldset info
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:08:26 -07:00
snipe 662b7787a1 Updated redirect return
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 21:07:50 -07:00
snipe 28d9cec1e3 Added auto_add_to_fieldsets to API response
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:59:48 -07:00
snipe 67212f9d57 Changed layout, added fieldsets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:59:29 -07:00
snipe 6cd3cfe1ea Added new field to factory
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 20:57:03 -07:00
snipe 4a063d23b9 We don’t actually use this test?
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 19:36:52 -07:00
snipe 705bb7375a Merge pull request #12914 from marcusmoore/fixes/fix-test-cases
Fixes state leak between tests
2023-04-25 17:22:56 -07:00
snipe 4e3ccb74bc Fixed slightly weird padding
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:59:19 -07:00
snipe 4954b50280 Added new strings
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:57:46 -07:00
snipe 07336bbc6a Added auto_add_to_fieldsets field
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 15:51:36 -07:00
snipe 0e73923c24 Merge pull request #12913 from uberbrady/fix_scim_id_string
Change from a standard Eloquent mapping for ID to a custom setRead
2023-04-25 12:02:36 -07:00
Marcus Moore a528ebeab0 Use superuser instead of admin state 2023-04-25 11:53:47 -07:00
Brady Wetherington 3da5df0127 Change from a standard Eloquent mapping for ID to a custom setRead 2023-04-25 11:50:55 -07:00
Godfrey M 20d8ff2a4f removed a typo 2023-04-25 11:49:33 -07:00
snipe a7e2182ec9 Merge pull request #12904 from zacharyfleck/develop
Fixed #8342: Add ARM64 architecture to Docker Builds
2023-04-25 11:45:27 -07:00
Godfrey M cb68f41d9c added ldap_location to settings 2023-04-25 11:44:04 -07:00
Zachary Fleck af0a0276e0 Merge branch 'snipe:develop' into develop 2023-04-25 14:43:41 -04:00
Zachary Fleck ef07f39ccf remove space 2023-04-25 14:43:34 -04:00
Zachary Fleck aa223359d4 remove space 2023-04-25 14:42:09 -04:00
snipe b0e342508f Merge remote-tracking branch 'origin/develop' 2023-04-25 08:09:59 -07:00
snipe efc0929bbc Merge pull request #12910 from snipe/fixes/finer_permissions_for_bulk_assets
Added more granular permissions on bulk actions for assets
2023-04-25 08:09:30 -07:00
snipe 66ce02fc48 Added permission on restore
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 08:09:16 -07:00
snipe 6e7f0728fd Added more granular permissions on bulk actions for assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-25 08:06:45 -07:00
Marcus Moore b4f162f316 Fix operator in where clause 2023-04-24 17:26:06 -07:00
akemidx 9cd2783185 Regex added for link instead 2023-04-24 20:07:21 -04:00
zacharyfleck 63ade327a5 add ARM64 architecture 2023-04-24 16:24:44 -04:00
snyk-bot 056790e9cd fix: upgrade bootstrap-table from 1.21.3 to 1.21.4
Snyk has created this PR to upgrade bootstrap-table from 1.21.3 to 1.21.4.

See this package in npm:
https://www.npmjs.com/package/bootstrap-table

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
2023-04-22 14:47:28 +00:00
snipe 0c425ed0e7 Merge remote-tracking branch 'origin/develop' 2023-04-21 05:19:19 -07:00
snipe 7d9062c065 Merge pull request #12877 from joelpittet/patch-1
Allow an environment variable to set the session cookie path
2023-04-21 04:45:17 -07:00
snipe fc721a9388 Merge pull request #12887 from marcusmoore/bug/sc-23158
Fix: Ensure users editing themselves do not deactivate their account
2023-04-21 04:42:04 -07:00
snyk-bot 6af3ab8954 fix: upgrade webpack from 5.76.2 to 5.77.0
Snyk has created this PR to upgrade webpack from 5.76.2 to 5.77.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
2023-04-21 06:57:42 +00:00
Marcus Moore 2aba8252f3 Ensure users editing themselves do not deactivate their account 2023-04-20 21:59:55 -07:00
akemidx 16a5a883e5 new request, preparing support_url for validation 2023-04-20 16:34:25 -04:00
snipe c3c22fae3c Merge pull request #12885 from inietov/fixes/error_call_member_function_totalSeatsByLicenseID
Fixed Call to a member function totalSeatsByLicenseID() on null
2023-04-20 10:43:28 -07:00
Ivan Nieto Vivanco 747d6cfdb4 Change the flow of the condition using an early return 2023-04-20 10:37:26 -06:00
Ivan Nieto Vivanco ae53609b1b Declare variables only if license is found 2023-04-20 10:16:11 -06:00
Marcus Moore c357d9f01e Update data provider name 2023-04-19 18:10:23 -07:00
Marcus Moore 645f6ed692 Remove unneeded doc block 2023-04-19 17:52:44 -07:00
Marcus Moore dd40798c43 Remove unneeded comments 2023-04-19 17:49:31 -07:00
Marcus Moore e92c1e7bea Minor docblock update 2023-04-19 17:22:56 -07:00
Godfrey M bd212b3108 adds component costs to asset view 2023-04-19 16:35:06 -07:00
Joel Pittet 608c5d037f Use environment variable and default to PHP's sendmail_path
Use sendmail_path in PHP instead of hardcoded path and options
2023-04-19 15:25:48 -07:00
Joel Pittet 351928adff Allow an environment variable to set the session cookie path 2023-04-19 15:18:50 -07:00
Marcus Moore 144382e57a Update docblock types 2023-04-19 12:31:12 -07:00
Marcus Moore 835f8876c4 Move notification sending into try catch block 2023-04-19 12:26:48 -07:00
snipe 4a5426f959 Merge pull request #12875 from Godmartinz/sidebar_undeployable_runaway_parenthesis
Fixed space from un deployable total in sidebar
2023-04-19 11:49:42 -07:00
Marcus Moore 15280c435e Merge branch 'develop' into bug/sc-15034 2023-04-19 11:45:16 -07:00
Godfrey M 0e1f50c226 adds checkout-range to jquery 2023-04-19 10:11:26 -07:00
Godfrey M d2118ba230 removed space from un deployable total in sidebar 2023-04-19 09:46:15 -07:00
Godfrey M 8a5612d1c9 fixes comment 2023-04-19 09:13:43 -07:00
Godfrey M bdd1045272 adds a checkout range for custom asset reports 2023-04-19 09:11:44 -07:00
snipe fd5cb32dd9 Honor the “update” flag
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:34:47 -07:00
snipe 345662c5c2 Rearrange some of the user creation logic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:34:10 -07:00
snipe 003cd372dd New location same CSV
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 16:23:07 -07:00
snipe aedfef78d3 Update app/Importer/LocationImporter.php
Co-authored-by: Marcus Moore <contact@marcusmoore.io>
2023-04-18 13:26:23 -07:00
Marcus Moore bad2eead4c Remove test method 2023-04-18 13:13:57 -07:00
Marcus Moore 508660b1df Skip notifications for component checkouts and checkins 2023-04-18 13:07:55 -07:00
snipe c68563ae08 Merge remote-tracking branch 'origin/develop' 2023-04-18 13:01:37 -07:00
snipe a84a9a8dec Merge pull request #12867 from snipe/fixes/clearer_tooltip_text_for_non_assets_undeployable
Small tooltip improvements for undeployable items in table view
2023-04-18 13:00:11 -07:00
snipe d3bdaf7cd3 Fixed destination name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:59:46 -07:00
snipe 92f516484e Small tooltip improvements for undeployable items
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:54:06 -07:00
snipe b626e5a3bf Merge remote-tracking branch 'origin/develop' 2023-04-18 12:33:32 -07:00
snipe bfda46276a Merge pull request #12849 from snipe/features/adds_license_checkin_checkout_to_all_in_gui
Added license checkin/checkout to all in license GUI
2023-04-18 12:32:30 -07:00
snipe 031586495a Small cosmetic tweaks to 2FA reset class, fixed weird layout on 2FA reset button
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 12:09:41 -07:00
snipe d871a14687 Added fa-fw for nicer display
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:49:40 -07:00
snipe 00a9591c4c Added autoassign_licenses in view, added fa-fw
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:49:29 -07:00
snipe 4d9d75379f Improved translation string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:39:16 -07:00
snipe 41358eba85 Updated label
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:29:28 -07:00
snipe 59f4fe67d6 Removed duplicate tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 11:28:35 -07:00
snipe 2c5c4ab974 Nicer layout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:40:06 -07:00
snipe 95767c46ac Fixed delete modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:37:13 -07:00
snipe 0eadc00f4d Removed unneeded css class
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:37:04 -07:00
snipe df7b19bc1e Removed unused validations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 04:35:06 -07:00
snipe 7aab4290c7 Updated tooltips with data-tooltip=true from old method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:50 -07:00
snipe 3a808aa806 Updated method for available seat count
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:33 -07:00
snipe 4d09021e9c Compact tooltip for un-deletable
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:19 -07:00
snipe beba31afbf Added tooltip for disabled delete buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:44:09 -07:00
snipe 41490f1e3a Use “name” instead of “license” for consistency
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:43:59 -07:00
snipe 9da36833be Removed unused method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:43:44 -07:00
snipe dc6eb6f104 Throw a warning if there were no users affected
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:07:17 -07:00
snipe a8a3ca3624 Use count on availSeats
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:06:42 -07:00
snipe e84ba0c7a0 Revert back to old method name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:06:32 -07:00
snipe 3e53870b37 Updated language
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:00:13 -07:00
snipe 8a41f37054 Persists buttons through tabs
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 02:00:06 -07:00
snipe 9f7058a128 Revert "Renamed/refactorered licenses method"
This reverts commit de78f8d41f.

Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:36:34 -07:00
snipe ec0413254e Removed action menu
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:09:40 -07:00
snipe f21d9c27e6 Use new translations for logs
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:07:26 -07:00
snipe 725adebffe Translate log message
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:07:12 -07:00
snipe bfcbd9628a Refactored license controller with new counts
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:58 -07:00
snipe 220e20d208 Changed tooltip invocation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:36 -07:00
snipe d3b087b5da Clearer padding between buttons, added tooltips
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:19 -07:00
snipe 25a83c2915 Removed moved translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:02:01 -07:00
snipe 3f4159f058 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:52 -07:00
snipe de78f8d41f Renamed/refactorered licenses method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:44 -07:00
snipe 6ab4314221 Removed unused method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-18 01:01:13 -07:00
snipe 087f0e596a Fixed has to where
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 22:44:05 -07:00
snipe 0dd967cf2b Merge remote-tracking branch 'origin/develop' 2023-04-17 21:05:09 -07:00
snipe 912f6c45ee Reverted #12832
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 21:04:47 -07:00
snipe 9a73f5eca3 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2023-04-17 20:27:49 -07:00
snipe 9698c3b07b Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 20:14:50 -07:00
snipe 3153013715 Fixed semicolon parse error from #12832
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 20:14:45 -07:00
snipe c12ac9912c Merge pull request #12832 from Godmartinz/fix_footer_space
Fixed footer space when customized
2023-04-17 20:11:15 -07:00
snipe 2b10357c4e Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 19:06:27 -07:00
Marcus Moore f6cff90829 Migrate to new test settings interface 2023-04-17 17:31:12 -07:00
Marcus Moore 2d56675ade Merge branch 'develop' into bug/sc-15034
# Conflicts:
#	database/factories/SettingFactory.php
2023-04-17 17:22:55 -07:00
snipe c70cb36c80 Merge pull request #12828 from Godmartinz/bug/sc-20783
Fixed dark themes pagination and notification drop menu
2023-04-17 16:26:36 -07:00
Godfrey M 247f47ce69 adjusts button color 2023-04-17 15:29:53 -07:00
snipe 99cecee4b5 Merge branch 'develop' into features/adds_license_checkin_checkout_to_all_in_gui 2023-04-17 14:54:30 -07:00
Godfrey M aabd5e92a8 surrounding text aligns correctly 2023-04-17 12:44:06 -07:00
Godfrey M 247c881d87 add back casts 2023-04-17 12:10:54 -07:00
Godfrey M 1001b52c4f removes unncessary files 2023-04-17 12:01:09 -07:00
Godfrey M 0cca45d858 footer now uses flex 2023-04-17 11:57:35 -07:00
snipe b22cad9ced Merge pull request #12855 from koelle25/fixes/last_component_checkout
Allow checkout of available components down to zero stock (fixes #12854)
2023-04-17 09:49:14 -07:00
snipe 071a620144 Merge remote-tracking branch 'origin/develop' 2023-04-17 09:36:07 -07:00
snipe 920711dd16 Merge pull request #12857 from snipe/fixes/wtf_datetime_stuff
Remove start/end dates form casts array
2023-04-17 09:35:03 -07:00
snipe e0c53d8d09 Remove start/end dates form casts array
Signed-off-by: snipe <snipe@snipe.net>
2023-04-17 09:33:31 -07:00
Kevin Köllmann 04f3c4bf69 Fixed #12854: Allow checkout of available components down to zero stock 2023-04-17 11:45:11 +02:00
snipe a83991041a Better placement for errors
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 16:08:06 -07:00
snipe 0afaaa4a6b Added autoassign_licenses option to create admin
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:28:08 -07:00
snipe 16ab2bec06 Added sorting and searching on autoassign_licenses via user API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:27:39 -07:00
snipe 4b66ca6ac5 Added method to bulk checkin (much simpler than checking out)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:27:15 -07:00
snipe 844ad83431 Added method to bulk checkout license seats
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:26:59 -07:00
snipe 9833d861d4 Added autoassign_licenses tp bulk users conditional
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:26:33 -07:00
snipe 03cc55cb6a Set autoassign_licenses to false if unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:52 -07:00
snipe 6a94a2f515 Return true/false for autoassign_licenses in the API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:26 -07:00
snipe f40bef8f9b Added autoassign_licenses to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:25:08 -07:00
snipe 6acce098c9 Added autoassign_licenses on user model
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:24:56 -07:00
snipe 73cf62e060 Added autoassign_licenses to presenter
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:24:00 -07:00
snipe dd78d2fc66 Added language strings
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:51 -07:00
snipe add9e561f9 Added buttons on license page, greyed out where appriate
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:42 -07:00
snipe ff9af7ea74 Added genetic modal partial
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:15 -07:00
snipe bc7c0aa80d Fixed clone tooltip
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:23:00 -07:00
snipe 73188df090 Added autoassign_licenses to bulk user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:22:37 -07:00
snipe cf7f244942 Added (clarified?) edit autoassign_licenses in user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:19:37 -07:00
snipe 06d46a4523 Indenting change for clarity
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 15:17:55 -07:00
snipe 8e5042418a Added buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:32 -07:00
snipe 79ff6a8fc2 Disallow deleting in the API view if there are things checked out
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:23 -07:00
snipe 8183b8deba Added stub method
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:30:02 -07:00
snipe 0210ecde88 Include confirm modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:29:55 -07:00
snipe b2940f9915 Added confirm modal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 12:29:48 -07:00
snipe b093e428b3 Merge remote-tracking branch 'origin/develop' 2023-04-16 08:54:38 -07:00
snipe 144a6f28ec Added intval
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:54:23 -07:00
snipe 65ac877918 Merge remote-tracking branch 'origin/develop' 2023-04-16 08:50:20 -07:00
snipe f50b958b63 Merge pull request #12848 from snipe/fixes/make_limit_into_singletons
Used a singleton to filter API limit value
2023-04-16 08:48:28 -07:00
snipe 64256351d8 Used a singleton to filter API limit value
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:46:39 -07:00
snipe 62edc0ab7d Merge remote-tracking branch 'origin/develop' 2023-04-16 08:02:44 -07:00
snipe 2c6d4d6b7f Merge pull request #12847 from snipe/features/moar_labels
Adds a few more auto-labels
2023-04-16 08:01:06 -07:00
snipe 2b11c96ce0 Adds a few more auto-labels
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 08:00:25 -07:00
snipe 78ec21acc4 Added location case
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:49 -07:00
snipe 5a1d03c1dc Added alias maps
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:42 -07:00
snipe a831a34594 New field mapping
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:26 -07:00
snipe bcf9188dcd Made default password longer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:19 -07:00
snipe c149885ceb Skip the magical user creation if it’s a location
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:47:04 -07:00
snipe 1509672463 Added location importer
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:36 -07:00
snipe bceb0b8a47 Allowed slightly longer zip codes
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:29 -07:00
snipe 7534d27a03 Added CSV sample
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 07:46:18 -07:00
snipe 46cce0115e Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-16 05:46:26 -07:00
snipe 485f5f3a45 Merge pull request #12845 from snipe/security/update_bs_tables
Upgrade bootstrap-table from 1.20.2 to 1.21.3 (Formerly #12733)
2023-04-16 05:44:52 -07:00
snipe 21f5d39fa1 Upgrade bootstrap-table from 1.20.2 to 1.21.3 (Formerly #12733)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-16 05:43:42 -07:00
snipe 21e78bee71 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	package-lock.json
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2023-04-15 21:05:18 -07:00
snipe 2eeb7ddf58 Merge pull request #12844 from snipe/fixes/small_blade_parial_fixes
Small blade parial fixes
2023-04-15 21:04:35 -07:00
snipe 589f7fa183 Larger qty box
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 21:03:09 -07:00
snipe 9ff62c966e Check for $item (matters mostly in custom report blade)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 21:03:00 -07:00
snipe 86b04c7294 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:50:36 -07:00
snipe 2d03ea943b Applied webpack change from master to develop
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:49:34 -07:00
snipe 20ab412e1e Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 20:45:35 -07:00
snipe 513b95e8d7 Merge pull request #12768 from snipe/snyk-upgrade-291b556667d6ffe966495405775b3255
[Snyk] Upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0
2023-04-15 20:44:57 -07:00
snipe 50153717f6 Merge pull request #12798 from snipe/snyk-upgrade-cec198178187b64d2348f74ddc10c797
[Snyk] Upgrade webpack from 5.76.1 to 5.76.2
2023-04-15 20:36:48 -07:00
snipe 32030c4f71 Merge remote-tracking branch 'origin/develop' 2023-04-15 18:44:25 -07:00
snipe 955539807c Merge pull request #12830 from snipe/features/adds_supplier_id_to_components
Added supplier to components and consumables
2023-04-15 18:42:23 -07:00
snipe 8c09226b76 Merge pull request #12834 from marcusmoore/mxm/improve-test-setup
Introduced improved way to interact with settings in tests
2023-04-15 18:37:34 -07:00
snipe b73aed2b69 Merge remote-tracking branch 'origin/develop' 2023-04-15 18:30:21 -07:00
snipe b9a5a8a500 Merge pull request #12843 from snipe/fixes/temp_fix_seeder
Temp fix for the seeders
2023-04-15 18:30:00 -07:00
snipe 8ae14c43f3 This is a temp fix for the seeders
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 18:27:53 -07:00
snipe fc7f1f907d Fixed variable name
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 17:37:25 -07:00
snipe f6cfec1e49 Merge pull request #12842 from snipe/fixes/take_two_better_handling_limits
Use abs() instead of max
2023-04-15 17:33:12 -07:00
snipe 4cbb9c2409 Use abs() instead of max
Signed-off-by: snipe <snipe@snipe.net>
2023-04-15 17:28:25 -07:00
snipe a97b2d141d Merge pull request #12827 from snipe/fixes/tighter_handling_of_offset_and_limit
Better handling for weird data passed to the API via limit and offset
2023-04-15 16:52:33 -07:00
snipe f407a551da Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-04-15 16:48:07 -07:00
snipe 36665fde31 Merge pull request #12833 from svpernova09/bump-dockerfile-22-04-php81
Update Dockerfile to Ubuntu 22.04 and PHP 8.1
2023-04-14 17:16:42 -07:00
Joe Ferguson 785d2f3558 Update alpine Dockerfiles to PHP 8.1 and Snipe-IT v6.1.0 2023-04-14 13:35:36 -05:00
Joe Ferguson 1d8a4ca090 Update Dockerfile to Ubuntu 22.04 and PHP 8.1 2023-04-14 07:59:16 -05:00
Marcus Moore 473241edca Move initialization of settings to trait 2023-04-13 16:52:20 -07:00
Godfrey M 42f198ffed fixes footer space when customized 2023-04-13 12:24:59 -07:00
Godfrey M b16c062485 fixes partial 2023-04-13 12:05:59 -07:00
snipe b690ed97d5 Fixed unclosed parens in translation file
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 12:05:06 -07:00
Godfrey M ab67d903b5 adds multi select to custom report for companies 2023-04-13 12:02:11 -07:00
snipe 2fe7fcecdb Added case switch for sorting on suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:13:45 -07:00
snipe d2b3e251ad Added counters to API controllers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:12:16 -07:00
snipe 07c0a1927b Added supplier id to controllers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:12:01 -07:00
snipe ab7c75232b Added supplier to transformers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:51 -07:00
snipe 6e183f2ced Added counters for consumables and components
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:32 -07:00
snipe 6097d534e9 Added eloquent model relationships
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:10:16 -07:00
snipe 3aac8bccd2 Added presenters for suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:09:59 -07:00
snipe e7c6771e73 Added supplier to components and consumables factories for seeding
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:07:22 -07:00
snipe 45142c6888 Migration to add supplier ID to components and consumables
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:06:49 -07:00
snipe 607ab3988a Added supplier to edit/creatre blade
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:06:07 -07:00
snipe b6d3f2827b Switched to standardized require check
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:05:52 -07:00
snipe 65bb0486d4 Changed blade to use standard required check
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:04:29 -07:00
snipe a40bad0972 Added consumables and components columns to supplier list
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:04:13 -07:00
snipe 6eed89df91 Added components and consumables tab to suppliers
Signed-off-by: snipe <snipe@snipe.net>
2023-04-13 11:03:26 -07:00
Godfrey M d476f0de3a forgot dark blue 2023-04-13 10:34:17 -07:00
Godfrey M bbb4032050 fixes rest of dark mode themes 2023-04-13 10:32:42 -07:00
Godfrey M b83daea265 fixes dark orange 2023-04-13 10:27:38 -07:00
Marcus Moore 7c95e45178 Introduce trait to conditionally interact with settings 2023-04-12 17:28:47 -07:00
Godfrey M 46ff738494 fixes the notification dropdown menu 2023-04-12 16:12:48 -07:00
akemidx 0a993b2aa1 added external link icon to warranty link 2023-04-12 18:52:21 -04:00
Godfrey M cbb25025d5 fixes pagination for rest of skins 2023-04-12 15:41:04 -07:00
Godfrey M f3d12351a6 fixes paginiation for black-dark 2023-04-12 15:23:56 -07:00
Godfrey M 2d27f0155a targeting paginiation 2023-04-12 15:06:06 -07:00
snipe 112a04b108 Better handle weird data passed to the API via limit and offset
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 11:28:46 -07:00
snipe 9a37273750 Merge remote-tracking branch 'origin/develop' 2023-04-12 08:28:50 -07:00
snipe 1a7201d3d9 Merge pull request #12826 from snipe/fixes/added_invalid_parse_to_dont_report
Added invalid parse to dontReport
2023-04-12 08:28:26 -07:00
snipe 74babfa081 Added maxlength="10"
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 08:26:36 -07:00
snipe 04f83d34ff Added withInput to carry over older fields
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 08:25:03 -07:00
snipe aac76d40fe Merge remote-tracking branch 'origin/develop' 2023-04-12 06:37:01 -07:00
snipe 14ec96cf45 Merge pull request #12825 from snipe/fixes/wrong_button_string_on_bulk_user_edit
Fixed #12822 - Missing translation on bulk edit user submit button
2023-04-12 06:36:39 -07:00
snipe 0f3702b0fc Fixed incorrect translation string for bulk user edit
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 06:35:28 -07:00
snipe 0e93a9229d Merge remote-tracking branch 'origin/develop' 2023-04-12 06:32:06 -07:00
snipe a119484277 Merge pull request #12824 from snipe/fixes/radio_button_submit_on_merge_users
Removed iCheck code from merge users script
2023-04-12 06:31:43 -07:00
snipe 89b031d64d Removed iCheck code from merge users script
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 06:30:52 -07:00
snipe 9ae9ea7f68 Merge remote-tracking branch 'origin/develop' 2023-04-12 04:36:30 -07:00
snipe d3d464e179 Improved commenting
Signed-off-by: snipe <snipe@snipe.net>
2023-04-12 04:36:05 -07:00
snipe 28e0891645 Merge remote-tracking branch 'origin/develop' 2023-04-11 23:36:59 -07:00
snipe c02bd54826 Merge pull request #12818 from snipe/fixes/better_error_handling_on_dates
Check for Carbon exception
2023-04-11 23:36:42 -07:00
snipe afd01869a5 Check for Carbon exception
Signed-off-by: snipe <snipe@snipe.net>
2023-04-11 23:35:41 -07:00
akemidx 2453913080 dynamic link w/ dynamic image 2023-04-11 14:53:44 -04:00
akemidx 71ff987e3c dynamic link w/ dynamic image 2023-04-11 14:32:11 -04:00
akemidx 968701b971 starting to implant the str lower solution 2023-04-10 17:28:19 -04:00
snipe 22336da362 Merge remote-tracking branch 'origin/develop' 2023-04-09 14:08:03 -07:00
snipe 79a8effa25 Merge pull request #12810 from snipe/fixes/maintain_checkbox_state_on_user
Maintain activated state on editing a user
2023-04-09 14:07:41 -07:00
snipe 70ce0d9ee6 Maintain activated state on editing a user
Signed-off-by: snipe <snipe@snipe.net>
2023-04-09 14:06:29 -07:00
snipe b3fab6d47d Merge remote-tracking branch 'origin/develop' 2023-04-07 10:47:48 -07:00
snipe b886f57d92 Merge pull request #12807 from snipe/fixes/handle_arrays_on_validation_failure
Echo out the array values in withInput()
2023-04-07 10:47:15 -07:00
snipe 19d5d34ffb Echo out the array values in withInput()
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 10:16:35 -07:00
snipe b09b562f3a Merge remote-tracking branch 'origin/develop' 2023-04-07 09:46:02 -07:00
snipe 42eef7eb3f Merge pull request #12803 from snipe/fixes/small_component_fixes
Small component UI/validation/API fixes
2023-04-07 09:45:36 -07:00
snipe baf267e2e9 Small cleanups
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 09:45:16 -07:00
snipe cb76815e8b Removed if check on assets, since that’s already handled via validation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-07 09:42:31 -07:00
snipe 42a60a9ccb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-04-07 08:22:24 -07:00
snipe 734b888de4 Merge pull request #12804 from insert-waffle/remove-unnecessary-vulgar-text
Remove "FARTS" from bpay.blade.php
2023-04-07 08:19:40 -07:00
Jens Maes c42078ea4a Update bpay.blade.php
Removed FARTS from the file. This was shown in production on the master branch.
2023-04-07 10:15:34 +02:00
snipe 4c88c751ef Code cleanup, better validation
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:40 -07:00
snipe 358b0548fa Added string for translations
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:26 -07:00
snipe 43ad0f58b5 SLightly cleaner layout - still needs work
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:03:15 -07:00
snipe 0abb993600 General cleanup and standardization for component API
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 22:02:57 -07:00
snipe 87c7d1aaca Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 20:43:42 -07:00
snipe 1ee1cf1d78 Merge pull request #12802 from snipe/fixes/consumables_checkout_when_0_qty
Check for available quantity on consumables before checkout
2023-04-06 20:39:57 -07:00
snipe 4840046f44 Check for available quantity on consumables before checkout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 20:38:02 -07:00
snipe 0414954d3e Merge pull request #12801 from snipe/translations/updated_for_v6.1.0
Translations/updated for v6.1.0
2023-04-06 19:58:41 -07:00
snipe 574b0184fc Updated Zulu
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:35 -07:00
snipe 9db5e328c9 Updated Chinese Traditional
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:28 -07:00
snipe 0a77216b6f Updated Chinese Traditional, Hong Kong
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:57:03 -07:00
snipe 44b4274a49 Updated Chinese Simplified
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:56:43 -07:00
snipe 7711540514 Updated Vietnamese
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:55:47 -07:00
snipe 4d7b2b5747 Updated Urdu (Pakistan)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:55:06 -07:00
snipe 6f92144b96 Updated Ukrainian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:54:41 -07:00
snipe 8446f456ab Updated Turkish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:54:06 -07:00
snipe d5b4971371 Updated Tagalog
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:53:35 -07:00
snipe 0686e1e7c4 Updated Thai
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:52:36 -07:00
snipe 6143f28bb9 Updated Tamil
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:52:03 -07:00
snipe 0e2dd5d76c Updated Swedish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:51:37 -07:00
snipe eae5e7b35d Updated Serbian (Latin)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:51:15 -07:00
snipe 4f8dc54872 Updated Slovenian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:50:34 -07:00
snipe 81129ed91f Updated Slovak
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:49:54 -07:00
snipe 48dff4681b Updated Sinhala
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:48:25 -07:00
snipe 40bb5bb4f0 Updated Russian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:47:56 -07:00
snipe 51f1ad6693 Updated Romanian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:46:22 -07:00
snipe ca49923371 Updated Portuguese, European
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:54 -07:00
snipe d9d3d11cc6 Updated Portuguese, Brazilan
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:42 -07:00
snipe b7537a73b2 Updated Polish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:45:10 -07:00
snipe 98aa8623d3 Updated Norwegian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:44:48 -07:00
snipe aa9420cbad Updated Dutch
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:44:15 -07:00
snipe 9b7ab63277 Updated Malay
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:43:38 -07:00
snipe d588b2905d Updated Mongolian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:43:12 -07:00
snipe c176f3d030 Updated Malayalam
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:42:40 -07:00
snipe 173e2add88 Updated Macedonian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:42:14 -07:00
snipe 359d8d0e08 Updated Maori
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:41:36 -07:00
snipe 2ea03f66a2 Updated Latvian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:40:55 -07:00
snipe d2301dae63 Updated Lithuanian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:40:21 -07:00
snipe e24a9ccf1c Updated Korean
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:39:35 -07:00
snipe 227d7e75a3 Updated Japanese
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:38:59 -07:00
snipe 8befc23178 Updated Inuktitut
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:38:17 -07:00
snipe 9eac3c2e64 Updated Italian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:37:42 -07:00
snipe 4c220df181 Updated Icelandic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:36:58 -07:00
snipe 0703d037d6 Updated Indonesian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:35:48 -07:00
snipe 28498857c2 Updated Hungarian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:35:12 -07:00
snipe 7c4e73d660 Updated Croatian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:34:31 -07:00
snipe c42c9cc832 Updated Hebrew
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:33:41 -07:00
snipe 7cebbf48ee Updated Irish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:32:55 -07:00
snipe 70745952b9 Updated French
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:32:12 -07:00
snipe 807509030c Updated Filipino
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:27:32 -07:00
snipe 0a673f4ffe Updated Finnish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:27:01 -07:00
snipe f1caf69f05 Updated Persian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:26:15 -07:00
snipe 86532746b1 Updated Estonian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:25:35 -07:00
snipe 94035e5e4b Updated Spanish, Venezuela
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:24:19 -07:00
snipe 5a84a1d15c Updated Spanish, Mexico
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:23:41 -07:00
snipe 48c924e0b2 Updated Spanish, Spain
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:23:16 -07:00
snipe 54deaf18d1 Updated Spanish, Colombia
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:22:57 -07:00
snipe 4f3617d271 Updated Indonesian English
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:21:43 -07:00
snipe 096be6e095 Updated British English
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:21:33 -07:00
snipe 02601a95e0 Updated Greek
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:20:09 -07:00
snipe 70653419cd Updated German Informal
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:19:24 -07:00
snipe 8f258d8454 Updated German
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:18:50 -07:00
snipe 9f26a30256 Updated Danish
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:18:16 -07:00
snipe 0b392286ce Updated Welsh
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:17:33 -07:00
snipe 5f56b30d19 Updated Czech
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:16:42 -07:00
snipe ba7d8f1c07 Updated Catalan
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:15:38 -07:00
snipe e391c1322c Updated Bulgarian
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:14:50 -07:00
snipe f634640425 Updated Arabic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:13:56 -07:00
snipe 4bcc1c6aa9 Updated Amharic
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:12:55 -07:00
snipe 88b98e6cf7 Updated Afrikaans
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:11:43 -07:00
snipe a9bb2f78cc Fixed borked English string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 19:11:35 -07:00
snipe a8ca3ad2a9 Merge remote-tracking branch 'origin/develop' 2023-04-06 18:49:51 -07:00
Marcus Moore cd0796ddda Allow Settings to be chainable 2023-04-06 18:46:29 -07:00
snipe 38a2f535ad Merge pull request #12799 from snipe/features/bm_script
Added BM JS
2023-04-06 18:46:16 -07:00
snipe d120fd2a16 Merge remote-tracking branch 'origin/develop' 2023-04-06 18:42:22 -07:00
snipe 6b319bffff Merge pull request #12800 from snipe/fixes/accessories_checkout
Fixed accessories verifying that enough remain to be checked out
2023-04-06 18:42:01 -07:00
snipe ffdc0d76f7 Fixed accessories verifying that enough remain to be checked out
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 18:40:29 -07:00
Marcus Moore 9561b66613 Add return types and docblock 2023-04-06 17:58:53 -07:00
Marcus Moore 95f195046d Move cache flush to testing helper 2023-04-06 17:50:24 -07:00
Marcus Moore 52c733b31d Add ability to set provided settings 2023-04-06 17:48:23 -07:00
Marcus Moore 8ac4d3aeea Move to a static constructor 2023-04-06 17:42:15 -07:00
Marcus Moore bbfb6c338a Remove unused method 2023-04-06 17:28:16 -07:00
Marcus Moore f767cc082f Introduce improved way to interact with settings in tests 2023-04-06 17:27:18 -07:00
snipe 74b471bbad Check for more specifics in env vars
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 16:24:46 -07:00
snipe 6ff3745adf Added BM JS
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 16:19:33 -07:00
snipe 3d26fbd82f Merge remote-tracking branch 'origin/develop' 2023-04-06 15:13:13 -07:00
snipe 383d48fd9c Merge pull request #12787 from Godmartinz/accessory_unavailable_message
Added unavailable message to prevent over-checkout of Accessories
2023-04-06 15:05:18 -07:00
snipe c683233aa3 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/build/vendor.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-04-06 15:00:38 -07:00
snipe bd4757ad7a Merge pull request #12779 from snipe/features/replace_icheck_with_only_css
Move from iCheck to pure CSS for radio and checkboxes
2023-04-06 14:58:33 -07:00
snipe 3d29748f7d Merge remote-tracking branch 'origin/develop' 2023-04-06 13:11:45 -07:00
Godfrey M 3d7c55deb3 removed an unncessary query 2023-04-06 13:06:05 -07:00
Godfrey M 55943d8897 uses numRemaining now 2023-04-06 10:05:17 -07:00
snipe c1daac153b Updated string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:17:47 -07:00
snipe 2a9f816bfe Prevent wrapping on buttons
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:04:56 -07:00
snipe 506021dbe3 Remove iCheck calls, fixed some bootstrap HTML
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:03:41 -07:00
snipe f90a6fed91 Downgraded error logging to debug
Signed-off-by: snipe <snipe@snipe.net>
2023-04-06 09:02:15 -07:00
snyk-bot 4c05da37c1 fix: upgrade webpack from 5.76.1 to 5.76.2
Snyk has created this PR to upgrade webpack from 5.76.1 to 5.76.2.

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
2023-04-06 14:48:49 +00:00
snipe 39e6ca82bb Merge pull request #12793 from snipe/fixes/use_app_url_more_consistently
Fixed #12772 - use the APP_URL config more consistently
2023-04-05 16:48:45 -07:00
snipe 161999fbca Fixed #12772 - use the APP_URL config more consistently
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 16:05:40 -07:00
snipe 6aec73c720 Merge pull request #12792 from snipe/fixes/eol_size
Fixed  #12776 - larger EOL field
2023-04-05 16:00:49 -07:00
snipe 5e6a6a81d5 Fixed #12776 - larger EOL text
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 16:00:02 -07:00
snipe c24b398b6f Merge pull request #12790 from snipe/fixes/support_url
Updated support URL
2023-04-05 14:55:41 -07:00
snipe 752365aa85 Updated support URL
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 14:54:40 -07:00
snipe 4b4d4e98b6 Use enclosing span for HTML text in grid
Signed-off-by: snipe <snipe@snipe.net>
2023-04-05 14:10:57 -07:00
snipe 9af2d0a6de Merge branch 'develop' into features/replace_icheck_with_only_css 2023-04-05 13:04:12 -07:00
snipe 2e45c4370c Merge pull request #12782 from marcusmoore/chore/update-crowdin-config
Update CrowdIn configuration to allow nested translations
2023-04-05 12:59:20 -07:00
Marcus Moore 5b4d5cadf4 Add tests for sending webhooks on asset and license seat checkin 2023-04-05 12:57:53 -07:00
Marcus Moore 3054d633b0 Improve comments and remove unused imports 2023-04-05 12:39:41 -07:00
Marcus Moore 3cc3662992 Send webhook notifications for accessory checkins when enabled 2023-04-05 12:36:24 -07:00
Marcus Moore 2187310abb Simplify test case names 2023-04-05 12:27:18 -07:00
Marcus Moore b41902976b Improve test class names 2023-04-05 12:23:11 -07:00
Marcus Moore 6df8f0f35c Merge branch 'develop' into bug/sc-15034 2023-04-05 11:49:53 -07:00
Godfrey M b038fe8f2e adds unavailable message to overcheckout 2023-04-05 10:00:39 -07:00
Marcus Moore 32351d0e48 Allow downloading nested CrowdIn translations 2023-04-04 15:35:31 -07:00
snipe ead5293ee0 Merge pull request #12765 from spencerrlongg/chore/sc-20230
Change protected $dates to casts
2023-04-04 01:29:24 -07:00
snipe b376181cef Merge pull request #12769 from marcusmoore/chore/publish-test-stubs
Publishes test stubs
2023-04-04 01:28:47 -07:00
snipe 723ef36608 Merge pull request #12781 from snipe/fixes/color-picker-fix
Color picker UI fix
2023-04-04 00:34:07 -07:00
snipe 55857c910a Color picker UI fix
Signed-off-by: snipe <snipe@snipe.net>
2023-04-04 00:33:05 -07:00
snipe 5919f3843d Small fixes to the color picker (sorry)
Signed-off-by: snipe <snipe@snipe.net>
2023-04-04 00:27:05 -07:00
snipe 6164e8b3fa Changed colors for disabled, removed dupe checkmark
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 23:53:57 -07:00
snipe 0e68b8e9f2 Small fixes for profile edits
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 23:06:09 -07:00
snipe 3bd87a2785 Removed iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:52:54 -07:00
snipe 5df34d0058 Diable SAML submit if in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:40:25 -07:00
snipe 9a3e727390 Updated other form fields to use new label class, fixed HTML for accessibility
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:38:56 -07:00
snipe aca64dc088 Updated check groups for permissions to skip iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:38:24 -07:00
snipe 3473e24de5 Updated assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:36:23 -07:00
snipe 1af7cdb715 Wrapped the image delete into the existing image upload partial
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 22:35:55 -07:00
snipe 2c47b63e91 Small tweaks to overrides
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:37:07 -07:00
snipe a7787a6cdc Fixed string
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:20:58 -07:00
snipe 62c99d4e2e Added check all to user delete
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:19:28 -07:00
snipe 858f1c2d12 Updated audit with icheck, removed popover text - need a better solution with layout
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:19:12 -07:00
snipe 76b9608de3 Typo fix
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 19:18:40 -07:00
snipe 8b315a6502 Updated contrller to use trans_choice
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:55:09 -07:00
snipe 1ea813a1c5 Updated strings to trans_choice
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:54:59 -07:00
snipe a861672146 Standardized model bulk blades a little more
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 18:54:46 -07:00
snipe 146976975c Removed <wire:ignore> in model edit for default custom fields
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:34 -07:00
snipe 58b3369234 Requestable partial - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:12 -07:00
snipe 21448f6adf Model edit - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:38:02 -07:00
snipe 899b936152 Models bulk edit - removing icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:49 -07:00
snipe 866ba36090 Hardware editing un-icheckification
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:34 -07:00
snipe 60d60be0ac Small style specification for notes partial field
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:37:16 -07:00
snipe 5ed9385685 Clearer tab name for user info
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:09:25 -07:00
snipe c05ee5db0e Built assets
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:54 -07:00
snipe c5d74ac27f Additional form CSS tweaks for disabled and unchecked
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:47 -07:00
snipe 9146850ffe Added string for emailing user credentials
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:31 -07:00
snipe 2c5ddca695 More jquery and form fixes for users
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 17:08:21 -07:00
snipe 790f9c2fc4 Updated 2FA to non-icheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 15:38:52 -07:00
snipe b4df9eb586 More checkbox tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 15:33:21 -07:00
snipe 0d050e4016 Updated user edit page with with non-icheck toggles
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 14:55:12 -07:00
snipe 4035cd118e Handle the column selector in bs table styling
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 14:35:47 -07:00
snipe 5c89439ba3 Updated login page to use non-icheck
TODO: override that style for the labels
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:18:18 -07:00
snipe 85c0ddf475 Tweaked the col-md to use offset
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:17:49 -07:00
snipe 868615d5e7 Removed iCheck from snipeit.js and webpack
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 12:17:31 -07:00
snipe 5078b51d4d Removed temp disabled attributes
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 11:39:02 -07:00
snipe e066f033c8 First attempt at moving us away from iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-04-03 10:54:01 -07:00
snipe 2d9ff795e3 Add @mezzle as a contributor 2023-04-02 09:00:03 -07:00
Marcus Moore 524249d4d7 Implement tests for webhook notifications on accessory checkout 2023-03-30 16:58:16 -07:00
Marcus Moore 44e05eecbf Publish test stubs 2023-03-30 16:42:59 -07:00
Marcus Moore b2292db3c8 Implement tests for webhook notifications on consumable checkout 2023-03-30 16:40:53 -07:00
Marcus Moore aefc53cfcf Explicitly disable webhook settings in tests 2023-03-30 16:40:21 -07:00
Marcus Moore 621d8500eb Merge branch 'develop' into bug/sc-15034 2023-03-30 16:17:42 -07:00
snyk-bot 91c67c3116 fix: upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0
Snyk has created this PR to upgrade tableexport.jquery.plugin from 1.26.0 to 1.27.0.

See this package in npm:
https://www.npmjs.com/package/tableexport.jquery.plugin

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
2023-03-30 22:55:38 +00:00
Marcus Moore 134ab631d4 Add test to ensure notification is not sent for license checkouts if not enabled 2023-03-30 15:38:22 -07:00
Marcus Moore 158e1544cd Test the event instead of the checkout 2023-03-30 15:38:00 -07:00
snipe fcda478712 Merge remote-tracking branch 'origin/develop' 2023-03-30 14:51:23 -07:00
snipe 986c73982e Check if status is set
Signed-off-by: snipe <snipe@snipe.net>
2023-03-30 14:50:56 -07:00
snipe 080a4c823b Merge remote-tracking branch 'origin/develop' 2023-03-30 14:49:19 -07:00
snipe ed8535a197 Merge pull request #12767 from snipe/fixes/bulk_restore
Quick fix for bulk restore menu
2023-03-30 14:48:43 -07:00
snipe 1fc0a0f94d Quick fix for bulk restore menu
Signed-off-by: snipe <snipe@snipe.net>
2023-03-30 14:44:38 -07:00
snipe 048be49c14 Merge remote-tracking branch 'origin/develop' 2023-03-30 14:37:47 -07:00
snipe cfef9d8cca Merge pull request #12763 from inietov/fixes/call_to_member_function_licenses_on_null
Fixed Call to a Member Function Licenses() on null [sc-20606]
2023-03-30 14:20:13 -07:00
snipe dfa9c07217 Merge pull request #12760 from akemidx/apple_warranty_link_fix2
Updating Apple warranty link to match current Apple webpage
2023-03-30 12:47:09 -07:00
akemidx 0c38257f80 fixing one liner 2023-03-30 15:40:23 -04:00
snipe 9ca5285781 Merge pull request #12762 from spencerrlongg/feature/sc-20304
Bulk Restore from Deleted
2023-03-30 12:37:50 -07:00
slong753 0f72554a9f translations for messages 2023-03-30 13:57:18 -05:00
slong753 382d849ee1 added catch for no assets selected 2023-03-30 13:52:29 -05:00
slong753 b84eaaf61a translations done 2023-03-30 13:48:05 -05:00
slong753 8c1c0e81b6 rm deplicates 2023-03-30 13:31:58 -05:00
snipe b7c09042b0 Merge pull request #12758 from inietov/fixes/call_to_member_function_present_null
Fixed Call to a member function present() on null [sc-20594]
2023-03-30 11:01:38 -07:00
snipe 10c1e923dc Merge pull request #12764 from marcusmoore/fixes/importer-fix
Fixes potential unwanted overwrites in asset imports
2023-03-30 09:40:58 -07:00
slong753 e126a75f7a pretty sure this was it 2023-03-29 21:37:26 -05:00
Ivan Nieto Vivanco d10b7fd6af Use firstorfail on eloquent query to return error if asset is not found 2023-03-29 19:11:28 -06:00
slong753 d5d50264c3 fix permissions stuff + optional parameter 2023-03-29 19:53:04 -05:00
Ivan Nieto Vivanco d622dbb943 Revert the php codeblock and replace it with a ternary 2023-03-29 18:37:47 -06:00
snipe da940a6bcc Merge remote-tracking branch 'origin/develop' 2023-03-29 17:19:50 -07:00
Marcus Moore 6beb3b551a Fix typo 2023-03-29 17:01:24 -07:00
Marcus Moore 0998c70a92 Remove unneeded import 2023-03-29 16:59:26 -07:00
Marcus Moore 9f8b8f6cc1 Remove unneeded variable 2023-03-29 16:58:55 -07:00
slong753 d033733fc0 oops, remove a couple things 2023-03-29 18:30:39 -05:00
slong753 e4c76f454c this is good, just needs translations done in view 2023-03-29 18:24:56 -05:00
slong753 162b70d5a9 wireframed, needs a view and should work 2023-03-29 17:34:36 -05:00
Marcus Moore 863a346d6e Translate strings 2023-03-29 13:37:14 -07:00
Marcus Moore e05546d1fa Display helpful messages when importing assets 2023-03-29 13:23:45 -07:00
akemidx 6bee4c1a75 Updating Apple warranty link to match current Apple webpage 2023-03-29 15:09:14 -04:00
Marcus Moore 4cbe683a1a Explicitly cast asset tag to string when querying 2023-03-29 11:28:04 -07:00
Marcus Moore 9cc74caa9e Add wire:model to import form checkboxes 2023-03-29 10:58:25 -07:00
Ivan Nieto Vivanco d7c531e1c7 Checks if user variable exist before using its properties 2023-03-29 10:33:15 -06:00
Dominik Both 3271c9dc9f Fix #8208, #8896, #8985, #9789 2023-03-29 09:56:34 +02:00
snipe c9d1274edc Merge pull request #12753 from snipe/fixes/lang_for_group_not_found
Fixes/lang for group not found
2023-03-28 16:45:22 -07:00
snipe 32922e6461 Use corrected language string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:39:52 -07:00
snipe 527c812d04 Use icon for group users header
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:39:41 -07:00
snipe b57b5e23d9 Merge pull request #12752 from inietov/fixes/attempt_to_read_property_on_null
Fixed ErrorException: Attempt to read property "rtd_location_id" on null [sc-20562]
2023-03-28 16:32:34 -07:00
snipe 94de9edce7 Merge pull request #12751 from snipe/features/added_snipeagent_link
Added link to SnipeAgent
2023-03-28 16:27:03 -07:00
snipe 88826c1115 Added link to SnipeAgent
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 16:26:27 -07:00
Ivan Nieto Vivanco 77d513f80b Assign target variable as the other checkout types 2023-03-28 17:25:57 -06:00
Ivan Nieto Vivanco d70b7dbf41 Checks if exist on API checkout 2023-03-28 16:12:48 -06:00
snipe 70764cc783 Merge remote-tracking branch 'origin/develop' 2023-03-28 14:27:14 -07:00
snipe 2306f30158 Updated author link to @Karpadiem
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 14:26:59 -07:00
snipe 99a05c6401 Merge remote-tracking branch 'origin/develop' 2023-03-28 13:43:24 -07:00
snipe 667a5a9274 Merge pull request #12750 from snipe/features/added_kandji_and_unifi_links
Added links to kandji2snipe and UnifiSnipeSync
2023-03-28 13:42:40 -07:00
snipe a0eb9dc735 Added links to kandji2snipe and UnifiSnipeSync
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 13:41:58 -07:00
snipe e03a961bcc Merge pull request #12747 from svpernova09/preflight-strings
Pre-Flight String fixes for step 2
2023-03-28 08:37:43 -07:00
Joe Ferguson 47e18db172 Fix next button string for Step 2 preflight 2023-03-28 10:30:56 -05:00
Joe Ferguson d667ae53ed Add missing strings to Step 2 preflight 2023-03-28 10:30:35 -05:00
snipe 03aadc4abf Merge remote-tracking branch 'origin/develop' 2023-03-28 07:20:22 -07:00
snipe 099173fb94 Merge pull request #12744 from snipe/fixes/12742_wrong_url_on_requestable_models
Use named route with params
2023-03-28 07:19:49 -07:00
snipe 09674c012c Use named route with params
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 07:18:45 -07:00
snipe c680274a92 Merge remote-tracking branch 'origin/develop' 2023-03-28 06:56:35 -07:00
snipe 52fd334745 Merge pull request #12743 from snipe/fixes/quieter_logging
Changed log level to debug vs info/error
2023-03-28 06:56:06 -07:00
snipe feef06e7bf Changed log level to debug vs info/error
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 06:54:41 -07:00
snipe d2daaf30eb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-03-28 03:32:04 -07:00
snipe 6800098469 Bumped version for 6.1.0-pre
Signed-off-by: snipe <snipe@snipe.net>
2023-03-28 03:31:02 -07:00
Marcus Moore 2cbc6276f7 Implement test for license checkout notification 2023-03-27 14:09:31 -07:00
Marcus Moore 362d5b9fd4 Merge branch 'develop' into bug/sc-15034 2023-03-27 11:46:30 -07:00
snipe 468805bab5 Merge pull request #12732 from svpernova09/preflight-translation-string-fixes
User preflight fix translation strings w/ bad path
2023-03-27 10:43:13 -07:00
Joe Ferguson cd49f65c0b User preflight fix translation strings w/ bad path 2023-03-24 15:27:08 -05:00
snipe dcbd216e2c Merge remote-tracking branch 'origin/develop' 2023-03-24 08:29:22 -07:00
snipe 008ba83128 Merge pull request #12729 from snipe/fixes/file_importer_string
Fixed translation string for importer
2023-03-24 08:28:51 -07:00
snipe 697cb4fe6d Fixed translation string for importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 08:27:53 -07:00
snipe 8a395d63a1 Merge remote-tracking branch 'origin/develop' 2023-03-24 07:23:06 -07:00
snipe 4d1e28ad03 Merge pull request #12727 from snipe/fixes/add_json_to_mimes
Fixed #12641 - added JSON to mimes
2023-03-24 07:22:30 -07:00
snipe 47eccb665e Merge pull request #12728 from snipe/fixes/fixes_typo_in_category_list
Use single “accessory” translation
2023-03-24 07:19:59 -07:00
snipe 150a2b572e Use single “accessory” translation
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 07:14:02 -07:00
snipe 6bc0df73e8 Merge pull request #12661 from Godmartinz/gh12655_missing_translations
Adds translations for category types to index and edit of categories
2023-03-24 07:09:40 -07:00
snipe 16dcc2d3ed Fixed #12641 - add JSON to mimes
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 06:57:43 -07:00
snipe 43c286c61f Merge remote-tracking branch 'origin/develop' 2023-03-24 06:18:10 -07:00
snipe aa4bdd4eb3 Merge pull request #12726 from snipe/fixes/12724_custom_fields
Fixed #12724 - fieldset not saving on model
2023-03-24 06:17:42 -07:00
snipe e869b1fd53 Fixed #12724 - fieldset not saving on model
Signed-off-by: snipe <snipe@snipe.net>
2023-03-24 06:11:24 -07:00
snipe 13ad69ee75 Merge pull request #12713 from inietov/fixes/trying_access_array_offset_null
Fixed Trying to access array offset on value of type null [sc-20528]
2023-03-24 04:52:56 -07:00
snipe 642d1e9f36 Merge pull request #12720 from inietov/fixes/undefined_array_key_266
Fixed Undefined array key 266 rollbar 17086
2023-03-24 04:50:47 -07:00
snipe 3792d3fdd2 Merge pull request #12721 from marcusmoore/fixes/allow-migrating-sqlite
Fixes the migration of sqlite databases
2023-03-24 04:50:15 -07:00
Marcus Moore 317335e79f Allow the migration of sqlite databases 2023-03-23 17:40:03 -07:00
Marcus Moore fa69a580ab Start to scaffold license checkout notification test 2023-03-23 17:18:33 -07:00
Marcus Moore fc043a35d9 Fix checkouts for licenses 2023-03-23 17:03:48 -07:00
Marcus Moore 25e859c866 Simplify test case 2023-03-23 16:42:21 -07:00
Marcus Moore 2dcf4e3d16 Standardize on sending anonymous notifications for asset checkouts 2023-03-23 16:31:40 -07:00
Marcus Moore 1f664709ba Merge branch 'develop' into bug/sc-15034
# Conflicts:
#	app/Notifications/CheckoutAssetNotification.php
2023-03-23 13:04:40 -07:00
Ivan Nieto Vivanco fbb3684022 Add a condition to 'restart' the color index for the status pie chart 2023-03-23 12:43:02 -06:00
snipe b91e914a61 Merge remote-tracking branch 'origin/develop' 2023-03-23 10:55:58 -07:00
snipe fc3672c119 Merge pull request #12717 from marcusmoore/fixes/update-slack-property-names
Fixes calls to changed webhook properties names
2023-03-23 10:55:02 -07:00
Marcus Moore 9d2c4a4dee Update webhook message 2023-03-23 10:38:35 -07:00
Marcus Moore fe6295a5e4 Update slack_* properties to webhook_* 2023-03-22 14:43:00 -07:00
Ivan Nieto Vivanco aa8dfcf89f Added a ternary to avoid null offset in array 2023-03-22 13:48:23 -06:00
Marcus Moore b396f2bed3 Update test case names 2023-03-22 12:41:30 -07:00
Marcus Moore 28ced46b9d Clean up test code 2023-03-22 12:38:14 -07:00
Marcus Moore 66224765ea Use factory state for webhook settings 2023-03-22 12:31:47 -07:00
Marcus Moore 9c4a3ce56a Update slack_endpoint to webhook_endpoint in test and notification 2023-03-22 12:27:36 -07:00
Marcus Moore f6d0dd0f93 Merge branch 'develop' into bug/sc-15034 2023-03-22 11:58:47 -07:00
Marcus Moore e303aeadd1 Fix test name 2023-03-22 11:56:54 -07:00
snipe e8e1ada776 Merge pull request #12669 from akemidx/feature/sc-20178
#20178: Added Dell and Lenovo to warranty link function
2023-03-22 00:54:40 -07:00
snipe 58ea1592bb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
#	resources/views/livewire/slack-settings-form.blade.php
2023-03-22 00:26:15 -07:00
snipe f3785acf4d Merge pull request #12710 from snipe/localization/fixing_a_few_more_hardcoded_strings
Handled a few more hard-coded strings
2023-03-22 00:22:06 -07:00
snipe 545d023a18 Handled a few more hard-coded strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 23:56:07 -07:00
snipe 473211397f Merge pull request #12708 from uberbrady/livewire_importer_no_subcomponent
Livewire importer without subcomponent
2023-03-21 23:07:04 -07:00
snipe e28d4fa588 Merge pull request #12709 from snipe/fixes/null_location_in_bulk_users
Ability to remove user location from users
2023-03-21 23:04:31 -07:00
snipe e08327be95 Ability to remove user location from users
Rework of #9677 - sorry @godmartinez - I suck :(

Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 23:03:57 -07:00
snipe 418ce75a9f Merge pull request #11431 from ntbutler-nbcs/develop
[Fix / Minor Change] Asset checkinbytag now consistent with existingAPI
2023-03-21 22:40:21 -07:00
Brady Wetherington 6fe520a55d Hooked various the contents of the components together 2023-03-21 22:26:32 -07:00
snipe 0418d390f0 Corrected width to 100%
I should not be allowed to touch computers

Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:25:15 -07:00
snipe b3d5bb75a3 Apply master patch to develop because I am an idiot on the wrong branch
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:23:09 -07:00
snipe 5346ebba94 Make select2 list in slack settings not searchable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:21:21 -07:00
snipe 6c2c36469a Merge remote-tracking branch 'origin/develop' 2023-03-21 22:18:53 -07:00
snipe 1fa9f80c03 Correctly disable the select2 in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:18:42 -07:00
snipe 4efac7827b Trying other save method, I guess?
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 22:10:30 -07:00
snipe b45dc09f57 Merge pull request #12707 from snipe/fixes/fixed_migration_for_demo
Fixes back-in-time Slack v slack migration
2023-03-21 22:01:17 -07:00
snipe 76425ca2a5 Fixes back-in-time Slack v slack migration
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:59:17 -07:00
snipe e609130291 Merge pull request #12706 from snipe/fixes/static_helper
Forgot the static method declaration - derp
2023-03-21 21:21:56 -07:00
snipe 41eb2464e2 Forgot the static method declaration - derp
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:21:01 -07:00
snipe 8aec28fad6 Merge remote-tracking branch 'origin/develop' 2023-03-21 21:14:06 -07:00
snipe e55fc4d047 Merge pull request #12705 from snipe/fixes/webhook_ui
Slack webhook UI tweaks, added select2
2023-03-21 21:11:14 -07:00
snipe e40762cf7f Small anal-retentive spacing/indenting tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 21:00:43 -07:00
snipe 2d3ddd1c7a Fixed default value for webhook_selected
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 20:56:08 -07:00
snipe 637438ccf6 Added select2 to slack settings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 20:00:11 -07:00
snipe 647f47cdfe Check for demo mode in the clear method for the controller
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 19:27:05 -07:00
snipe a14d1b981d Switched singleton to static helper method
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 19:22:18 -07:00
snipe 5217141dfb Yuck, but added helper function to return the demo mode form warning
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:34 -07:00
snipe b28a25f544 Normalize the flash session to the way we do it elsewhere
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:18 -07:00
snipe d55ae44638 Helper method to make it easier (shorter) to determine if the app is in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:59:03 -07:00
snipe f29e813332 Translated “Clear & Save”
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:58:35 -07:00
snipe d883084830 Fixed some funky HTML tags
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:58:26 -07:00
snipe 658252125e Added new partial for the form inline “demo mode”
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 18:57:27 -07:00
Marcus Moore 315f5231cd Send slack notification for check outs to assets and locations 2023-03-21 17:03:51 -07:00
snipe 35bef6625a Merge pull request #12703 from Godmartinz/webhook_clean_up
adds clear and save button, save button updates accordingly
2023-03-21 17:02:33 -07:00
snipe 342b399191 Merge pull request #12700 from marcusmoore/fixes/purify-factories
Purifies model factories
2023-03-21 16:52:30 -07:00
Godfrey M 2754277068 adds csrf token and missing divs 2023-03-21 16:12:46 -07:00
snipe 4cc29b76f0 Merge remote-tracking branch 'origin/develop' 2023-03-21 16:07:03 -07:00
snipe 7059a57be1 Merge pull request #12704 from snipe/features/next_audit_date
Added next audit date override in bulk asset edit
2023-03-21 16:02:37 -07:00
snipe c229d69cec Added next audit date override in bulk asset edit
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 16:01:41 -07:00
Godfrey M 3c28242a2e save button updates accordingly 2023-03-21 15:53:09 -07:00
snipe c41aa8ac7f Merge pull request #12701 from snipe/features/add_default_location_to_maintenance_report
Fixed #12682 - add default location to maintenance report
2023-03-21 13:55:09 -07:00
snipe ecb11c3a12 Fixed #12682 - add default location to maintenance report
Signed-off-by: snipe <snipe@snipe.net>
2023-03-21 13:52:21 -07:00
snipe 4f8542b71b Merge pull request #12680 from akemidx/clone_accessories
Clone accessories
2023-03-21 13:37:04 -07:00
akemidx bb7b655fd2 translating screen reader lines 2023-03-21 16:02:34 -04:00
akemidx 3134279a95 small edits 2023-03-21 15:48:53 -04:00
Marcus Moore 751abe1438 Re-add asset factory states 2023-03-21 09:54:55 -07:00
Marcus Moore d214bd0b06 Remove temporary command 2023-03-20 16:41:33 -07:00
Marcus Moore 3b16a65988 Merge branch 'develop' into fixes/purify-factories 2023-03-20 16:24:35 -07:00
Marcus Moore 918239961a Add simple test case for assets 2023-03-20 15:47:57 -07:00
Marcus Moore 272cc1adac Skip creating user when creating a setting since it isn't needed 2023-03-20 15:33:40 -07:00
Marcus Moore 16e3416225 Update test case 2023-03-20 14:27:45 -07:00
snipe 8012c966b0 Merge pull request #12696 from snipe/dependabot/github_actions/docker/build-push-action-4
Bump docker/build-push-action from 3 to 4
2023-03-20 14:19:44 -07:00
Marcus Moore a0e547c7fb Remove some unused imports 2023-03-20 14:18:59 -07:00
Marcus Moore 44a91f0a2b Seed license checkouts 2023-03-20 14:18:54 -07:00
dependabot[bot] 4537ab3d54 Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 21:18:50 +00:00
snipe 05b4170116 Merge pull request #12694 from uberbrady/config_cachable_if_no_rollbar
Fixed #12671: Re-enable config:cache when there's no Rollbar
2023-03-20 14:17:53 -07:00
Marcus Moore 92e0c59f89 Fix typo in Keyboard accessory name 2023-03-20 12:01:39 -07:00
Marcus Moore 1bad8e1fc2 Remove outdated comments 2023-03-20 11:42:15 -07:00
Marcus Moore 1fd574779b Remove unneeded or outdated comments and update imports 2023-03-20 11:39:27 -07:00
Marcus Moore a37d69fcf1 Replace remaining user_ids in factories 2023-03-20 11:19:34 -07:00
Brady Wetherington 3a4ca5acad Re-enable config:cache *only* if there's no Rollbar 2023-03-18 21:07:00 -07:00
Brady Wetherington 704a2ad858 WIP: trying to merge two LW components into one, not working yet 2023-03-18 20:31:56 -07:00
snipe 3a30f04b51 Merge remote-tracking branch 'origin/develop' 2023-03-18 12:00:42 -07:00
snipe f2a3c2a349 Merge pull request #12693 from snipe/fixes/use_statements
Updates the Gate “use” statement to be more specific
2023-03-18 12:00:23 -07:00
snipe f9e190eb32 Updates the Gate “use” statement to be more specific
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 11:58:09 -07:00
snipe de6b663833 Merge pull request #12692 from snipe/fixes/small_group_api_fixes
Corrected gates, added fillable
2023-03-18 11:56:15 -07:00
snipe 8dd3ae8a37 Corrected gates, added fillable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 11:53:20 -07:00
snipe 03b4a87a65 Merge remote-tracking branch 'origin/develop' 2023-03-18 00:16:34 -07:00
snipe c7f4a93c17 Merge pull request #12691 from snipe/fixes/small_cleanup_for_bulk_delete_checkin
Small cleanup for bulk delete checkin
2023-03-18 00:16:15 -07:00
snipe 071a642509 Changed phrasing in translatons
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:15:28 -07:00
snipe e39a75f2cc Fixed min width on select2 bulk menus
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:14:57 -07:00
snipe ea4a37d8ef Fixed cancel button alignment
Signed-off-by: snipe <snipe@snipe.net>
2023-03-18 00:14:09 -07:00
snipe d7363a41c8 Merge remote-tracking branch 'origin/develop' 2023-03-17 17:30:32 -07:00
snipe 789c4b4df8 Merge pull request #12690 from snipe/features/more_merge_user_olish
More merge-user polishing
2023-03-17 17:29:12 -07:00
snipe 12a2d8ad49 Fixed admin ID
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 17:03:10 -07:00
snipe e47fc9527b Updated language
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:50:02 -07:00
snipe 820ae09a6f Reworked the layout of the confirm merge form a little
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:41 -07:00
snipe fb54a21e12 Added strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:22 -07:00
snipe b39fa1d987 Added merge icon
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:42:17 -07:00
snipe 28cc8f9d69 Nicer user history display
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:41:43 -07:00
snipe a54e50961e Added event and listener
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:41:33 -07:00
snipe 82dc57aa18 Renamed some variables, invoked the event listener
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:24:58 -07:00
snipe 9ac4efb912 Better commenting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 16:24:38 -07:00
snipe a4e6b3c022 Merge remote-tracking branch 'origin/develop' 2023-03-17 02:48:51 -07:00
snipe c752e3bb86 Fixed divs
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:48:41 -07:00
snipe 934f43e104 Merge remote-tracking branch 'origin/develop' 2023-03-17 02:45:04 -07:00
snipe 1a8622dc3b Merge pull request #12689 from snipe/features/add_password_lock_and_use_new_strings
Features/add password lock and use new strings
2023-03-17 02:44:37 -07:00
snipe e557f03cc2 Disable submit if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:43:33 -07:00
snipe 30cf7eb750 Disallow action in demo mode
Signed-off-by: snipe <snipe@snipe.net>
2023-03-17 02:42:50 -07:00
snipe ccdd6ef5e0 Merge remote-tracking branch 'origin/develop' 2023-03-16 23:14:47 -07:00
snipe 13a02ff241 Merge pull request #12687 from snipe/features/nicer_ui_for_merge
Made the table wider, used icons to compact space
2023-03-16 23:14:25 -07:00
snipe c93096b767 Made the table wider, used icons to compact space
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 23:13:05 -07:00
snipe 94a275f239 Merge remote-tracking branch 'origin/develop' 2023-03-16 22:50:11 -07:00
snipe d8d7ed4465 Merge pull request #12686 from snipe/features/added_email_and_username_to_merge_confirm
Added email and username to merge user confirmation screen
2023-03-16 22:49:54 -07:00
snipe 736777e1e6 Added email and username to merge user confirmation screen
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 22:48:20 -07:00
Marcus Moore 3849bb838d Make a few more factories a bit more pure 2023-03-16 18:29:51 -07:00
snipe 0ef8aba36f Merge remote-tracking branch 'origin/develop' 2023-03-16 18:20:57 -07:00
snipe f566a71658 Merge pull request #12685 from snipe/features/merge_users
Added user merge
2023-03-16 18:20:24 -07:00
snipe 0dd11575c5 Added merge controller
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:19:16 -07:00
snipe d3d26cb988 Added translations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:19:03 -07:00
snipe 07fbbf5f7f Added merge to user menu
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:54 -07:00
snipe 0dfb51f642 User merge blade
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:32 -07:00
snipe 853e809ff8 Added route
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 18:18:26 -07:00
Marcus Moore 605f214597 Add properties necessary for factories to be called in isolation 2023-03-16 17:08:18 -07:00
Marcus Moore d9c1a548f1 Update deprecated faker calls 2023-03-16 17:07:46 -07:00
Marcus Moore 582c3b987b Update some faker calls 2023-03-16 16:38:21 -07:00
snipe ffd9bbd7c6 Merge remote-tracking branch 'origin/develop' 2023-03-16 16:27:41 -07:00
snipe ffb87a0a87 Merge pull request #12684 from snipe/features/added_console_command_to_normalize_names
Added console command to normalize capitalization on names
2023-03-16 16:24:33 -07:00
snipe 8f04342fc2 Added console command to normalize capitalization on names
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:23:52 -07:00
snipe d6434fa55a Merge pull request #12683 from snipe/fixes/additional_sort
Fixes/additional sort
2023-03-16 16:08:51 -07:00
snipe b374834999 Added extra order by switch for first_name and last_name
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:07:51 -07:00
snipe 5e4455f042 Deleted duplicate statement
Signed-off-by: snipe <snipe@snipe.net>
2023-03-16 16:07:36 -07:00
Marcus Moore f47a28f790 Actually remove unused methods 2023-03-16 15:40:16 -07:00
Marcus Moore ca677038b0 Remove unused methods 2023-03-16 15:39:02 -07:00
Marcus Moore a50ddb4a5d Improve actionlog factory and seeder 2023-03-16 15:25:23 -07:00
Marcus Moore daf6e9fa4b Seed assets with randomized locations 2023-03-16 14:23:40 -07:00
Marcus Moore 31630e3677 Seed licenses with categories 2023-03-16 13:47:02 -07:00
Marcus Moore 2f0f9586b1 Remove default category relationship from license factory 2023-03-16 13:46:30 -07:00
Marcus Moore a98cc01766 Seed users with departments 2023-03-16 13:25:35 -07:00
Marcus Moore 345946d6d4 Remove default department relationship from user factory 2023-03-16 13:25:02 -07:00
Marcus Moore 76861c0c30 Remove hard-coded manager_id in factory 2023-03-16 12:46:47 -07:00
Marcus Moore 7062b0acaa Remove hard-coded supplier_id in factories 2023-03-16 12:41:34 -07:00
Marcus Moore 0ec885bf18 Remove hard-coded fieldset_id in factories 2023-03-15 18:49:21 -07:00
Marcus Moore dfd6cf0d29 Improve factories for location relationships 2023-03-15 18:31:08 -07:00
snipe b64d7e38f2 Merge pull request #12679 from snipe/bug/sc-20451
Handle already-deleted license files more gracefully
2023-03-15 16:26:15 -07:00
Godfrey M 371e142bae removes unnecessary function 2023-03-15 15:57:45 -07:00
Marcus Moore b944945377 Remove hard-coded company_id in factories and update seeders 2023-03-15 14:12:34 -07:00
akemidx a8e2f72e25 accessory cloning, WITHOUT copying over the image. 2023-03-15 16:55:24 -04:00
snipe e9601bcf13 Handle already-deleted license files more gracefully
Signed-off-by: snipe <snipe@snipe.net>
2023-03-15 13:05:51 -07:00
snipe b89dcfbb8e Merge remote-tracking branch 'origin/develop' 2023-03-15 12:55:55 -07:00
akemidx 0909d94c8f actually added the icons haha 2023-03-15 15:07:07 -04:00
akemidx 68094b23b9 moved dell and levono icons to local machine 2023-03-15 15:02:33 -04:00
snipe fdacd5d5b5 Merge pull request #12636 from akemidx/feature/sc-20330/date-on-all-assigned-pdf
Datestamp on "Print All Assigned" generated form
2023-03-15 11:31:52 -07:00
akemidx f38f6f57ae fixed localization and formatting. simplified code to remove php snippet 2023-03-15 14:00:29 -04:00
akemidx a3353b8496 committing 2023-03-15 13:48:22 -04:00
snipe f463c02783 Merge remote-tracking branch 'origin/develop' 2023-03-14 19:56:26 -07:00
snipe 08e09a3215 Merge pull request #12675 from snipe/security/webpack_upgrade
Updated webpack
2023-03-14 19:55:42 -07:00
snipe 039a5dde7d Updated webpack
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 19:54:58 -07:00
snipe 3b3bdb6535 Merge remote-tracking branch 'origin/develop' 2023-03-14 19:03:59 -07:00
snipe 1968aebf78 Merge pull request #12674 from snipe/fixes/translation_variable_for_slack
Fixed missing variable in Slack hook test
2023-03-14 19:03:42 -07:00
snipe a0617edaf0 Fixed missing variable in Slack hook test
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 19:02:38 -07:00
snipe 723e4ebd15 Merge remote-tracking branch 'origin/develop' 2023-03-14 18:55:07 -07:00
Marcus Moore fb789eb048 Remove hard-coded depreciation_id in factories 2023-03-14 17:51:20 -07:00
snipe 4c66267f3b Merge pull request #12668 from inietov/fixes/undefined_array_key_0
Fixed ErrorException: Undefined array key 0 [sc-20424]
2023-03-14 17:10:04 -07:00
Marcus Moore f7577bff52 Merge branch 'develop' into fixes/purify-factories 2023-03-14 17:09:30 -07:00
snipe 322fd76353 Merge pull request #12664 from Godmartinz/The_final_lowercase
The final lowercase in webhooks
2023-03-14 17:09:20 -07:00
snipe c12d261fc8 Merge pull request #12673 from marcusmoore/fixes/fix-component-factory
Fixed Component factory
2023-03-14 17:05:38 -07:00
snipe a991bdd136 Merge pull request #12672 from inietov/fixes/consumable_factory_seeder
Fixed Consumable Factory Seeder
2023-03-14 17:04:33 -07:00
Marcus Moore 9cd8460e1e Add proper date format to purchase date in the component factory 2023-03-14 17:02:45 -07:00
Marcus Moore 72a61783a3 Inline two relationships in asset maintenance factory 2023-03-14 14:59:34 -07:00
snipe f0d05a7461 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop 2023-03-14 14:34:11 -07:00
snipe 88624ff2c0 Add @marcusmoore as a contributor 2023-03-14 14:34:03 -07:00
snipe f71ee699f4 Add @spencerrlongg as a contributor 2023-03-14 14:33:31 -07:00
snipe ce83d3aec1 Merge pull request #12670 from spencerrlongg/bug/sc-20437
Catch Duplicate Headers in Asset History Import
2023-03-14 14:32:34 -07:00
slong753 60b70a4074 catch and redirect back with error 2023-03-14 16:07:09 -05:00
Marcus Moore 1ff094dd47 Remove hard-coded model_id in asset factory 2023-03-14 13:56:25 -07:00
Marcus Moore ef8007a890 Remove hard-coded status_id in asset factory 2023-03-14 13:24:50 -07:00
akemidx d50a5d1880 dell and lenovo icons/links added 2023-03-14 16:04:03 -04:00
Marcus Moore a2efe3fa67 Remove hard-coded category_id in factories 2023-03-14 12:50:02 -07:00
akemidx a9782b7e00 testing links 2023-03-14 15:26:44 -04:00
Marcus Moore 4c4101fe64 Fix key name 2023-03-14 12:04:31 -07:00
akemidx 9c5ee060d3 WIP string/int error 2023-03-14 15:01:56 -04:00
Marcus Moore 7cf424b914 Remove hard-coded manufacturer_id in factories 2023-03-14 12:01:23 -07:00
Marcus Moore e8ff7cc09c Remove hard-coded user_id in factories 2023-03-14 11:34:58 -07:00
snipe dfd9fcc5e0 Merge pull request #12599 from inietov/fixes/unknown_column_0_in_field_list
Fixed Column not found: 1054 Unknown column '0' in 'field list' [sc-20004]
2023-03-14 09:51:42 -07:00
snipe b83980299a Merge pull request #12667 from snipe/fixes/small_livewire_ui_fixed
Small UI tweaks
2023-03-14 09:47:45 -07:00
snipe 5a709a83e7 Small UI tweaks
Signed-off-by: snipe <snipe@snipe.net>
2023-03-14 09:38:30 -07:00
Ivan Nieto Vivanco 66bb897ac4 Fix format to purchase date 2023-03-14 02:55:20 -06:00
Ivan Nieto Vivanco 67471a3a77 Evaluate if the collection is empty before access the array index 2023-03-13 21:44:06 -06:00
Marcus Moore adba450b40 Remove some hard-coded ids in factories 2023-03-13 17:27:06 -07:00
snipe 7acf449ed3 Merge pull request #12665 from snipe/fixes/fixed_migration_for_smaller_chunking
Removed loading and reduced chunking to 10
2023-03-13 17:23:19 -07:00
Godfrey M 955d8313b2 the final lowercase 2023-03-13 17:14:02 -07:00
snipe 1b9c3c93ad Removed loading and reduced chunking to 10
Signed-off-by: snipe <snipe@snipe.net>
2023-03-13 17:12:51 -07:00
snipe a2667a7520 Merge pull request #12663 from Godmartinz/webhook_tweaks
fixes webhook variables to lowercase
2023-03-13 16:55:32 -07:00
Marcus Moore 099ec3f550 Remove creation of category within category factory state 2023-03-13 16:45:43 -07:00
Marcus Moore 6e6a021928 Add temporary command to display model counts 2023-03-13 16:44:47 -07:00
Godfrey M 1bd37b49e9 adds translations for webhook names 2023-03-13 16:13:02 -07:00
Marcus Moore 2813b7ea58 Scaffold tests for slack notification on checkout 2023-03-13 15:47:50 -07:00
Ivan Nieto Vivanco d224f3177e Delete a rule that was breaking validation 2023-03-13 16:43:10 -06:00
Godfrey M 6474249ea8 uppercased names 2023-03-13 15:29:53 -07:00
Godfrey M 7612c5d852 lowercases variables 2023-03-13 15:26:51 -07:00
Ivan Nieto Vivanco e7b3daa80c Adjust validator to only receive valid groups id's 2023-03-13 16:10:08 -06:00
snipe 477bd27cba Merge pull request #12570 from Godmartinz/generalize_webhooks
Adds General option to the webhooks settings
2023-03-13 14:54:51 -07:00
Ivan Nieto Vivanco e4204a6dd1 Adds validator to PATCH request in the API UsersController 2023-03-13 15:49:05 -06:00
Godfrey M 11bf3f5285 aligned inputs 2023-03-13 14:06:05 -07:00
Godfrey M 576b8f8c48 adds translations to edit and index of categories 2023-03-13 13:33:03 -07:00
snipe cacb000693 Merge pull request #12660 from snipe/upgrades/bump_codacy
Bumped codacy workflow
2023-03-13 11:13:46 -07:00
snipe 4f772468e6 Bumped codacy workflow
Relates to #12657 but for develop

Signed-off-by: snipe <snipe@snipe.net>
2023-03-13 11:10:41 -07:00
Godfrey M 542332ea0c removes discord from rules 2023-03-13 10:54:18 -07:00
Godfrey M b6d105c4f4 removes help text from general integrations 2023-03-13 10:49:41 -07:00
Godfrey M 27a2ed5c79 Merge branch 'develop' into generalize_webhooks 2023-03-13 10:41:08 -07:00
snipe 8a977c66f0 Merge pull request #12659 from Godmartinz/update_notification_name
fixes alerts to notifications in notification settings
2023-03-13 09:57:43 -07:00
Godfrey M 82504c9764 updates alerts to notifications in notification settings 2023-03-13 09:51:25 -07:00
snipe 1e6a3b8c45 Add @floschoepfer as a contributor 2023-03-10 14:24:56 -08:00
snipe 785ba3b5ed Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-03-10 14:23:45 -08:00
snipe d1d89f872a Merge pull request #12638 from snipe/fixes/dashboard_category_count_with_show_archived
Fixed #12635 - dashboard category should not show archived
2023-03-10 14:19:40 -08:00
snipe 58d2e658d2 Merge pull request #12648 from floschoepfer/patch-1
Fixed #12647: fix translation and adds icon on property reassignable
2023-03-10 14:13:48 -08:00
Florian 86205bc996 fix translation and adds icon on property reassignable
Fixing #12647
2023-03-10 10:36:42 +01:00
akemidx 4533982345 added time of day 2023-03-09 15:11:07 -05:00
snipe 65c2f27644 Merge pull request #12640 from marcusmoore/fix/test-suite
Fixes unit and feature test suite
2023-03-09 11:57:39 -08:00
snipe 88eb73d160 Use Carbon’s diffForHumans() method instead of our own home-grown stuff
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:54 -08:00
snipe f4bd307421 Added comments, removed gthe AgeFormat() helper method
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:27 -08:00
snipe 059ead5af5 Added comments (not related to this, sorry)
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:47:08 -08:00
snipe 02dd0669dc Added comments
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:36:08 -08:00
snipe b3b9efbaff New helper method to return icon type
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:34:04 -08:00
snipe a6f4e53e2b Added translation strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:49 -08:00
snipe fe470b32fc Added icon and import type to header, more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:40 -08:00
snipe 474e32ea2a Added translations and formatting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:33:02 -08:00
snipe b9e4b2a0ba Added some translations, date formatting, and filesize human reporting
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 16:32:45 -08:00
Brady Wetherington 087fe19ae7 Merge branch 'livewire_importer_2_squashed_and_rebased' of github.com:uberbrady/snipe-it into livewire_importer_2_squashed_and_rebased 2023-03-08 13:57:21 -08:00
Brady Wetherington 22d7d2a04e Aliases could get selected when they weren't for an import_type 2023-03-08 13:56:29 -08:00
snipe b8887bd3e3 Translated strings
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:47:56 -08:00
snipe 65c2d75c04 Added aliases
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:47:38 -08:00
snipe dccd6fd4b1 Duplicate withCount
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:06:14 -08:00
snipe 7f8bdbd252 Added showableAssets() relationship to Category model
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 13:01:38 -08:00
snipe 00896a8615 Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 12:51:53 -08:00
Marcus Moore 44b48a954a Remove unneed section of testing docs 2023-03-08 12:15:37 -08:00
Marcus Moore 0be882dc35 Merge branch 'develop' into fix/test-suite 2023-03-08 12:13:53 -08:00
akemidx 2a4d30a748 forgot to add datestamp to title of page 2023-03-08 15:09:33 -05:00
Marcus Moore 5fb18af245 Update testing documentation 2023-03-08 11:58:36 -08:00
Marcus Moore 697824007a Move DB_CONNECTION back to .env.testing.example 2023-03-08 11:58:29 -08:00
akemidx cd9f2f7fb7 datestamp for print all assigned form generation 2023-03-08 14:56:14 -05:00
Godfrey M 15c19a7ab7 silenced Discord option and validation, more translations 2023-03-08 10:35:45 -08:00
snipe ac0b22d696 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:33:04 -08:00
snipe 1ed7cd27b4 Lots of HTML/CSS tweaks for better UI
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:32:30 -08:00
snipe e143e0c5ee Make the <tr> reflect that it’s active
Signed-off-by: snipe <snipe@snipe.net>
2023-03-08 00:32:16 -08:00
snipe 42601fecbf Merge branch 'livewire_importer_2_squashed_and_rebased' of https://github.com/uberbrady/snipe-it into uberbrady-livewire_importer_2_squashed_and_rebased 2023-03-07 21:42:32 -08:00
Brady Wetherington 7c09de3ea8 Re-introduce the 'placeholder' option for our form-helper 2023-03-07 21:38:55 -08:00
snipe 094859cfe8 Merge branch 'livewire_importer_2_squashed_and_rebased' of https://github.com/uberbrady/snipe-it into uberbrady-livewire_importer_2_squashed_and_rebased 2023-03-07 21:38:04 -08:00
Brady Wetherington 037489a6c0 If fields were already mapped, they would cause a 500 on re-mapping on import 2023-03-07 21:33:20 -08:00
snipe 5defd5ec0a Merge develop into master
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:59:17 -08:00
snipe e66b19aca0 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:44:06 -08:00
snipe fd96ff0160 Add @kenchan0130 as a contributor 2023-03-07 19:42:52 -08:00
snipe 1ccedf6426 Merge pull request #12617 from kenchan0130/patch-12249
Fixed #12249: fix csv importer for serial_number field
2023-03-07 19:42:23 -08:00
snipe 8adeee41e6 Merge pull request #12633 from snipe/bug/sc-20332
Fixed 500 when admin erroneously tries to upload a tiff as logo, cleaned up logo upload layout
2023-03-07 19:41:10 -08:00
snipe 19d19a4c42 Updated language string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 19:18:32 -08:00
snipe 383b5b43bb Added a few more jquery options for prevoew flexibility
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:54:38 -08:00
snipe 379c5f6790 Reworked the layout for logo upoloads
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:54:09 -08:00
snipe e55d02fd59 Added new string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 18:53:53 -08:00
Brady Wetherington 942bedaf06 Re-add VIP and BYOD to importer, but in Livewire 2023-03-07 18:53:32 -08:00
Brady Wetherington 09c1298e03 Merge branch 'develop' into livewire_importer_2_squashed_and_rebased
I'll be taking in the changes to the importer front-end elsewhere
2023-03-07 18:51:05 -08:00
Brady Wetherington fe699737eb Add improved field-guessing logic; make sure 'do not map' fields work 2023-03-07 18:26:59 -08:00
Marcus Moore dd9c00195b Remove old $tester variable and usused imports 2023-03-07 17:04:46 -08:00
snipe e60fa15414 Nicer layout, but it kinda dosn’t work :(
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 17:02:52 -08:00
Marcus Moore 43ff7261b2 Remove redundant base test case 2023-03-07 16:57:55 -08:00
Marcus Moore 8c13a4c5c9 Use LazilyRefreshDatabase instead of RefreshDatabase 2023-03-07 16:43:18 -08:00
Godfrey M 69944853f9 more translations 2023-03-07 15:57:58 -08:00
snipe 45b5a8b6ab Catch exception if the file can’t be handled via Intervention
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 15:56:36 -08:00
Godfrey M 35dd0d8def adds generalized webhooks, updates settings page, translations, validation 2023-03-07 15:48:21 -08:00
snipe 8b70a7f216 Merge remote-tracking branch 'origin/develop' 2023-03-07 14:00:37 -08:00
snipe 182a5ea5fc Merge pull request #12631 from snipe/bug/sc-20297/expected-checkin-email-report-link-back-error
Dynamically determine target route for expected checkin emails
2023-03-07 13:57:26 -08:00
snipe ea54f540de Dynamically determine target route for expected checkin emails
Signed-off-by: snipe <snipe@snipe.net>
2023-03-07 13:42:51 -08:00
akemidx ec5836dab4 cloning accessories first bit 2023-03-07 16:41:48 -05:00
snipe e399015427 Merge pull request #12628 from marcusmoore/fixes/keep-asset-name-on-import
Maintain asset name during import with checkout
2023-03-07 11:22:53 -08:00
Marcus Moore c80595e05c Ensure asset name is maintained when importing assets that are checked out 2023-03-07 11:09:25 -08:00
Marcus Moore 8fad377114 Remove helper methods by inlining where needed 2023-03-07 10:28:33 -08:00
Tadayuki Onishi f4675927a0 fix csv importer for serial_number filed
Signed-off-by: Tadayuki Onishi <tt.tanishi100@gmail.com>
2023-03-07 22:53:02 +09:00
Marcus Moore a3c8c3757a Remove unused method 2023-03-06 17:50:44 -08:00
Marcus Moore ddcb8d8dd9 Remove commited .env.testing file 2023-03-06 17:37:08 -08:00
Marcus Moore 245f0aff72 Ignore the correct env file 2023-03-06 17:35:49 -08:00
Marcus Moore ba92501670 Add .env.testing.example file 2023-03-06 17:34:43 -08:00
Marcus Moore 9aad981895 Update phpunit schema location and remove unneeded environment variable 2023-03-06 17:25:03 -08:00
Marcus Moore a24d734ee9 Alphabetize keys in phpunit.xml 2023-03-06 17:24:09 -08:00
snipe c7fb542dc3 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2023-03-06 17:13:29 -08:00
snipe 1ebbc767f1 Merge pull request #12624 from snipe/features/added_vip_and_byod_to_importer
Added `vip` and `byod` to importer
2023-03-06 17:11:28 -08:00
snipe a34cb8b862 Check for boolean on requestable
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 17:11:08 -08:00
snipe d36b4c1bd3 Merge remote-tracking branch 'origin/develop' 2023-03-06 17:04:15 -08:00
Marcus Moore d27fe7d4b9 Merge branch 'develop' into fix/test-suite 2023-03-06 17:04:00 -08:00
snipe d55393a3d9 Merge pull request #12626 from marcusmoore/fixes/checkouts-in-seeders
Fix seeder so assets are checked out to users
2023-03-06 17:01:47 -08:00
Marcus Moore ef27c35d1d Update array keys to set asset location properly 2023-03-06 16:33:40 -08:00
snipe 0d3388b3ae Merge pull request #12623 from snipe/bug/sc-20254/errorexception-filesize-stat-failed-for-snipe
Check that the file exists before trying to stat it for filesize
2023-03-06 15:43:17 -08:00
snipe fffe5da2e0 Merge pull request #12625 from uberbrady/quiet_down_scim_exceptions
Suppress SCIMExceptions from cluttering up Rollbar
2023-03-06 15:42:58 -08:00
Brady Wetherington dd3c3a1428 Suppress SCIMExceptions from cluttering up Rollbar 2023-03-06 15:24:16 -08:00
snipe 16bd2cde0f Updated string for file not found
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:45 -08:00
snipe e1069ac234 Return a file not found error if it doesn’t appear on disk
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:37 -08:00
snipe 8b6e8898c1 Fixed hardcoded string
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:09:12 -08:00
snipe 2cb06165c4 Added missing vip field to transformer and request
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 15:00:04 -08:00
snipe b46c455e0a Updated mappings.md with byod and vip fields
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:34 -08:00
snipe 304ccaa30e Added byod to asset importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:24 -08:00
snipe f672bdd3b7 Added vip to user importer
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:14 -08:00
snipe eec5163e7f Updated vue assets
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:28:04 -08:00
snipe f460d881da Updated vue
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:27:53 -08:00
snipe 27a495223d Updated sample CSVs
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 14:27:45 -08:00
Marcus Moore bc54144284 Fix test by passing proper user 2023-03-06 12:40:47 -08:00
snipe cc7325074e Check that the file exists before trying to stat it for filesize
Signed-off-by: snipe <snipe@snipe.net>
2023-03-06 10:47:28 -08:00
snipe 04ff472428 Merge remote-tracking branch 'origin/develop' 2023-03-06 10:29:07 -08:00
snipe 3a1cf26e98 Merge pull request #12621 from Godmartinz/bug/sc-20259/divisionbyzeroerror-division-by-zero-in-snipe
Fixes depreciation model rule for months
2023-03-06 10:28:39 -08:00
Godfrey M e5deb4b413 doesn't allow months to be zero 2023-03-06 09:41:14 -08:00
snipe f54d83ed59 Merge pull request #12612 from manuteleco/add_path_in_preflight_url_message
Fixed #11800: Include path in the expected URL during Pre-Flight
2023-03-06 09:36:15 -08:00
snipe 39193a71b7 Merge pull request #12611 from manuteleco/add_reverse_proxy_support_in_preflight
Fixed #10779: Add Reverse Proxy support to Pre-Flight URL check
2023-03-06 09:35:34 -08:00
snipe 83b906b153 Merge remote-tracking branch 'origin/develop' 2023-03-06 09:27:43 -08:00
snipe 191f955333 Merge pull request #12610 from veenone/feat/sortable_group_id
enable sortable for ID column
2023-03-06 09:26:52 -08:00
Manuel Rodríguez Guimeráns 548ae7ad22 Add Reverse Proxy support to Pre-Flight URL check
Before this change, the Pre-Flight URL check would inevitably fail
whenever Snipe-IT was running behind a reverse proxy or load balancer.

The URL check tries to ensure that the configured application URL
matches the URL that is actually used to reach the application. However,
when running behind an HTTP intermediary (like a reverse proxy or a load
balancer) the HTTP connection that Snipe-IT receives is not the _real_
connection from the user anymore, but a connection from the HTTP
intermediary. The scheme, host and port that Snipe-IT would obtain from
that incoming intermediary connection wouldn't match what is configured
as application URL and, therefore, the URL check would fail.

This commit solves the situation by making Snipe-IT's Pre-Flight URL
check aware of the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP
headers. These headers represent the _de-facto_ standard used by reverse
proxies and other HTTP intermediary components to convey information
about the incoming HTTP connection to the upstream application. Being
the upstream application, Snipe-IT can then make use of this information
to correctly evaluate the validity of the configured application URL.
2023-03-05 18:15:16 +01:00
Manuel Rodríguez Guimeráns 1d4f4b92de Include path in the expected URL during Pre-Flight
So that the message displayed to the user when the URL Pre-Flight check
fails is:

> Snipe-IT thinks your URL is SCHEME://DOMAIN, but your real
  URL is SCHEME://DOMAIN/setup

instead of:

> Snipe-IT thinks your URL is SCHEME://DOMAIN/setup, but your real
  URL is SCHEME://DOMAIN/setup

Having a missing "/setup" in the expected URL might confuse the user
into thinking that it is an additional configuration problem they need
to fix.

With this change, the comparison between the expected and actual URL
will not contain any accidental difference anymore. Only those that the
user really needs to be aware of and fix in their setup.
2023-03-05 17:52:45 +01:00
Achmad Fienan Rahardianto 0b3becee7a enable sortable for ID column 2023-03-04 11:27:00 +07:00
Ivan Nieto Vivanco 95f568b934 Remove unnecessary try/catch 2023-03-02 19:50:47 -06:00
snipe 95bd58487a Merge pull request #12602 from inietov/fixes/error_checkin_license_seat
Fixed #12601 Error checkin license seats
2023-03-02 17:48:22 -08:00
Ivan Nieto Vivanco 8a5d426ccd Use correct LicenseSeat property 2023-03-02 19:33:32 -06:00
Marcus Moore e8da6d8bac Set purchase date in correct format 2023-03-02 13:47:58 -08:00
Marcus Moore ad9eef6393 Update deprecated faker calls in Asset and Supplier factories 2023-03-02 13:41:52 -08:00
Marcus Moore c3cc20fe0c Merge branch 'develop' into fix/test-suite 2023-03-02 13:23:00 -08:00
snipe f817027fc2 Merge pull request #12593 from snipe/features/add_clone_to_locations
Added ability to clone location
2023-03-02 13:15:38 -08:00
Marcus Moore 45d7e9b134 Switch to using LazilyRefreshDatabase in unit test suite 2023-03-02 13:13:30 -08:00
Marcus Moore 75fc624ec6 Globally disable SecurityHeaders in tests 2023-03-02 13:12:25 -08:00
Ivan Nieto Vivanco e0b2dc043a Adds try/catch to users API 2023-03-02 11:13:56 -06:00
Brady Wetherington 7edec26e73 Fixes to layout, improvements to import types, better icons for processing. 2023-03-01 17:18:36 -08:00
Godfrey M aae178a606 gets select working, placeholders update dynamically 2023-03-01 17:10:10 -08:00
snipe 778787db3c Rip out jquery for location parent
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 15:36:01 -08:00
snipe b8231f420b Remove name from blanking paroperties
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:12:33 -08:00
snipe 9b522006f3 Usew route group for locations
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:05:53 -08:00
snipe 84a14918bb Updated comments
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:03:33 -08:00
snipe 473553c464 Moved gate
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 14:01:40 -08:00
snipe dac877f184 Added location clone
Signed-off-by: snipe <snipe@snipe.net>
2023-03-01 13:51:35 -08:00
Godfrey M 354f04534e add multi array, migration, still having issues 2023-03-01 12:30:32 -08:00
snipe ca2619ca12 Merge remote-tracking branch 'origin/develop' 2023-03-01 12:28:34 -08:00
snipe 78b36c7886 Merge pull request #12592 from uberbrady/fix_accessories_report
The 'download activity report' displayed the wrong value for 'admin' (fixes FD-33368)
2023-03-01 12:28:03 -08:00
Brady Wetherington ca849db316 The 'download activity report' displayed the wrong value for 'admin' 2023-03-01 12:23:13 -08:00
snipe 816d2f99cc Merge remote-tracking branch 'origin/develop' 2023-03-01 11:52:29 -08:00
snipe c1b57064d4 Merge pull request #12591 from uberbrady/accessories_report_companies
Actually display name of company in Accessories Report
2023-03-01 11:52:10 -08:00
Brady Wetherington 9b80e86306 Actually display name of company in Accessories Report 2023-03-01 11:34:30 -08:00
snipe d954c841e6 Merge pull request #12590 from snipe/fixes/check_for_array_in_linux_setup
Fixes/check for array in linux setup
2023-03-01 11:06:31 -08:00
snipe 562546a853 Updated comment
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:37:30 -08:00
snipe 4860440306 Check that it’s an array (versus checking that it’s not a bool)
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:32:10 -08:00
snipe b72a9cc6fd Check if the $owner is boolean
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:31:26 -08:00
snipe 823203641d Updated assets with new font awesome
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:18:58 -08:00
snipe b2fe3c36e9 Merge pull request #12589 from snipe/security/update_font_awesome_to_6_3_0
Updated font-awesome to ^6.3.0
2023-02-28 23:16:54 -08:00
snipe 1911480d3a Updated font-awesome to ^6.3.0
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 23:15:50 -08:00
Brady Wetherington c48e19d236 Whoops, went a little overboard there. Whoopsie! 2023-02-28 22:51:48 -08:00
Brady Wetherington 863b30a07a Remove extraneous change to composer.json 2023-02-28 22:49:48 -08:00
Brady Wetherington f3c500014c Another file I didn't really need to commit 2023-02-28 22:37:16 -08:00
Brady Wetherington 4f8710db63 Whoops, mis-committed something here that doesn't belong 2023-02-28 22:36:26 -08:00
Brady Wetherington 54cb38603b Cleaned up the last of the FIXME's (or downgraded them to TODO's) 2023-02-28 22:34:44 -08:00
Brady Wetherington 5cf66851f7 Finalizing the Livewire Importer! Just going to do some testing now 2023-02-28 21:58:02 -08:00
snipe a6816c5e15 Merge remote-tracking branch 'origin/develop' 2023-02-28 20:53:32 -08:00
snipe 463ef02fae Merge pull request #12578 from inietov/fixes/undefined_variable_total
Fixed Undefined variable `$total`
2023-02-28 20:50:00 -08:00
snipe b29276579f Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:34:31 -08:00
snipe dbe0a3352b Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2023-02-28 20:34:20 -08:00
snipe 6fec3f4303 Merge pull request #12586 from snipe/assets/compiled_dev_assets
Compiled dev assets
2023-02-28 20:32:41 -08:00
snipe f9b5a67dc2 Compiled dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:32:08 -08:00
snipe 2189a74d6a Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 20:32:00 -08:00
snipe 44e2796645 Merge pull request #12579 from Godmartinz/gh12571_sidebar_adjustment
Fixes the sidebar margin top
2023-02-28 20:30:07 -08:00
snipe 70d0347fe9 Merge pull request #12580 from marcusmoore/feature/crowdin-source-upload
Add GitHub Action to push translation sources to Crowdin
2023-02-28 20:28:04 -08:00
Brady Wetherington 2f94bf96ff Everything's all wired up; just need to clean up all the FIXME's and stuff 2023-02-28 18:36:52 -08:00
snipe 417a1e624a Merge remote-tracking branch 'origin/develop' 2023-02-28 18:22:24 -08:00
snipe 34f13eaa8a Merge pull request #12393 from snipe/features/make_eol_sortable
Added EOL as de-normed and sortable on assets
2023-02-28 18:22:00 -08:00
snipe 1f7ae08d76 Merge branch 'develop' into features/make_eol_sortable 2023-02-28 18:05:09 -08:00
snipe 3a4e20ae82 Merge remote-tracking branch 'origin/develop' 2023-02-28 16:57:59 -08:00
snipe 2ab0abc8a1 Merge pull request #12575 from inietov/fixes/typeError_get_class_argument_must_be_object_null_given
Fixed: TypeError: get_class(): Argument #1 ($object) must be of type object, null given
2023-02-28 16:45:53 -08:00
snipe 373aeb26da Merge remote-tracking branch 'origin/develop' 2023-02-28 16:14:42 -08:00
snipe d838662f48 Merge pull request #12585 from marcusmoore/fixes/fix-license-seeder
Fix license seeder
2023-02-28 16:03:15 -08:00
snipe ff122bd07c Merge remote-tracking branch 'origin/develop' 2023-02-28 15:56:35 -08:00
snipe 5e626e75ad Merge pull request #12584 from snipe/fixes/error_on_datepicker
Convert string to date object for formatting
2023-02-28 15:55:59 -08:00
Marcus Moore a7a26bb154 Fix License Factory 2023-02-28 15:55:28 -08:00
snipe af9f9d2523 Convert string to date object for formatting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-28 15:48:45 -08:00
snipe d13e1b32e7 Merge pull request #12583 from inietov/fixes/user_start_and_end_date_error
Fixed User start and end date throws error [sc-20228]
2023-02-28 15:30:46 -08:00
Ivan Nieto Vivanco ad598425ef Adds format to the dates cast 2023-02-28 17:24:14 -06:00
snipe ec2ce1dff8 Merge remote-tracking branch 'origin/develop' 2023-02-28 15:13:22 -08:00
snipe 5194711a6a Merge pull request #12582 from akemidx/bug/sc-20065/license-export-does-not-show-info-of-boolean 2023-02-28 15:13:04 -08:00
Marcus Moore 4197e613b2 Fix License Factory 2023-02-28 14:50:48 -08:00
akemidx 25f3e4d41a Adding ability to see boolean values when using normal export 2023-02-28 16:01:23 -05:00
Marcus Moore 589a5d0d8b Merge branch 'develop' into fix/test-suite 2023-02-28 09:48:48 -08:00
Godfrey M e8fbb0608f adjusts the sidebar margin top 2023-02-28 09:30:02 -08:00
Marcus Moore d707f2d391 Add GitHub Action to push translation sources to Crowdin 2023-02-28 09:07:34 -08:00
Ivan Nieto Vivanco 1be0a8d911 Declare variable as an empty array 2023-02-28 10:22:49 -06:00
Ivan Nieto Vivanco 0d860c0b72 Check if target is not null to retrieve the proper data 2023-02-27 19:01:37 -06:00
Ivan Nieto Vivanco 9d94bd6567 Validate if the license seat is not checked out, it can't be checked in 2023-02-27 18:57:38 -06:00
snipe ae35af55d1 Merge remote-tracking branch 'origin/develop' 2023-02-27 15:55:58 -08:00
snipe 23fe11c71e Merge pull request #12574 from inietov/fixes/address_in_mailbox_not_comply_rfc
Fixed Address in mailbox given does not comply with RFC 2822, 3.6.2. [sc-202022]
2023-02-27 15:55:31 -08:00
Ivan Nieto Vivanco b4e578c95e Convert the alert_email setting from string to array 2023-02-27 17:34:29 -06:00
Brady Wetherington 53db266b69 WIP: cleaning up extraneous gunk and trying to standardize on one single Livewire Select2 implementation 2023-02-27 14:29:02 -08:00
Brady Wetherington fb201e61f3 More wiring up Livewire to the back-end. 2023-02-27 14:29:02 -08:00
Brady Wetherington e1c8f155bb Wiring up more bits to Livewire 2023-02-27 14:29:02 -08:00
Brady Wetherington 5c97e45d00 WIP - trying to get select2 wired up for importer 2023-02-27 14:29:02 -08:00
Brady Wetherington 8009ee79db I think I have, now, full parity on the base Importer level
Meaning that you can upload new files, delete old files, have error
messages, have status updates - and all of them seem to work.
2023-02-27 14:29:02 -08:00
Brady Wetherington 0a085af0a0 Getting the basic wiring of the importer over into Livewire
WIP: Wiring up more and more of the actions on the importer

Files now upload okay, a little glitchy on the display-side though

add to readmes so i dont forget
2023-02-27 14:28:59 -08:00
snipe c2cdf5dae1 Merge remote-tracking branch 'origin/develop' 2023-02-27 13:34:16 -08:00
snipe 23ca124e94 Merge pull request #12573 from snipe/fixes/ambiguous_model_clause
Added table aliases to fix ambiguous SQL clause
2023-02-27 13:33:52 -08:00
snipe c7106a1df2 Added table aliases to fix ambiguous SQL clause
Signed-off-by: snipe <snipe@snipe.net>
2023-02-27 13:24:09 -08:00
snipe 3f4a4e72a7 Merge remote-tracking branch 'origin/develop' 2023-02-27 12:17:33 -08:00
snipe b78aba787f Merge pull request #12572 from snipe/fixes/add_max_results_limit_to_acitivity_report
Added max results limit to report index
2023-02-27 12:16:57 -08:00
snipe 96c851468c Added max results limit to report index
Signed-off-by: snipe <snipe@snipe.net>
2023-02-27 12:04:46 -08:00
Godfrey M e8fc895e51 "adds variables, but still not working" 2023-02-27 09:19:59 -08:00
snipe a5ccef5e96 Merge pull request #12564 from uberbrady/upgrade_acorn
Upgrade Acorn
2023-02-26 12:12:21 -08:00
Brady Wetherington 059190f002 Upgrade Acorn 2023-02-26 11:29:10 -08:00
snipe 6428cc259f Merge remote-tracking branch 'origin/develop' 2023-02-24 10:02:43 -08:00
snipe cb0b234b80 Merge pull request #12561 from inietov/fixes/unable_to_import_purchase_date
Fixed #12559 Unable to import Purchase Date field
2023-02-24 10:02:25 -08:00
snipe 8caf29975f Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-02-24 09:58:19 -08:00
snipe 95501bf57c Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-02-24 09:57:25 -08:00
snipe 75a73d095f Merge pull request #12560 from snipe/fixes/bulk_checkout_nulles_asset_name
Pass the existing asset name to the bulk checkout form
2023-02-24 09:56:13 -08:00
snipe 3e47d9e689 Pass the existing asset name to the bulk checkout form
Signed-off-by: snipe <snipe@snipe.net>
2023-02-24 09:54:46 -08:00
Ivan Nieto Vivanco 51efd9b413 Adjust the date format for purchase_date field 2023-02-24 10:59:31 -06:00
snipe bd0b00e361 Merge pull request #12558 from inietov/fixes/non_numeric_value_in_license_seat
Fixed ErrorException: A non-numeric value encountered in app/Models/License [sc-20187]
2023-02-24 00:29:26 -08:00
Ivan Nieto Vivanco 6bd72125bd Deletes problematic cast 2023-02-23 22:31:41 -06:00
snipe 1415c8c6e2 Merge remote-tracking branch 'origin/develop' 2023-02-23 15:00:03 -08:00
snipe 41253b2680 Merge pull request #12556 from marcusmoore/fixes/asset-seeder
Fix purchase date field in asset seeder
2023-02-23 14:05:45 -08:00
Marcus Moore bdac0f16ce Set purchase date field to the correct format in asset factory 2023-02-23 13:39:05 -08:00
snipe dde2b946da Merge pull request #12555 from snipe/security/upgrade_dompdf
Update dompdf
2023-02-23 13:00:46 -08:00
snipe 0b408218b0 Update dompdf
Signed-off-by: snipe <snipe@snipe.net>
2023-02-23 12:59:04 -08:00
snipe 5e6ebb9a65 Merge pull request #12410 from uberbrady/paginate_accessories_report
Paginate accessories report
2023-02-23 12:26:17 -08:00
snipe 8e72da42e8 Merge pull request #12406 from akemidx/vip_tag
Added a checkbox to notate VIP status
2023-02-23 12:23:29 -08:00
snipe 309c0ff66f Merge remote-tracking branch 'origin/develop' 2023-02-23 11:41:36 -08:00
snipe eb6357636a Merge pull request #12467 from marcusmoore/fix/scope-people-with-full-multiple-companies
Fix full company scoping in user selects
2023-02-23 10:36:33 -08:00
snipe adb166fb8d Merge remote-tracking branch 'origin/develop' 2023-02-22 18:01:06 -08:00
snipe 4a9ced192b Merge pull request #12550 from marcusmoore/fixes/closing-tag-in-mail-template
Properly close tag in mail template
2023-02-22 17:59:20 -08:00
Marcus Moore 6c8de181cf Properly close tag in mail template 2023-02-22 17:52:47 -08:00
snipe 5a1e5f740d Merge pull request #12537 from inietov/fixes/expected_checkin_date_validation
Fixed #12531 Expected Checkin Date on Asset Checkout throws an error
2023-02-22 16:03:51 -08:00
akemidx 690970b4aa fixing ff error 2023-02-22 18:18:20 -05:00
Marcus Moore f63710fb5c Remove unused import 2023-02-22 12:34:56 -08:00
Marcus Moore 7667b0a216 Remove extra line 2023-02-22 12:34:35 -08:00
Marcus Moore 931ca98c02 Remove middleware bypass 2023-02-22 12:33:55 -08:00
snipe 225b6ef310 Merge remote-tracking branch 'origin/develop' 2023-02-22 12:24:52 -08:00
snipe 13ed2a05a3 Add @AndrewSav as a contributor 2023-02-22 12:24:13 -08:00
Marcus Moore aae2106658 Use existing language translation string 2023-02-22 12:02:14 -08:00
snipe 81cb29db5e Merge pull request #12509 from inietov/fixes/add_images_to_user_inventory_mail_report
Added images to emailed user inventory report [sc-19801]
2023-02-22 10:38:07 -08:00
snipe 05f6d0bd5e Merge pull request #11984 from nh314/Correct-assignedusers-relation
Correct assignedusers relation setting
2023-02-21 20:15:20 -08:00
snipe 4bf1566d2a Merge pull request #12124 from Godmartinz/feature/sc-16946/add-checkbox-to-allow-skipping-a-user-during
Adds Boolean to Users Table for Auto Assigning Licenses
2023-02-21 20:10:46 -08:00
snipe 0c3115553e Merge branch 'develop' into vip_tag 2023-02-21 20:03:49 -08:00
snipe 942fee4d43 Merge pull request #12447 from akemidx/user_setup_translation
FIXED: Translations on the User Creation setup page
2023-02-21 19:53:00 -08:00
snipe ba461d0114 Merge pull request #12538 from AndrewSav/develop
Added #12532: add version endpoint
2023-02-21 19:50:07 -08:00
snipe 3ae783a9c7 Merge pull request #12525 from uberbrady/add_sodium_php_shim
Add libsodium shim, and mark the sodium extension as 'optional'
2023-02-21 19:38:14 -08:00
Ivan Nieto Vivanco d494afcf01 Add order by clause, to ensure assets and accessories are in order in the report 2023-02-21 21:24:19 -06:00
snipe 57065b8936 Merge remote-tracking branch 'origin/develop' 2023-02-21 09:20:59 -08:00
snipe 40a38486b9 Merge pull request #12545 from snipe/localizations/more_new_translations
Two more translations
2023-02-21 09:20:38 -08:00
snipe 29158dece5 Two more translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:19:34 -08:00
snipe f6e4e17e5c Merge remote-tracking branch 'origin/develop' 2023-02-21 09:05:50 -08:00
snipe 8185f264a4 Merge pull request #12544 from snipe/localizations/updated_general
Updated the general translation file with new strings
2023-02-21 09:05:24 -08:00
snipe 04d3938f0c Updated the general translation file with new strings
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:04:13 -08:00
snipe f109218e16 Re-added dropped translations from CrowdIn
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 09:00:10 -08:00
snipe 049213c3da Merge remote-tracking branch 'origin/develop' 2023-02-21 04:02:08 -08:00
snipe 9c1a71e04a Merge pull request #12541 from snipe/localizations/new_strings
Updated translations with new strings and new translations
2023-02-21 03:58:25 -08:00
snipe a0b05bac8d Updated translations with new strings and new translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-21 03:54:55 -08:00
Andrew Savinykh d2ede75de8 fixes #12532 adds version endpoint 2023-02-20 22:19:18 +13:00
Ivan Nieto Vivanco 6e994c209f Adds setter to model Asset class for expected checkin 2023-02-19 12:31:10 -06:00
akemidx f33b6a3e26 Update user.blade.php 2023-02-17 12:52:54 -05:00
akemidx dfc2aa35f4 Update general.php 2023-02-17 12:51:58 -05:00
snipe f71d8b2f07 Merge remote-tracking branch 'origin/develop' 2023-02-16 17:05:48 -08:00
snipe 248eb0885c Merge pull request #12533 from snipe/fixes/expected_checkin_wtf
FML - this is a hotfix and I don’t know why this is causing problems
2023-02-16 17:01:54 -08:00
snipe 754842f620 FML - this is a hotfix and I don’t know why this is causing problems
Signed-off-by: snipe <snipe@snipe.net>
2023-02-16 16:58:00 -08:00
snipe 43eacff265 Merge remote-tracking branch 'origin/develop' 2023-02-16 12:11:26 -08:00
snipe fdffe76b9f Merge pull request #12529 from Godmartinz/bug/sc-20046/allow-user-to-submit-the-slack-livewire-form
allows users to clear their slack settings
2023-02-16 11:47:58 -08:00
Godfrey M 58801dbb0b allows users to clear their slack settings 2023-02-16 08:43:12 -08:00
snipe e9ab90eafc Merge pull request #12422 from marcusmoore/fix/adhere-to-email-alerts-setting
Have acceptance result notifications adhere to alerts enabled setting
2023-02-15 18:46:08 -08:00
snipe 495d7e057d Merge remote-tracking branch 'origin/develop' 2023-02-15 18:37:39 -08:00
snipe 9f8ea9a243 Merge pull request #12524 from snipe/fixes/small_UI_tweaks
Cleanup some small UI bugaboos (padding, etc)
2023-02-15 18:20:08 -08:00
Brady Wetherington 3a2b54fd47 Add libsodium shim, and mark the sodium extension as 'optional'
Trying to handle some composer.lock conflicts, as savely as possible.
2023-02-15 18:16:39 -08:00
snipe 71334b5eae More tweaking for top button alignment
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 18:13:38 -08:00
snipe f124249e1c More padding twiddles
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 18:08:11 -08:00
snipe e451ca1a5c Stray semicolon
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 17:37:53 -08:00
snipe 3e111fca6e Cleanup some small UI bugaboos (padding, etc)
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 17:13:40 -08:00
snipe df64e0e291 Merge pull request #12523 from Godmartinz/bug/sc-20041/slack-ui-livewire-tweaks
Fixes slack settings submit button availability
2023-02-15 16:28:57 -08:00
snipe 51c9a7d4f8 Merge pull request #12521 from akemidx/weird_checkout_text
Fixed awkward checkout text in checkedout side panel
2023-02-15 16:28:05 -08:00
akemidx d8d713426d indent? 2023-02-15 19:24:20 -05:00
akemidx 7dd789d5c0 translate no assets at checkout 2023-02-15 19:22:13 -05:00
Godfrey M 2d8c8e8f48 removes lazy loading 2023-02-15 16:16:14 -08:00
Godfrey M 7b510d5f2b greys out submit button conditionally 2023-02-15 15:46:05 -08:00
snipe 221f5f5ca7 Merge pull request #12522 from snipe/fixes/slack_livewire_translations
Fixes slack livewire translations, UI
2023-02-15 14:45:46 -08:00
snipe d4634e83c9 Nicer padding, removed unused ids
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:45:18 -08:00
snipe 6c3ffa7918 Removed unused CSS
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:39:24 -08:00
snipe 27e5832a28 Use existing slack translations
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:06:52 -08:00
snipe 2d0bd2b292 Make spinner actually spin
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 14:06:40 -08:00
akemidx b96f2f738d fixed weird phrasing in asset checkout screen 2023-02-15 16:47:48 -05:00
snipe ff895739f4 Merge pull request #12446 from Godmartinz/livewire_slack_inputs
Adds Livewire slack inputs
2023-02-15 13:27:07 -08:00
snipe de4f7bd274 Merge pull request #12408 from snipe/fixes/stricter_date_rectrictions_on_validation
Enforce Y-m-d as date format for date fields
2023-02-15 12:54:22 -08:00
snipe 25461caa2c Removed date validation rule
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 12:53:55 -08:00
snipe bfac0fc811 Merge pull request #12470 from inietov/fixes/rollbar_16883_attempt_assign_on_null
Fixed Rollbar 16883 Error: Attempt to assign property "assigned_to" on null
2023-02-15 12:33:32 -08:00
snipe 057f0be20a Merge pull request #12473 from inietov/fixes/rollbar_attempt_to_read_property_on_null
Fixed ErrorException:  Attempt to read property "id" on null [sc-19855]
2023-02-15 12:32:53 -08:00
snipe 7980e2ab2e Merge pull request #12517 from uberbrady/silence_ldap_exceptions
Silence E_WARNING "exceptions"
2023-02-15 11:56:37 -08:00
Marcus Moore f99f6d32fa Make phpstan configuration more flexible 2023-02-15 11:33:08 -08:00
Marcus Moore d088b39fb2 Remove ignore errors section covered by larastan config 2023-02-15 11:33:08 -08:00
Marcus Moore 6bfd2fd5ad Sort paths 2023-02-15 11:33:08 -08:00
Marcus Moore 6778cf79a0 Include Larastan configuration file 2023-02-15 11:33:08 -08:00
snipe ac4103281c Still throwing errors, but trying to fix the docblock
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 03af417e89 We shouldn’t need this because aliases??
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 77362b3b41 Added larastan and psalm to composer dev
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe db8c29b901 Psalm and phpstan configs
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 3d219f578e The sea, Brady.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 8c3511a00b Fixed wonky switch statement indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe c1ae406049 Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 1ef3112628 FIxed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 0325cbad64 Removed unused else condition
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 6dc89fc2b0 Use null coalescing operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe b25676c96b Fixed Implicit array creation is disallowed.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 14e95c47e1 Made constant DATA_SESSION_KEY public
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe dc43c4f68a Removed unneeded concat
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 0e7ac5c95e Added phpinsights
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe c7f90f304d Added insights config
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 78a0b06a61 Fixed array bracket indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 40f487beae Added parens
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 2992ca1fa2 Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 15f9c6af67 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
snipe 7a19da4f64 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-15 11:33:08 -08:00
Ivan Nieto Vivanco 07f501408f Add migration to fix already escaped formats in the database 2023-02-15 11:33:08 -08:00
Ivan Nieto Vivanco 53e449899b Remove e() function from customfield format input 2023-02-15 11:33:08 -08:00
Godfrey M b2f1ca95df missing things like mr magoo 2023-02-15 11:33:08 -08:00
Godfrey M f3ab384e70 simplified to an else instead of elseif 2023-02-15 11:33:08 -08:00
Godfrey M 61bf1e91e7 adds the red x icon to a false deployable status 2023-02-15 11:33:08 -08:00
Godfrey M 1c54feea5b adds a red icon next to broken- not fixable status label 2023-02-15 11:33:08 -08:00
Marcus Moore 7423570e6b Add comment 2023-02-15 11:33:08 -08:00
Marcus Moore b946a6066d Use name if provided by asset checkout request 2023-02-15 11:33:07 -08:00
Marcus Moore 9c25dd4eb6 Improve error message wording 2023-02-15 11:33:07 -08:00
Marcus Moore e69fcf10b7 Use translation strings for importer exceptions 2023-02-15 11:33:07 -08:00
akemidx 937e2813e9 fixing external if statement 2023-02-15 11:33:07 -08:00
akemidx a84081068d functionality to Apple Warranty link 2023-02-15 11:33:07 -08:00
akemidx d9857d955b translations for the layout setup 2023-02-15 11:33:07 -08:00
akemidx 66251bfd8a sweedish chef fixes up your typos 2023-02-15 11:33:07 -08:00
akemidx 677f7a446e manufacturer marker removal 2023-02-15 11:33:07 -08:00
Marcus Moore fdce6f98ff Return 422 instead of 500 when import is invalid 2023-02-15 11:33:07 -08:00
Marcus Moore 5a00685c81 Fix return type 2023-02-15 11:33:07 -08:00
Marcus Moore 18f0b1cc3d Formatting 2023-02-15 11:33:07 -08:00
Marcus Moore 6da43bc940 Catch json encoding exceptions and display them to the user 2023-02-15 11:33:07 -08:00
Ivan Nieto Vivanco 98187773f7 Adds translation strings to theinventory report sent to users 2023-02-15 11:33:07 -08:00
Brady Wetherington 3757c7e353 Make early-boot errors (syntax, others) be more easy-to-read 2023-02-15 11:31:13 -08:00
snipe 3800cdd0da Merge pull request #12466 from snipe/fixes/style_fixes
Style fixes
2023-02-15 11:07:59 -08:00
snipe 1ed57d30e0 Merge pull request #12516 from inietov/fixes/quotes_in_custom_field_custom_regex
Fixed #12252 Quotes in Custom Field regex are being HTML-escaped
2023-02-14 20:10:43 -08:00
Brady Wetherington a1b0eaf128 Got working E_WARNING-in-production going. YAY! 2023-02-14 20:00:06 -08:00
snipe f7df2ae403 Merge pull request #12513 from Godmartinz/gh12493
adds a red icon next to the  undeployable status
2023-02-14 14:37:06 -08:00
Godfrey M 793cf4823b missing things like mr magoo 2023-02-14 14:35:54 -08:00
Godfrey M c0d8ff1676 simplified to an else instead of elseif 2023-02-14 14:21:24 -08:00
snipe b0b1c96ab5 Merge pull request #12514 from marcusmoore/fixes/preserve-asset-name-during-api-checkout
Fix asset names being removed during API checkout requests
2023-02-14 12:22:03 -08:00
Marcus Moore 8e00191b69 Add comment 2023-02-14 12:19:16 -08:00
Marcus Moore a94f19a68e Use name if provided by asset checkout request 2023-02-14 12:08:20 -08:00
Godfrey M 0cd558593d adds the red x icon to a false deployable status 2023-02-14 10:34:36 -08:00
Godfrey M d03e042eda adds a red icon next to broken- not fixable status label 2023-02-14 09:55:48 -08:00
Marcus Moore 8b183490ba Use "testing" environment for tests 2023-02-13 18:56:22 -08:00
Marcus Moore 228c59e6ed Bring phpunit.xml closer to default 2023-02-13 18:55:50 -08:00
snipe 2dd7690d2d Merge pull request #12464 from snipe/dependabot/github_actions/docker/build-push-action-4
Bump docker/build-push-action from 3 to 4
2023-02-13 14:45:21 -08:00
snipe 1520c9c6a7 Merge pull request #12506 from marcusmoore/fix/use-translation-strings-for-importer-errors
Use translation strings for importer exceptions
2023-02-13 14:17:47 -08:00
Marcus Moore 4bdb1cf552 Improve error message wording 2023-02-13 13:34:20 -08:00
Marcus Moore 2349f54013 Use translation strings for importer exceptions 2023-02-13 13:30:36 -08:00
snipe 2bbbc8158b Merge pull request #12477 from akemidx/apple_warranty_link
Added functionality to Apple Warranty link
2023-02-13 13:02:33 -08:00
snipe 2f5b4c8e1b Merge pull request #12498 from akemidx/layout_trans
Translations for the layout setup
2023-02-13 13:01:58 -08:00
Ivan Nieto Vivanco 99122ccb50 Add migration to fix already escaped formats in the database 2023-02-12 17:40:04 -06:00
Ivan Nieto Vivanco 6936efd387 Remove e() function from customfield format input 2023-02-12 16:27:37 -06:00
Ivan Nieto Vivanco f0bf16d784 Fix more uneven tags 2023-02-12 12:01:40 -06:00
Ivan Nieto Vivanco 9a68a747a0 Fix uneven tags 2023-02-12 11:59:56 -06:00
Ivan Nieto Vivanco 81cc9f3700 Adds images to emailed user inventory report 2023-02-12 08:23:50 -06:00
akemidx 5714824aa7 translations for the layout setup 2023-02-09 17:24:34 -05:00
snipe e79818967d Merge pull request #12490 from akemidx/manufacturer_marker
Removed "required" marker for manufacturer on asset models (since it is not actually required)
2023-02-09 12:43:14 -08:00
akemidx 32ed70259e sweedish chef fixes up your typos 2023-02-09 15:39:10 -05:00
snipe 35ab4a4cce Merge pull request #12489 from marcusmoore/fix/encoding-errors-in-importer
Improve error messaging around invalid characters in import
2023-02-08 15:08:23 -08:00
akemidx 1a651b33fc manufacturer marker removal 2023-02-08 17:31:39 -05:00
Marcus Moore 73f355f3a8 Return 422 instead of 500 when import is invalid 2023-02-08 12:39:42 -08:00
Marcus Moore b3881a43a7 Fix return type 2023-02-08 12:34:25 -08:00
Marcus Moore c2c666aef0 Formatting 2023-02-08 12:32:57 -08:00
Marcus Moore 5962f1b627 Catch json encoding exceptions and display them to the user 2023-02-08 12:21:51 -08:00
snipe a4a3c03a7c Merge pull request #12478 from inietov/fixes/added_translation_strings_inventory_report
Fixed #12064 Mail-Template missing translation strings
2023-02-08 10:02:19 -08:00
snipe 201728989f Merge pull request #12486 from svpernova09/patch-1
Don't auto assign feature requests to Snipe
2023-02-08 07:59:58 -08:00
Joe Ferguson dea175bd40 Don't auto assign feature requests to Snipe 2023-02-08 09:57:54 -06:00
snipe 23b1e8da27 Merge remote-tracking branch 'origin/develop' 2023-02-07 18:46:30 -08:00
snipe e883a61a48 Merge pull request #12480 from snipe/fixes/ui_fix_for_user_files
Fixed UI bug where download button was missing for non-images
2023-02-07 18:46:07 -08:00
snipe 16fcc6dc44 Fixed UI bug where download button was missing for non-images
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 18:40:00 -08:00
Marcus Moore 4f9ebf6cde Fix array key 2023-02-07 16:40:27 -08:00
Ivan Nieto Vivanco 49b6a1cc53 Adds translation strings to theinventory report sent to users 2023-02-07 18:29:19 -06:00
Marcus Moore 787f619a6b Standardize test method syntax 2023-02-07 16:28:40 -08:00
Marcus Moore 505ca48da2 Remove test method without assertions 2023-02-07 16:17:36 -08:00
Marcus Moore 6b8c0f9e88 Make BaseTest abstract 2023-02-07 16:17:16 -08:00
Marcus Moore 3fdf4dea1b Use factories for relationships in asset factory 2023-02-07 16:17:05 -08:00
Marcus Moore 6dbcec2310 Exclude Dusk tests from phpunit test suite 2023-02-07 16:16:39 -08:00
akemidx 75f3cb3079 fixing external if statement 2023-02-07 19:02:12 -05:00
akemidx c0074baa26 functionality to Apple Warranty link 2023-02-07 17:27:39 -05:00
snipe 4f9587da57 Merge remote-tracking branch 'origin/develop' 2023-02-07 13:34:57 -08:00
snipe 4b2d35e05d Merge pull request #12474 from snipe/fixes/destroy_method_for_fieldsets
Fixed mismatched field/fieldset
2023-02-07 13:33:38 -08:00
Marcus Moore 321a34a9d3 Make phpstan configuration more flexible 2023-02-07 13:32:32 -08:00
snipe c1d484b5df Fixed mismatched field/fieldset
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 13:31:50 -08:00
Marcus Moore fd524c5f14 Remove ignore errors section covered by larastan config 2023-02-07 12:48:41 -08:00
Marcus Moore e4cf59c034 Sort paths 2023-02-07 12:46:13 -08:00
Marcus Moore efac2259db Include Larastan configuration file 2023-02-07 12:25:13 -08:00
snipe ea644f8d47 Still throwing errors, but trying to fix the docblock
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:02:20 -08:00
snipe dd5f256450 We shouldn’t need this because aliases??
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:02:02 -08:00
snipe f4617d8d5b Added larastan and psalm to composer dev
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:01:21 -08:00
snipe 32be88d796 Psalm and phpstan configs
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:00:59 -08:00
snipe 219d92dcfb The sea, Brady.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-07 11:00:30 -08:00
Ivan Nieto Vivanco d4c838a979 Add condition in activity report to only access assigned item id if it exist 2023-02-07 11:26:49 -06:00
Ivan Nieto Vivanco ddabe7cc9f Added Guard Clause to License Importer to return if no empty seat is found 2023-02-07 01:36:55 -06:00
Marcus Moore c03079944a Be more explicit in test case 2023-02-06 16:06:13 -08:00
snipe cd5546e4a1 Fixed wonky switch statement indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:44:17 -08:00
snipe d52d32fed9 Fixed visibility for constants and methods
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:44:02 -08:00
snipe 7363d4e223 FIxed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:35 -08:00
snipe c8c5dddcc1 Removed unused else condition
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:19 -08:00
snipe 1651dbb68d Use null coalescing operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:43:00 -08:00
snipe d95adcae37 Fixed Implicit array creation is disallowed.
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:41:54 -08:00
snipe 8a8575bf2d Made constant DATA_SESSION_KEY public
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:40:32 -08:00
snipe 590cb6a15b Removed unneeded concat
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:40:09 -08:00
snipe aeb8dfb07d Added phpinsights
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:55 -08:00
snipe a60510c063 Added insights config
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:48 -08:00
snipe 8841f04333 Fixed array bracket indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:38 -08:00
snipe ab6ca0e066 Added parens
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:22 -08:00
snipe ec2afee57d Fixed yoda operator
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:39:12 -08:00
snipe b10ea0c25c Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:56 -08:00
snipe 686d1aaae7 Removed unused variable
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:38:29 -08:00
Marcus Moore 0e57e4836e Add translation for Company 2023-02-06 12:21:23 -08:00
Marcus Moore 45e8e9bbed Move company name to better location 2023-02-06 12:21:09 -08:00
Marcus Moore 38cdcdf064 Eager load company 2023-02-06 10:59:51 -08:00
Marcus Moore 78343ddb7c Add asset's company name to checkout page 2023-02-06 10:58:10 -08:00
Godfrey M 74c64c1fc5 adds validation to the update hook, removes typos and deadlines 2023-02-06 09:40:57 -08:00
dependabot[bot] ea0f505db7 Bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 08:07:13 +00:00
snipe b37c4553ef Merge remote-tracking branch 'origin/develop' 2023-02-02 23:41:05 -08:00
snipe b0f4015bb4 Merge pull request #12459 from snipe/fixes/broken_route_in_deleted_models
Updated model restore route
2023-02-02 23:40:39 -08:00
snipe dc414d3552 Updated model restore route
Signed-off-by: snipe <snipe@snipe.net>
2023-02-02 23:38:59 -08:00
Marcus Moore 0cefc7de15 Skip security headers middleware when testing 2023-02-02 18:37:35 -08:00
Marcus Moore 9a0c66bd30 Clear some extra lines 2023-02-02 18:30:18 -08:00
Marcus Moore d8e92d29c0 Improve readability 2023-02-02 18:25:54 -08:00
Marcus Moore 93a62c87c2 Implement test for searching users 2023-02-02 17:57:24 -08:00
Marcus Moore 89eff23e44 Continue implementing tests 2023-02-02 17:41:32 -08:00
snipe 41b0756286 Merge remote-tracking branch 'origin/develop' 2023-02-02 15:35:41 -08:00
snipe f9ef49f886 Merge pull request #12457 from snipe/fixed/regression_on_field_associations
Fixed regression in fieldset -> field association
2023-02-02 15:35:22 -08:00
snipe 51f3857a31 Fixed something I think I broke
Signed-off-by: snipe <snipe@snipe.net>
2023-02-02 15:32:45 -08:00
Marcus Moore a2e47d19fc Scaffold tests for user select list api and begin to implemenet 2023-02-02 13:47:00 -08:00
snipe bbf6e5e69e Merge pull request #12421 from akemidx/hardware_blades_translations
Fixed: translations added for the hardware blades
2023-02-02 13:02:46 -08:00
akemidx b8951e2b54 fixing name from vipuser to vip 2023-02-02 15:58:05 -05:00
akemidx 37ce68af5b once again fixing an apostrophe 2023-02-02 15:54:05 -05:00
akemidx 29851c626f Merge branch 'develop' into user_setup_translation 2023-02-02 14:34:09 -05:00
snipe 1f60afa8e3 Merge remote-tracking branch 'origin/develop' 2023-02-02 11:28:41 -08:00
snipe 64aea8d374 Merge pull request #12456 from snipe/features/add_notes_to_user_history
Fixed #12449 - Added checkout/checkin  note to user history
2023-02-02 11:28:08 -08:00
snipe 7344bbdd7f Added checkout/checkin note to user history
Signed-off-by: snipe <snipe@snipe.net>
2023-02-02 11:26:33 -08:00
snipe 782abe1cf3 Merge remote-tracking branch 'origin/develop' 2023-02-02 11:09:18 -08:00
snipe 2d3318feb6 Merge pull request #12454 from snipe/fixes/fixed_500_when_userfile_does_not_exisy
Handle missing userfiles more gracefully
2023-02-02 11:08:54 -08:00
snipe 78dca7fd32 Handle missing userfiles more gracefully
Signed-off-by: snipe <snipe@snipe.net>
2023-02-02 10:49:36 -08:00
snipe 2a8851bbd7 Merge pull request #12342 from marcusmoore/fix/dusk-test-suite
Fixed Dusk Test Suite
2023-02-02 09:50:34 -08:00
akemidx 69c38bf686 translations on the User Creation page 2023-02-01 20:32:16 -05:00
Brady Wetherington 039d159cbd WIP: working on better Rollbar filtering in prod 2023-02-01 17:15:22 -08:00
Godfrey M 17f1772143 removes postslack from settings controller 2023-02-01 16:58:08 -08:00
Godfrey M 3a86547ef5 fixes messages for integration test, removes slack request file, rehouses ajax method 2023-02-01 16:51:05 -08:00
snipe 4bc804e876 Merge remote-tracking branch 'origin/develop' 2023-02-01 16:50:19 -08:00
snipe 2997de2a66 Merge pull request #12445 from snipe/fixes/exit_out_ldap
Added an exit for the LDAP disabled sync short-circuit
2023-02-01 16:48:00 -08:00
snipe 0cfeab8c50 Added an exit for the LDAP disabled sync short-circuit
Signed-off-by: snipe <snipe@snipe.net>
2023-02-01 16:46:58 -08:00
snipe c706759b5c Merge remote-tracking branch 'origin/develop' 2023-02-01 16:42:11 -08:00
snipe 1432403c9f Merge pull request #12444 from snipe/fixes/only_fire_ldap_sync_in_console_if_enabled
Fixed: Short-circuit the LDAP sync is LDAP is disabled
2023-02-01 16:40:32 -08:00
snipe 67e6089805 Short circuit the LDAP sync is LDAP is disabled
Signed-off-by: snipe <snipe@snipe.net>
2023-02-01 16:36:30 -08:00
snipe d9cdb92014 Merge branch 'develop' into vip_tag 2023-02-01 16:03:23 -08:00
snipe ea4d5e69bc Merge pull request #12407 from akemidx/slack_message
Fixed: translation for slack message notification
2023-02-01 13:44:12 -08:00
snipe 2da4578aa5 Merge branch 'develop' into slack_message 2023-02-01 13:43:09 -08:00
snipe 1a8fb5bcfe Merge pull request #12423 from snipe/features/edit_fieldset_name
Fixed #12418 - added ability to edit custom field names via GUI
2023-02-01 13:39:39 -08:00
snipe 0d4ca218c5 Merge pull request #12437 from uberbrady/ldap_allow_undelegatable_users_to_login
Fixed: Active Directory "not-delegated+dont-expire-password+normal-accounts" can now login
2023-02-01 13:38:59 -08:00
snipe 4a6250a08c Merge pull request #12409 from akemidx/component_checkin_limit
Fixed: Checkin limit string translation for components
2023-02-01 13:37:56 -08:00
akemidx 0ffd40a217 fixing syntax 2023-02-01 16:30:07 -05:00
akemidx 33d819fd41 fixing pr 2023-02-01 16:13:53 -05:00
akemidx 90c1bfe03d fixing pr 2023-02-01 16:12:39 -05:00
akemidx 3702dd87ce fixing pr 2023-02-01 16:10:30 -05:00
akemidx 4d9d73483f fixing pr 2023-02-01 16:09:19 -05:00
akemidx 4e5b8fa213 fixing pr 2023-02-01 16:05:50 -05:00
akemidx a8643e5d35 cleaning up/adding variable 2023-02-01 15:55:16 -05:00
Godfrey M f95a904d90 adds integration button, working on its functionality 2023-02-01 12:08:13 -08:00
Marcus Moore a45ce468cc Update return type for routing mail notifications 2023-02-01 11:44:56 -08:00
Marcus Moore 3580bdae86 Use object accessor instead of array accessor 2023-02-01 11:44:35 -08:00
snipe 38f3843c23 Merge pull request #12386 from snipe/features/fixed_12382_added_checked_out_count_to_accessories
Fixed #12382 - added checked out count to accessories
2023-01-31 19:57:12 -08:00
snipe f7ae5db4f3 Merge branch 'develop' into features/fixed_12382_added_checked_out_count_to_accessories 2023-01-31 19:56:43 -08:00
snipe 6fbd20a11b Merge remote-tracking branch 'origin/develop' 2023-01-31 19:50:18 -08:00
snipe de1141491a Replaced help text
Signed-off-by: snipe <snipe@snipe.net>
2023-01-31 19:41:42 -08:00
snipe 2d45ebe103 Merge pull request #12433 from inietov/fixes/asset_declined_date_issues
Fixed Invalid date value on assets acceptance mail notification
2023-01-31 19:14:51 -08:00
snipe 656344b1c7 Merge pull request #12429 from svpernova09/benperiton/patch-1
Cherry-picked Feature: Add DB_PORT to pgsql connection
2023-01-31 19:10:17 -08:00
snipe 7a23398c0c Merge pull request #12439 from uberbrady/fix_bootstrap_username_doubling
Fixed: username doubles on 'checked-out-to' column if display is resized [sc-19869], [fd-33242]
2023-01-31 18:10:02 -08:00
Brady Wetherington 02ca5248b1 Don't append username to the user's name if it's already there 2023-01-31 17:44:09 -08:00
snipe b1179c7b1e Merge pull request #12438 from inietov/fixes/replace_ios_homescreen_logo
Fixed #9694 Replace iOS "Add to homescreen icon"
2023-01-31 17:02:05 -08:00
Brady Wetherington a4173e3881 Permit not-delegated+dont-expire-password+normal-accounts to login 2023-01-31 16:49:41 -08:00
snipe a2a078015f Merge pull request #12435 from lukasfehling/bugfix/fixed-endpoint-for-user-notification
Fixed the endpoint for user notification with all their assigned assets
2023-01-31 12:41:47 -08:00
Godfrey M 1e0c58c3cf saves data correctly now 2023-01-31 11:32:05 -08:00
lukasfehling cddae4869f fixed the endpoint for user notification with all their assigned assets 2023-01-31 18:27:25 +01:00
Ivan Nieto Vivanco a7a578bf51 Added head only logo to be used as default in apple-touch-icon 2023-01-31 00:13:44 -06:00
Godfrey M fc044528b8 validation is working, success message appears, database is not updating 2023-01-30 16:10:02 -08:00
akemidx 214a1af61a apostrophe updates 2023-01-30 16:54:23 -05:00
Ivan Nieto Vivanco ccc7b78f62 Store the acceptance dates with format YYY-mm-dd 2023-01-30 15:11:41 -06:00
Ben Periton c2854f1bcb Update database.php
Although Postgres is not officially supported, it does seem to work ok, but to help a little bit with the Docker image, this is non-breaking change but allows the env file to specify the pgsql connection port
2023-01-29 19:28:04 -06:00
snipe 22b0b9b090 Fixed gates on fieldsets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-26 17:05:41 -08:00
snipe 583a0412fe Added edit fieldsets translations
Signed-off-by: snipe <snipe@snipe.net>
2023-01-26 17:03:23 -08:00
snipe a16604285c Normalize the fieldset form
Signed-off-by: snipe <snipe@snipe.net>
2023-01-26 17:03:07 -08:00
snipe 37f5cfa8ce Added edit button for fieldsets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-26 17:02:53 -08:00
Godfrey M a63ea560ae adds submit button, getting setAttribute error 2023-01-26 15:17:08 -08:00
akemidx 79d9cff22a translations added for the hardware blades 2023-01-26 16:26:31 -05:00
Marcus Moore 39289dd18e Use user provided alert email for checkout acceptances 2023-01-26 13:18:18 -08:00
snipe 8b94b208e3 Merge remote-tracking branch 'origin/develop' 2023-01-26 13:17:28 -08:00
Marcus Moore 6fc8982478 Have acceptance result notifications adhere to alerts enabled setting 2023-01-26 12:59:33 -08:00
snipe cc370084d1 Merge pull request #12341 from uberbrady/redo_scim_config
Redo SCIM config; use latest laravel-scim-server from our fork
2023-01-26 12:57:29 -08:00
Brady Wetherington cd573c484d Change the SCIM_STANDARDS_COMPLIANCE config to default to 'true' 2023-01-26 12:48:41 -08:00
akemidx df31a76906 fixed apostraphe 2023-01-26 15:02:39 -05:00
Brady Wetherington 4a54586690 Add to Accessories#index an additional gate-check against reports.view 2023-01-26 11:56:06 -08:00
Godfrey M 62b4c79150 adds a couple error messages 2023-01-25 16:38:08 -08:00
Godfrey M a69cb6204a adds rest of inputs, and corrects Data binding 2023-01-25 16:22:34 -08:00
Brady Wetherington c5d3b3ab81 Change out the SCIM config for a fixed one; update our fork of the SCIM-server 2023-01-25 15:59:46 -08:00
Brady Wetherington cfe9c687f9 Mark a bunch of SCIM config as nullable 2023-01-25 15:54:57 -08:00
Brady Wetherington 91cf683f3d Re-do the entire SCIM config so it no longer inherits 2023-01-25 15:53:46 -08:00
Godfrey M 2e22eeade5 adds one input 2023-01-25 14:29:20 -08:00
akemidx 53d8008a5f Merge branch 'vip_tag' of github.com:akemidx/snipe-it into vip_tag 2023-01-25 17:14:29 -05:00
akemidx b363524305 vipuser label updated to vip 2023-01-25 15:58:44 -05:00
snipe 4c3354b778 Merge branch 'develop' into vip_tag 2023-01-24 20:29:43 -08:00
snipe e7917d1f93 Rebuild prod assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 19:16:03 -08:00
snipe 6b729502c6 Rebuilt dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 19:13:40 -08:00
snipe be6f367565 Merge remote-tracking branch 'origin/develop' 2023-01-24 19:12:50 -08:00
snipe f0b14513db Merge pull request #12411 from uberbrady/fix_rb_16746
Resolved Rollbar error 16746 - missing array key 'extension'
2023-01-24 18:24:18 -08:00
Brady Wetherington ab12ad1140 Resolves Rollbar error 16746 - missing array key 'extension' 2023-01-24 18:19:26 -08:00
snipe 9c79fc19cb Tightened up and removed some validation that wasn’t needed
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:37:15 -08:00
snipe fd2a057d38 Make audit dates fillable
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:36:58 -08:00
Brady Wetherington b00333c9f5 Merge remote-tracking branch 'upstream/develop' into develop 2023-01-24 17:36:39 -08:00
Brady Wetherington c9f0f5fe8b Change Accessories report to use server-side pagination from URL 2023-01-24 17:35:44 -08:00
snipe a61ccbb965 Added very clunky but better error messages on that validation for date_format
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:33:49 -08:00
snipe 91394f7262 Removed duplicate comment section
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 17:23:06 -08:00
akemidx 3ba79600fb checkin limit for the components checkin 2023-01-24 18:17:49 -05:00
snipe 935f5018cc Merge pull request #12405 from Godmartinz/high_contrast_color_adjustments
Fixed buttons colors in high contrast theme
2023-01-24 15:17:03 -08:00
snipe 3c4f254583 Enforce Y-m-d as date format for date fields
Signed-off-by: snipe <snipe@snipe.net>
2023-01-24 13:38:53 -08:00
akemidx cafe8f3074 notification for slack message 2023-01-24 16:20:20 -05:00
akemidx 19cf170dd9 Add VIP Checkbox 2023-01-24 15:30:21 -05:00
akemidx 596846a94a Add VIP Checkbox 2023-01-24 15:29:27 -05:00
Marcus Moore b92d1d3ec7 Logically group query when searching users to scope to company 2023-01-24 11:54:56 -08:00
Godfrey M 4b51424723 fixes a couple buttons color choices in high contrast 2023-01-24 09:42:03 -08:00
Godfrey M 0f8ee22053 Creates Slack Setting Form 2023-01-24 09:25:05 -08:00
snipe 86812b024d Merge remote-tracking branch 'origin/develop' 2023-01-23 22:03:12 -08:00
snipe dc155846ca Hoist the autorization higher in the stack so we’re not doing logic or math when the user isn’t authorized to touch this
Signed-off-by: snipe <snipe@snipe.net>
2023-01-23 21:49:17 -08:00
snipe 7a9ea91be0 Merge pull request #12387 from snipe/fixes/inconsistent_UI_for_image_delete
Updated - Refactored ImageHandler request to be more re-usable, and checkboxes with missing `minimal` class for iCheck
2023-01-23 21:39:55 -08:00
snipe 02dcb0fbd7 Shorten the additiona form request invocation to just ImageUploadRequest
We already have the `use App\Http\Requests\ImageUploadRequest` clause at the top of this file.

Signed-off-by: snipe <snipe@snipe.net>
2023-01-23 21:37:35 -08:00
snipe 690bfbe16a Merge pull request #12398 from akemidx/acceptance_translations
Fixed: translations for EULA Acceptance Summary
2023-01-23 21:28:59 -08:00
Marcus Moore cd582be851 Drop tables that may exist in down methods 2023-01-23 15:42:45 -08:00
Marcus Moore 760844de6f Add conditionals 2023-01-23 15:42:33 -08:00
Marcus Moore e6dc61d2cf Revert column names to legacy versions in down method 2023-01-23 15:42:05 -08:00
snipe 4c7b731acc Merge remote-tracking branch 'origin/develop' 2023-01-23 15:36:05 -08:00
snipe 35dfaddd79 Merge pull request #12400 from snipe/jerm/fix-import-backup-checkbox
Fixed "Backup before importing?" checkbox on import page
2023-01-23 15:35:18 -08:00
Jeremy Price d3bcc48ae5 [imports] fix "Backup before importing?" checkbox on import page
We were always taking backups before import, no matter the status of
this box.

Turns out we were testing for the presence of the property defined by
the checkbox, rather than the value of the property, and as such were
always doing a backup.

We're now checking the status, and it behaves as expected
2023-01-23 15:08:59 -08:00
akemidx 25996cbe03 translating the quick info printed out on accept x eula blades 2023-01-23 16:18:21 -05:00
snipe 4b01909806 Merge pull request #12389 from snipe/fixes/livewire_ui
Fixed #12388 - Add CSS to the div to correct the weird indenting
2023-01-23 11:42:26 -08:00
snipe 41537a2449 Added field to the API controller endpoints
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:44 -08:00
snipe 5f9af7d509 Updated API response
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:28 -08:00
snipe febfcd4803 Updated model with new field
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:56:19 -08:00
snipe cad76f671a Added asset_eol_date to blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:42 -08:00
snipe 4104d7260f Include new eol date picker blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:31 -08:00
snipe 3587017591 Updated EOL date in view blade
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:55:19 -08:00
snipe 8040d08e8c Removed formatter from EOL date
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:54:37 -08:00
snipe 2f7ca37666 Migration to normalize eol date for assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:54:24 -08:00
snipe abad579306 Added eol date picker
Signed-off-by: snipe <snipe@snipe.net>
2023-01-22 00:45:33 -08:00
snipe 72295c093a Add CSS to the div to correct the weird indenting - fixes #12388
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:24:23 -08:00
snipe cd8cb445ba Corrected fieldname for user fieldname for avatar in Controller
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:20:53 -08:00
snipe 2dc1182582 Don’t offer the delete option if there is no avatar currently
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:20:26 -08:00
snipe 93ad0d02b9 Use fieldname for aria labels too
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:20:02 -08:00
snipe 48c85966d7 Added gravatar and avatar as fillable
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:07:17 -08:00
snipe a0aed19f95 Refactor image handler
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:05:55 -08:00
snipe f77d871dff Use the imageHandler for profile avatar changes
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 18:05:20 -08:00
snipe 3674f46ce0 Added arial labels
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 16:42:44 -08:00
snipe cfa342c81a Updated HTML for “standard” image edit/delete
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 16:23:04 -08:00
snipe 563a252d18 Updated checkboxed with missing minimal class for iCheck
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:57:52 -08:00
snipe 2bdf3d3f44 Missed a few strong HTML tags
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:44:10 -08:00
snipe 60eab08735 Added ->with(‘users as users_count’) in Accessory query
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:41:07 -08:00
snipe 90c1631820 Added users_count to transformer for API
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:40:35 -08:00
snipe dceb77d4d4 Refactored numRemaining, removed unnecessary numCheckout
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:40:20 -08:00
snipe 46e3e8a3dd Added new users_count field to API
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:39:53 -08:00
snipe 56090bc645 Re-ordered notes to be more consistent, fixed missing iCheck class
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:38:35 -08:00
snipe fd73bee850 Fixed hardcoded string and added new checkout count to accessory view
Signed-off-by: snipe <snipe@snipe.net>
2023-01-21 14:38:05 -08:00
snipe 2564da648b Merge remote-tracking branch 'origin/develop' 2023-01-19 16:22:09 -08:00
snipe b59dcc7b30 Merge pull request #12379 from marcusmoore/fix/row-divider-overflow
Fix minor visual bug on asset show page
2023-01-19 16:21:31 -08:00
snipe d020ab455d Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-01-19 15:56:53 -08:00
snipe 05a3f20d51 Updated production assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-19 15:55:59 -08:00
snipe 69ab42b3f9 Merge pull request #12380 from snipe/maintenance/asset_updates
Updated dev assets
2023-01-19 15:53:55 -08:00
snipe 0080ac92e7 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-19 15:52:06 -08:00
snipe 9508a97852 Merge pull request #12378 from marcusmoore/fix/allow-removing-asset-name-during-checkout
Allow users to set a blank asset name during checkout
2023-01-19 14:50:58 -08:00
Marcus Moore 0fa956403c Fix row divider overflow 2023-01-19 14:16:28 -08:00
Marcus Moore 181f96ad33 Allow users to set a blank asset name during checkout 2023-01-19 12:35:44 -08:00
snipe 04e28c2d34 Merge pull request #12377 from inietov/fixes/visual_glitch_deleting_importing_files
Fixed #12340  Deleting imported files visually drops first element in table.
2023-01-19 11:59:40 -08:00
Ivan Nieto Vivanco f045008237 Add index to deleteFile() call, so it knows what element delete 2023-01-19 13:04:49 -06:00
snipe fa9116b184 Merge pull request #12369 from snipe/features/add_byod_to_assets
Added BYOD to assets
2023-01-18 16:09:45 -08:00
snipe 155977de2d Merge pull request #12370 from marcusmoore/fix/file-upload-tab-permissions
Fixed file uploads for accessories, components, and consumables
2023-01-18 16:08:53 -08:00
snipe 378dc968b7 Derp. Copypasta
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 15:44:28 -08:00
Marcus Moore c089f6eff2 Reference the accessory instance instead of the model 2023-01-18 13:48:01 -08:00
Marcus Moore e506ed7950 Remove extra quote 2023-01-18 13:42:09 -08:00
Marcus Moore 07744ca7bd Reference the consumable instance instead of the model 2023-01-18 13:41:58 -08:00
snipe 0c39c7a53d Updated blades to add byod as a “status”
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:25:46 -08:00
snipe fce620b54f Added byod to blades
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:11:02 -08:00
snipe 33fe2b57f7 Added new byod strings
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:10:48 -08:00
snipe 45019c65f1 BYOD migration
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:10:39 -08:00
snipe acd182e3d2 Added byod to presenter with boolean formatter
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:10:30 -08:00
snipe 48b8cfcef9 Added byod to model, removed duplicate validation rule
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:04:36 -08:00
snipe f626413502 Added byod to API transformer
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:04:02 -08:00
snipe b80d52a9c3 Added byod to asset controller for create and update methods
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:03:51 -08:00
snipe ee4b8f4694 Added byod to API controller
Signed-off-by: snipe <snipe@snipe.net>
2023-01-18 13:03:31 -08:00
Marcus Moore ca1198ceb2 Constrain the bottom bar to the content window 2023-01-18 12:55:20 -08:00
Marcus Moore b31e000165 Have Info and History tables in accessory show page span entire width of row 2023-01-18 12:54:52 -08:00
Godfrey M 7ce230fadc missed a few renames 2023-01-18 08:57:59 -08:00
Godfrey M 6fbb484dfd renames db column for auto_assign boolean, rewords trans string, default value of 1 now 2023-01-18 08:43:03 -08:00
snipe 956bd384b0 Merge pull request #12364 from snipe/features/make_2fa_sortable
BREAKING: Partial fix for #12356: Make 2FA sortable in user list
2023-01-17 20:24:05 -08:00
snipe 7e22663326 Merge pull request #12363 from corydlamb/Ampersand-Patch
Fixed #12362: Bug With Passwords Including Ampersands?
2023-01-17 19:17:50 -08:00
snipe c3e4d9d773 Make column name consistent with field name (BREAKING)
Signed-off-by: snipe <snipe@snipe.net>
2023-01-17 18:27:47 -08:00
snipe f08babfa8a Just moved some stuff around - no actual meaningful code changes
Signed-off-by: snipe <snipe@snipe.net>
2023-01-17 17:22:03 -08:00
snipe 4ef0005e7c BREAKING: changed API fieldname result for 2FA
Signed-off-by: snipe <snipe@snipe.net>
2023-01-17 17:21:40 -08:00
snipe dbda288a44 Formatting changes only for readability
Signed-off-by: snipe <snipe@snipe.net>
2023-01-17 17:21:20 -08:00
snipe eaf9332096 Added filterability to 2FA fields
Signed-off-by: snipe <snipe@snipe.net>
2023-01-17 17:21:03 -08:00
Marcus Moore 5282ca47b3 Allow users with consumables.files ability to upload files for consumables 2023-01-17 17:16:50 -08:00
Marcus Moore 23a1b2d60a Register the consumables.files ability 2023-01-17 17:15:23 -08:00
Marcus Moore 1f12137245 Close divs in correct location 2023-01-17 17:09:55 -08:00
Marcus Moore 6c89f08193 Register the accessories.files ability and allow users with the ability to upload files for accessories 2023-01-17 16:59:50 -08:00
corydlamb 295f0dd1f5 Update WelcomeNotification.php
Used htmlspecialchars_decode to fix the issue I had involving Ampersands in the password field (and I'm assuming the other fields) of the welcome notification email. Changes are all in lines 22-26. Sorry if I'm not doing this very well as this is my first pull request.
2023-01-17 19:33:25 -05:00
Marcus Moore 1fef992fa8 Allow users with components.files ability to upload files for components 2023-01-17 15:58:11 -08:00
Marcus Moore e23ee7540d Register the components.files ability 2023-01-17 15:45:40 -08:00
snipe dd8c6e92db Merge pull request #12355 from snipe/features/make_category_visable_on_models_page_by_default
Added catergories to default visiable set on asset models
2023-01-15 17:09:00 -08:00
snipe f4630d67be Added catergories to default visiable set
Signed-off-by: snipe <snipe@snipe.net>
2023-01-15 17:07:50 -08:00
snipe 6f6f99f64e Merge pull request #12354 from uberbrady/fix_npm_dependencies
Backed out less-loader version requirement so that builds still work
2023-01-14 10:57:35 -08:00
Brady Wetherington 6f89e8b0d8 Backed out less-loader version requirement so that builds still work 2023-01-14 10:53:36 -08:00
snipe 6815a16a5f Merge pull request #12353 from snipe/fixes/rollbar_logging
Only add rollbar to the logging array if the app is in production
2023-01-13 13:53:30 -08:00
snipe 0c3d03a4ce Only add rollbar to the logging array if the app is in production
Signed-off-by: snipe <snipe@snipe.net>
2023-01-13 13:50:16 -08:00
snipe 8048d06853 Merge pull request #12352 from snipe/fixes/added_south_sudan_to_country_list
Added South Sudan to country list
2023-01-13 13:24:54 -08:00
snipe 50cc69c427 Added South Sudan to country list
Signed-off-by: snipe <snipe@snipe.net>
2023-01-13 13:23:57 -08:00
snipe 021e54adaa Merge pull request #12351 from snipe/fixes/check_filename_has_value_before_delete
Check that the `$use_db_field` has a value before attempting a delete
2023-01-13 11:29:31 -08:00
snipe 9d0a15990e Check that the $use_db_field has a value before attempting a delete
Signed-off-by: snipe <snipe@snipe.net>
2023-01-13 11:26:11 -08:00
Marcus Moore 51da747809 Add note about database requirements when running Dusk tests 2023-01-11 18:05:07 -08:00
Marcus Moore 0dd7cc9967 Add note about installing ChromeDriver to testing readme 2023-01-11 13:54:28 -08:00
Marcus Moore 49f2573f36 Update testing readme 2023-01-11 13:51:01 -08:00
Marcus Moore bc80f672ee Keep the example dusk environment file 2023-01-11 13:00:34 -08:00
Marcus Moore 49383ddbe0 Delete old dusk local configuration 2023-01-11 12:58:57 -08:00
Marcus Moore 9a3a796e17 Add dusk environment files to gitignore 2023-01-11 12:57:05 -08:00
Marcus Moore e8c2b84d24 Add example dusk environment file 2023-01-11 12:51:15 -08:00
snipe 4f8951f6f1 Merge pull request #12335 from uberbrady/windows_snipeit_restore
Fixed #12004: Snipe-IT restore didn't work on Windows
2023-01-11 11:03:44 -08:00
snipe 85b712e915 Merge pull request #12337 from snipe/docs/added_jamf_rename
Added jamf-snipe-rename script to third party list
2023-01-10 18:10:47 -08:00
snipe ca244911ed Added jamf-snipe-rename script to third party list
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 18:10:13 -08:00
snipe 942681bee5 Merge pull request #12336 from snipe/features/category_query_optimization
Refactor category API for fewer queries
2023-01-10 17:54:45 -08:00
snipe 459c95064e Fixed default
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 17:54:04 -08:00
Marcus Moore b5ea8b8a4f Conditionally drop table 2023-01-10 17:29:38 -08:00
Marcus Moore aec64fa64a Comment out migration's down method to match its up method 2023-01-10 17:25:25 -08:00
Marcus Moore 03938d0f32 Conditionally drop table 2023-01-10 17:24:38 -08:00
Marcus Moore 296c9a723d Reverse column rename in migration's down method 2023-01-10 17:22:29 -08:00
snipe 2eac03db4a Merge pull request #12329 from snipe/fixes/rollbar_integration
Fixed rollbar integration if ROLLBAR_TOKEN is provided
2023-01-10 17:21:52 -08:00
Marcus Moore c5b09ed955 Fix column name typo 2023-01-10 17:21:46 -08:00
Marcus Moore 4ee3cbf60e Comment out migration's down method to match its up method 2023-01-10 17:20:20 -08:00
Marcus Moore 39ab545cf5 Update alter statement to use correct suffix for column
This is brittle...
2023-01-10 17:08:28 -08:00
Marcus Moore e5cb68cc5e Move drop column command to correct migration 2023-01-10 17:06:16 -08:00
Marcus Moore b8b2543b0d Reference the correct table in migration down method 2023-01-10 17:04:21 -08:00
Marcus Moore bc0f666906 Create Setting in test to avoid being redirected to the setup screen 2023-01-10 17:03:09 -08:00
Marcus Moore 581655f756 Run database migrations for all Dusk tests 2023-01-10 17:02:11 -08:00
Marcus Moore 2aa50859b3 Bump Dusk version to fix broken macOS chrome driver link 2023-01-10 17:01:03 -08:00
snipe 0b0fdd8aa5 Small formatting fixes, fixed typo in comment
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:32:18 -08:00
snipe 8f3a237ea0 More comments
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:29:51 -08:00
snipe 151719a91c Added comments
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:24:46 -08:00
snipe 825df2cf75 Load up the item counts with the individual API methods for accurate numbers without n+1
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:17:03 -08:00
snipe b66cd313b9 Refactored itemCount() to use existing blah_count fields if they exist
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:16:25 -08:00
snipe d508374c57 Disallowed category type change string
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:15:51 -08:00
snipe f50b622eb8 Disallow editing of category type once created, added help text
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 16:15:40 -08:00
snipe bef4224e14 Added notes to itemCount()
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 13:50:24 -08:00
snipe 249b188654 Refactor category API and transformer for query optimization
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 13:30:01 -08:00
Brady Wetherington 2170343958 Fixed #12004: Snipe-IT restore didn't work on Windows 2023-01-10 13:06:47 -08:00
snipe 17c308f3ca Merge remote-tracking branch 'origin/master' into develop 2023-01-10 02:08:23 -08:00
snipe 35136cea07 Add @subdriven as a contributor 2023-01-10 02:07:48 -08:00
snipe 0db83ad8cb Merge pull request #12158 from subdriven/master
Updated installer script for multiple fixes and features
2023-01-10 02:04:29 -08:00
snipe 62bf7b1bce Merge remote-tracking branch 'origin/develop' 2023-01-10 01:56:27 -08:00
snipe 50fdf9c33b Merge pull request #12330 from snipe/fixes/custom_status_label_sidenav
Fixed UX issue where assets sidenav would collapse if custom status label is selected
2023-01-10 01:55:52 -08:00
snipe c5c37fa95f Fixed copypasta
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 01:54:26 -08:00
snipe 9dc016aecc Fixed issue where assets sidenav would collapse if custom status label is selected
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 01:31:00 -08:00
snipe 1cf7784bb8 Logging override if ROLLBAR_TOKEN is provided
Signed-off-by: snipe <snipe@snipe.net>
2023-01-10 00:20:56 -08:00
snipe 60dcaa9e94 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2023-01-09 21:11:29 -08:00
snipe 2e75bd6960 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 21:11:00 -08:00
snipe 799c9c910e Merge remote-tracking branch 'origin/develop' 2023-01-09 21:09:46 -08:00
snipe 005d6d3b62 Merge pull request #12328 from snipe/fixes/revert_to_old_behavior_on_byserial
Fixed bySerial endpoint to always return a list
2023-01-09 21:09:25 -08:00
snipe 529b005d1e We were previously returning a collection - this reverts the change in the last PR to keep that behavior consistent
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 21:05:51 -08:00
snipe dd55aedb87 Merge remote-tracking branch 'origin/develop' 2023-01-09 20:47:46 -08:00
snipe be16fe948a Merge pull request #12327 from snipe/fixes/formatting_regression_with_bytag_api_response
Determine which transformer to use based on number of assets
2023-01-09 20:46:49 -08:00
snipe 7846251d25 Re-added return for no results (derp)
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 20:43:57 -08:00
snipe cc665d50ed One more refactor, hopefully simplifying
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 20:40:12 -08:00
snipe ae76d46f87 Small refactor to ALWAYS return deleted assets in a collection transformer
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 20:23:05 -08:00
snipe bf849128fc Replicate the response behavior in the bySerial endpoint
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 19:57:47 -08:00
snipe 44be8c8f60 Determine which transformer to use based on number of assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 19:54:21 -08:00
snipe bad1253682 Merge remote-tracking branch 'origin/develop' 2023-01-09 17:15:44 -08:00
snipe 20a9be2f6c Merge pull request #12326 from uberbrady/uncache_settings
The cache system in getSettings() cached values "forever." That's bad.
2023-01-09 17:14:22 -08:00
Brady Wetherington 39b1a5a8a0 Remove old cache key for settings 2023-01-09 16:19:25 -08:00
Brady Wetherington 2d0ac5b48b The cache system in getSettings() cached values "forever." That's bad. 2023-01-09 16:16:09 -08:00
snipe e67bd5a275 Merge remote-tracking branch 'origin/develop' 2023-01-09 16:00:33 -08:00
snipe 8d35583634 Merge pull request #12324 from snipe/features/add_username_to_asset_list
Added username to display in asset listings
2023-01-09 16:00:01 -08:00
snipe b39a9e0fe1 Merge remote-tracking branch 'origin/develop' 2023-01-09 15:54:04 -08:00
snipe ae04a8c872 Merge pull request #12325 from uberbrady/ldap_permissions_fix
Fixed #12288 - LDAP default group feature refactor
2023-01-09 15:52:02 -08:00
Brady Wetherington cbffd105a2 Fix LDAP default group feature 2023-01-09 15:23:19 -08:00
snipe a57315aed5 Added username to display in asset listings
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 12:58:58 -08:00
snipe e1263155b1 Merge pull request #12323 from snipe/translations/updated_strings
Updated language strings
2023-01-09 11:10:19 -08:00
snipe 014eab3abc Updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2023-01-09 11:09:26 -08:00
snipe f1bc183043 Merge pull request #12320 from snipe/dependabot/github_actions/actions/checkout-3.3.0
Bump actions/checkout from 3.2.0 to 3.3.0
2023-01-09 10:17:06 -08:00
dependabot[bot] 2f20945516 Bump actions/checkout from 3.2.0 to 3.3.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.2.0...v3.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-09 08:06:28 +00:00
snipe 91d0c383df Production assets
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 18:47:55 -08:00
snipe 886f2a0dec Merge pull request #12317 from snipe/fixes/shorten_url_display_on_view
Truncate URL with ellipsis if too long
2023-01-05 18:44:44 -08:00
snipe e05764ac34 Truncate URL with ellipsis if too long
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 18:42:26 -08:00
snipe a916c68f95 Merge remote-tracking branch 'origin/develop' 2023-01-05 18:07:59 -08:00
snipe 19e703980d Merge pull request #12316 from snipe/features/chunk_data_in_sync_script
Chunk sync script
2023-01-05 18:07:30 -08:00
snipe 6e42bce409 Removed $start variable from calback
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 18:04:06 -08:00
snipe 1a3c947b14 Chunk sync script
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 17:57:52 -08:00
snipe 4d0fc99773 Merge remote-tracking branch 'origin/develop' 2023-01-05 14:19:51 -08:00
snipe bd3f730cb2 Merge pull request #12315 from snipe/features/added_default_values_to_model_api
Features/added default values to model api
2023-01-05 14:11:24 -08:00
snipe 381f89c5a8 Added format to array
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 13:15:30 -08:00
snipe db43628bdc Added default field info to models API response
Signed-off-by: snipe <snipe@snipe.net>
2023-01-05 13:12:54 -08:00
snipe ace73acba1 Merge pull request #12263 from Godmartinz/gh12211_label_padding_adjustment
Fixed: page-break and padding at the end of document for labels
2023-01-05 09:59:35 -08:00
Godfrey M 301c4fda6e fixes conflicts 2023-01-05 09:55:25 -08:00
snipe 5898e384f8 Merge pull request #12308 from snipe/fixes/missing_translation_string
Fixed missing translation string
2023-01-04 15:13:36 -08:00
snipe 9c63f426d9 Added missing translation string
Signed-off-by: snipe <snipe@snipe.net>
2023-01-04 14:09:14 -08:00
snipe c575798b56 Merge pull request #12307 from snipe/fixes/update_less_and_css_loader
Updated less-loader and css-loader libraries
2023-01-04 14:01:03 -08:00
snipe 7123e7327f Updated less-loader and css-loader libraries
Signed-off-by: snipe <snipe@snipe.net>
2023-01-04 14:00:04 -08:00
snipe b36e81836f Merge pull request #12306 from snipe/fixes/weird_sentence_in_translations
Fixed incomplete sentence in translation file for audit interval
2023-01-04 13:57:14 -08:00
snipe b77d5801fa English is hard, apparently
Signed-off-by: snipe <snipe@snipe.net>
2023-01-04 13:56:16 -08:00
snipe 818db58a7b Merge pull request #12305 from uberbrady/fix_license_seat_reporting
Fixed: Change license_seat changing method to properly 'true up' license seats
2023-01-04 13:22:03 -08:00
Brady Wetherington c4f900e9af Change license_seat changing method to properly 'true up' license seats 2023-01-04 13:02:53 -08:00
snipe baf14c43ee Merge pull request #12298 from snipe/fixes/db_seeder_company_id
Fixed db seeder when company id is not present
2023-01-03 14:50:25 -08:00
snipe fa439a1928 Check that the array key exists before trying to seed it
Signed-off-by: snipe <snipe@snipe.net>
2023-01-03 14:45:23 -08:00
snipe d187174f00 Merge pull request #12090 from Godmartinz/deparmtnet_name_validator
Added: validation for department names at Company locations
2022-12-22 11:29:12 -08:00
snipe 6d3c5e0659 Merge pull request #12264 from Godmartinz/gh12253_display_notes_accessories
Added: notes to the accessories tab for user detail view
2022-12-21 19:04:11 -08:00
snipe c49d69c911 Merge branch 'develop' 2022-12-20 17:27:17 -08:00
snipe 685cc86d71 Sets the ldap_default_group field to nullable and default null
Signed-off-by: snipe <snipe@snipe.net>
2022-12-20 17:24:01 -08:00
snipe fb10a6f218 Merge pull request #12268 from inietov/fixes/people_count
Fixed: Dashboard user count scoping when full company support is enabled
2022-12-20 17:05:18 -08:00
Ivan Nieto Vivanco 3a9b8a4993 Calculate the proper amount of people in the dashboard if Full Company Support is enabled 2022-12-20 18:39:17 -06:00
snipe a6c7471bf5 Merge remote-tracking branch 'origin/develop' 2022-12-20 15:11:36 -08:00
snipe 128c21a905 Merge pull request #12266 from uberbrady/fix-select-all-bug
Fixed: There was a bug with BS tables' select-all which showed an incorrect list of elements
2022-12-20 15:09:30 -08:00
Brady Wetherington 75a757d6f5 There was a bug with select-all where some bits didn't quite work 2022-12-20 14:57:58 -08:00
Godfrey M e791e6592a adds notes to the accessories tab under users 2022-12-20 10:37:19 -08:00
Godfrey M 38575e93e8 fixes the rules for adding page-break and padding at the end of document 2022-12-20 09:45:41 -08:00
snipe 88291cadc1 Merge pull request #12254 from akemidx/documentating_something
Commenting on a scope in Models/Company.php
2022-12-19 12:41:32 -08:00
snipe cc40ecaa44 Merge pull request #12260 from snipe/dependabot/github_actions/actions/checkout-3.2.0
Bump actions/checkout from 3.1.0 to 3.2.0
2022-12-19 12:41:17 -08:00
akemidx 94afe2bc6a edits & typo fixes 2022-12-19 14:48:43 -05:00
dependabot[bot] 25b33d657e Bump actions/checkout from 3.1.0 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 08:07:03 +00:00
snipe 399c7590cd Merge pull request #12209 from snipe/fixes/error_downloading_unaccepted_assets
Fixed 500 when downloading the Unaccepted Assets report  [sc-19555]
2022-12-15 14:19:41 -08:00
snipe d0c5ba70f6 Merge pull request #12242 from inietov/features/add_purchase_cost_column
Added `purchase_cost` to user's default view [sc-19680]
2022-12-15 12:42:29 -08:00
akemidx 133d6ffa50 Commenting on a scope in Models/Company.php 2022-12-15 15:18:24 -05:00
Ivan Nieto Vivanco d9a21cce00 Add other items' purchase_cost columns to the same permission 2022-12-15 14:12:05 -06:00
snipe 29c2ff56ec Merge pull request #12188 from snipe/fixes/decrease_logging_for_saml_when_not_enabled
Removed extra logging case that was very noisy
2022-12-15 11:26:49 -08:00
snipe 3e7975b2c3 Merge pull request #12250 from akemidx/grey_out_pw_reset_button
Fixed: Grey out pw reset button for consistency
2022-12-15 11:25:53 -08:00
akemidx d870bc3b02 nested if loop 2022-12-15 14:19:51 -05:00
snipe 227fef76ee Merge pull request #11736 from Godmartinz/gh6508_ldap_default_group
Adds a permission group selection for directory sync
2022-12-15 11:06:53 -08:00
Godfrey M 9d44720ffd reverted changes to composer.lock 2022-12-15 11:02:34 -08:00
Godfrey M 9f3f0a25ed reverted changes to composer.lock 2022-12-15 10:53:45 -08:00
Godfrey M 2e228ccb0b redid a few things. should be good now :) 2022-12-15 10:45:42 -08:00
Godfrey M 3ee413f379 removes livewire stuff 2022-12-15 09:20:30 -08:00
Ivan Nieto Vivanco b142f8e012 Add the permission to show purchase cost column to non-admin sessions 2022-12-14 23:00:35 -06:00
snipe 418ddcfac3 Merge pull request #9876 from Toreg87/fixes/locations-deletable
Fixed #9875: Make locations deletable for non Superuser-Accounts with FullMultipleCompanySupport
2022-12-14 17:46:53 -08:00
snipe c342668f0f Update @scoo73r as a contributor 2022-12-14 17:25:39 -08:00
snipe 2f6a26ec7d Add @scoo73r as a contributor 2022-12-14 17:25:25 -08:00
snipe b89979fbec Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2022-12-14 17:06:26 -08:00
snipe f635278010 Merge pull request #12251 from snipe/security/upgrade_font_awesome
Upgraded font awesome to 6.2.1
2022-12-14 16:42:41 -08:00
snipe 8043b86786 Upgraded font awesome to 6.2.1
Signed-off-by: snipe <snipe@snipe.net>
2022-12-14 16:41:56 -08:00
snipe d13a237000 Merge pull request #12205 from Godmartinz/sc19675_add_remote_to_importer
Adds remote field to the user importer
2022-12-14 12:13:18 -08:00
akemidx b114ffd2c3 Grey out button pw reset button for consistency
When user has no email in their profile, the box is greyed out for
consistency accross all buttons on the user profile
2022-12-14 14:48:59 -05:00
snipe fabefa61b0 Merge pull request #12243 from akemidx/new_grey_out_when_no_assets
Created method in users.php for adding up all assigned to user and pr…
2022-12-13 14:00:48 -08:00
akemidx f3e57d7dc0 fixing PR 2022-12-13 16:00:59 -05:00
snipe 389ec3a3cb Merge pull request #12247 from Godmartinz/gh12225_serial_added_to_components
adds serial to components tab of assets
2022-12-13 12:57:50 -08:00
Godfrey M 6a72c344b7 removed the cuddlers 2022-12-13 12:32:30 -08:00
Godfrey M 4442b446b9 adds serial to components tab of assets 2022-12-13 10:30:37 -08:00
snipe c432fb9d70 Merge pull request #12181 from Godmartinz/gh12163_asset_age
Adds asset age to asset index and asset view pages
2022-12-13 10:28:17 -08:00
akemi 07ae91b00f Created method in users.php for adding up all assigned to user and providing an integer value. this then used to grey out buttons on user view if user has nothing assigned. 2022-12-12 15:47:53 -05:00
Ivan Nieto Vivanco 450ad3dcec Added the column purchase_cost to user's default view 2022-12-12 14:17:08 -06:00
Godfrey M fa872b09a9 fixes a typo, the world is great again 2022-12-12 10:38:31 -08:00
snipe 9833ba4ab6 Merge remote-tracking branch 'origin/develop' 2022-12-09 16:08:56 -08:00
snipe 9e8fff6e5b Merge pull request #12238 from snipe/features/add_email_to_endpoint
Add email in assigned_to on asset transformer
2022-12-09 16:08:35 -08:00
snipe 4ac09ff4e4 Add email in assigned_to on asset transformer
Signed-off-by: snipe <snipe@snipe.net>
2022-12-09 16:07:17 -08:00
snipe e26036e998 Merge remote-tracking branch 'origin/develop' 2022-12-08 17:36:01 -08:00
snipe 1017148bad Merge pull request #12233 from snipe/fixes/translation_placeholder_for_ola_pt-BR
Fixed #12215 - string for “Hello, :name” in pt-BR was using `%`
2022-12-08 17:25:19 -08:00
snipe 00ed197651 Fixed #12215 - string for “Hello, :name” in pt-BR was using %
Signed-off-by: snipe <snipe@snipe.net>
2022-12-08 17:21:55 -08:00
snipe 66f8ac1cd1 Merge remote-tracking branch 'origin/develop' 2022-12-08 14:52:13 -08:00
snipe 775df0ab60 Merge pull request #12221 from snipe/fixes/throttles_reset_password_form
Add throttle for password reset form
2022-12-08 14:51:22 -08:00
snipe 687f8971b1 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-12-08 14:49:31 -08:00
snipe bc2a455a89 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-12-08 14:48:55 -08:00
snipe 97c28d9adc Add @oguzbilgic as a contributor 2022-12-08 14:44:28 -08:00
snipe 163b3f6c0b Merge remote-tracking branch 'origin/develop' 2022-12-08 14:37:35 -08:00
snipe 9b3df40ed6 Merge pull request #12231 from oguzbilgic/patch-2
Use `heroku-redis:mini` instead of `hobby` as It is deprecated
2022-12-08 11:22:14 -08:00
Oguz Bilgic 1c8ee0f706 Use heroku-redis:mini instead of hobby as It is deprecated
Heroku has renamed it's plan to `mini`.
2022-12-08 11:20:33 -08:00
snipe d7c5a6af71 Merge pull request #12224 from Godmartinz/gh12211_img_barcode_adjustment
Fixes the margin and padding for img barcode in labels
2022-12-07 16:35:04 -08:00
snipe 743264fd0e Merge remote-tracking branch 'origin/develop' 2022-12-07 16:23:50 -08:00
snipe f7da87520c Merge pull request #12134 from Godmartinz/custom_report_user_fields_missing
fixes a regression with the csv assigned to fields
2022-12-07 16:18:32 -08:00
Godfrey M ec854ddc1d adjusts the margin and padding for img barcode in labels 2022-12-07 14:52:23 -08:00
snipe 1a8b2a169b Merge pull request #12219 from snipe/fixes/typo_in_sr_text_for_apple
Fixed typo in screen reader text
2022-12-07 13:12:07 -08:00
snipe 43acd3b488 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-12-07 13:11:17 -08:00
snipe c3a6874b16 Add throttle for password reset form
Signed-off-by: snipe <snipe@snipe.net>
2022-12-06 20:42:40 -08:00
Ivan Nieto Vivanco eb67d1b064 Filter items from the report if null returned 2022-12-06 18:00:16 -06:00
Godfrey M d0d0058e79 removed unwanted changes 2022-12-06 11:19:28 -08:00
Godfrey M bbd04f8876 adds the rest of the fields for Remote 2022-12-06 11:13:24 -08:00
snipe 97731cd7c8 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-black.css
#	public/css/dist/skins/skin-black.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-blue.css
#	public/css/dist/skins/skin-blue.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-green.css
#	public/css/dist/skins/skin-green.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-orange.css
#	public/css/dist/skins/skin-orange.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-purple.css
#	public/css/dist/skins/skin-purple.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-red.css
#	public/css/dist/skins/skin-red.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/css/dist/skins/skin-yellow.css
#	public/css/dist/skins/skin-yellow.min.css
#	public/mix-manifest.json
2022-12-05 16:34:34 -08:00
Godfrey M 36901d271b adds csvmatch for remote. Im a bit lost though lol 2022-12-05 16:28:19 -08:00
snipe b7a5467f8b Merge pull request #12204 from akemidx/fixcurlyquotes
Fixed: curly quotes in #12182
2022-12-05 15:33:47 -08:00
akemi 2f8a435e18 fixing curly quotes 2022-12-05 18:06:28 -05:00
snipe 9ca40716ce Merge pull request #12197 from inietov/fixes/custom_regex_defaults_to_any
Fixed #11682  Custom field type of CUSTOM REGEX defaults back to ANY on editing
2022-12-05 13:24:22 -08:00
snipe 7518cab7c8 Merge pull request #12194 from Godmartinz/FDD32094_Icon_color_change
changes the life-ring icon color with themes
2022-12-01 10:04:55 -08:00
Ivan Nieto Vivanco 8d36971c8b Properly select 'CUSTOM REGEX' from the select list if the format declares onee 2022-11-30 16:21:23 -06:00
Godfrey M 371a5bf4d6 changes the icon color with themes 2022-11-30 10:37:47 -08:00
snipe cfc4229308 Add @akemidx as a contributor 2022-11-29 13:15:28 -08:00
snipe 8bf01715a9 Merge pull request #12182 from akemidx/translate_inventory_notification
Fixed #12119 - updated user inventory language to use strings
2022-11-29 13:14:32 -08:00
akemi 55f5e7866d edits for PR 2022-11-29 15:59:36 -05:00
Godfrey M 3206929ee4 adds AgeFormatter, not working yet 2022-11-29 09:51:42 -08:00
snipe 1fe0bfe17e Removed extra logging case that was very noisy
Signed-off-by: snipe <snipe@snipe.net>
2022-11-28 19:27:42 -08:00
snipe 9c205f63ae Merge remote-tracking branch 'origin/develop' 2022-11-28 19:21:19 -08:00
snipe 0cc7389b85 Merge pull request #12187 from snipe/features/added_jobtitle_to_print
Fixed #12133 - Added job title to header in print assets view
2022-11-28 19:20:46 -08:00
snipe e21d0729c1 Add jobh title to header in print assets view
Signed-off-by: snipe <snipe@snipe.net>
2022-11-28 19:19:42 -08:00
snipe c46dc99e86 Merge remote-tracking branch 'origin/develop' 2022-11-28 17:20:57 -08:00
snipe 64a8d1d207 Merge pull request #12185 from snipe/features/add_serial_to_inventory_email
Added serial number to emailed inventory report
2022-11-28 17:20:34 -08:00
snipe 8de59d117f Added serial number to emailed inventory report
Signed-off-by: snipe <snipe@snipe.net>
2022-11-28 17:14:38 -08:00
snipe d5e702ac74 Merge remote-tracking branch 'origin/develop' 2022-11-28 14:12:38 -08:00
snipe 6113afe36e Merge pull request #12125 from inietov/fixes/email_issues
Fixed #11699 and #12065 Email issues
2022-11-28 14:09:42 -08:00
snipe 305df42f92 Merge pull request #12167 from inietov/features/no_submit_until_status_selected
Fixed #11980 Submit button deactivated in Users' Bulk Checkin if no status selected
2022-11-28 13:17:33 -08:00
snipe 9aa0356de7 Merge pull request #12159 from uberbrady/upgrade_scim_server_to_upstream
Pulled in latest upstream changes for improved standards-compliance
2022-11-28 13:15:27 -08:00
snipe d2dcb29dcb Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	resources/views/models/custom_fields_form.blade.php
2022-11-28 12:27:36 -08:00
akemi 39e06a8856 Update to PR#12119, adding inventory notification to messages and changing code to be dynamicaly translated 2022-11-28 14:16:22 -05:00
Godfrey M 8d861cfd82 adds age to the asset table 2022-11-28 10:59:18 -08:00
Godfrey M 078e7281cd adds asset age to asset view 2022-11-28 10:45:58 -08:00
snipe 3ef578eb56 Merge pull request #12164 from Robert-Azelis/patch-7
Fix categories view columns matching
2022-11-23 18:47:02 -08:00
snipe 11a1ab971c Merge pull request #12166 from inietov/fixes/custom_fields_values_develop
Fixed #12046 #12137 Custom field checkboxes not holding value for develop
2022-11-23 18:44:23 -08:00
snipe d226cf189b Merge pull request #12168 from inietov/fixes/error_accepting_assets
Fixed #12161 500 error when accepting assets
2022-11-23 18:41:42 -08:00
Ivan Nieto Vivanco c082d8b90e Return empty string if no MAIL_REPLYTO_ADDR var set 2022-11-23 18:22:31 -06:00
Ivan Nieto Vivanco b1985a08c4 Checks the status before activate the submit button on users bulk-checkin 2022-11-23 17:45:59 -06:00
Ivan Nieto Vivanco 9bafe795b0 Corrected the view when editing custom fields values 2022-11-23 16:34:29 -06:00
snipe bb4c084435 Merge pull request #12165 from inietov/fixes/custom_fields_values
Fixed #12046 #12137 Custom field checkboxes not holding value
2022-11-23 15:09:58 -05:00
Ivan Nieto Vivanco feeb1c7ac8 Corrected the view when editing custom fields values 2022-11-23 12:21:07 -06:00
Robert-Azelis c2cfd8ff53 Update CategoryPresenter.php 2022-11-23 19:00:08 +01:00
Robert-Azelis 20ad4fb681 Update CategoryPresenter.php
Fix snipe#12153
2022-11-23 18:42:38 +01:00
Brady Wetherington 06a1fe5b38 Pulled in latest upstream changes for improved standards-compliance 2022-11-22 12:52:11 -08:00
snipe b6f87633f5 Merge remote-tracking branch 'origin/develop' 2022-11-22 12:36:00 -08:00
snipe e426846c23 Merge pull request #12157 from snipe/fixes/inherit_bgcolor_for_readonly
Fixed background color for readonly date picker fields
2022-11-22 16:57:34 +00:00
snipe 27898e660c Inherit the background color, since the field isn’t actually technically readonly
Signed-off-by: snipe <snipe@snipe.net>
2022-11-22 08:54:48 -08:00
Aaron 2c7364bdfe Fixed #11225: run_as_app_user unknown operand
Fixed #10581: installer does not work on CentOS7
Fixed #10105: php not found, composer failed
Fixed #9035: CentOS 7 IUS repos missing
2022-11-22 11:47:58 -05:00
snipe 0d9d02c6d6 Merge pull request #12148 from whalehub/develop
Fix restore icon in table view
2022-11-19 10:25:48 +00:00
Aaron 7c854c0a5c Fix restore icon in table view
Signed-off-by: Aaron <admin@datahoarder.dev>
2022-11-19 10:45:10 +01:00
snipe efc892cf5e Merge remote-tracking branch 'origin/develop' 2022-11-17 21:29:14 +00:00
snipe ba4c37a7f4 Merge pull request #12139 from snipe/fixes/custom_fields_api_patches
Fixed #9949 - PATCH to custom fields failing on validation (alt approach to #12011)
2022-11-17 21:28:39 +00:00
snipe f0c5560c1b Merge pull request #12141 from Godmartinz/adds_serial_number_to_history
Added `serial` column to the user history page
2022-11-17 21:15:26 +00:00
snipe 774962c122 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-11-17 21:14:35 +00:00
Godfrey M 0a9fd0b867 adds serial to activity report page 2022-11-17 13:09:06 -08:00
Godfrey M 5c94ca1403 removes dead space 2022-11-17 13:06:07 -08:00
Godfrey M 86bc409d3a adds serial column to the action logs 2022-11-17 12:57:53 -08:00
snipe 24841a75d4 Move common things into the model level validation
Signed-off-by: snipe <snipe@snipe.net>
2022-11-17 19:41:10 +00:00
Godfrey M a02a04d601 fixes a regression with the csv assigned to fields 2022-11-16 16:34:57 -08:00
snipe 3997085faf Merge pull request #12122 from Godmartinz/fixes_checkout_to_all_description
fixes checkout to all description
2022-11-16 21:56:53 +00:00
snipe 3ac92e1425 Merge pull request #12127 from deloz/fix-Asset-checked-in-Email-Asset-Picture-Not-Displaying
Fixed #12095 - email logo still linking even if settings deny it
2022-11-16 21:55:59 +00:00
snipe 5661e69520 Merge remote-tracking branch 'origin/develop' 2022-11-16 17:49:14 +00:00
snipe cdcd19a7d8 Merge pull request #12132 from snipe/fixes/view_assets_page_error_when_no_custom_fields
Handle use case where there are no custom fields for any assigned models
2022-11-16 17:48:53 +00:00
snipe 489895a5fa Added comments and spacing for readability
Signed-off-by: snipe <snipe@snipe.net>
2022-11-16 17:48:28 +00:00
snipe 1122562b4e Handle use case where there are no custom fields for any assigned models
Signed-off-by: snipe <snipe@snipe.net>
2022-11-16 17:45:50 +00:00
snipe 65e46c914c Merge remote-tracking branch 'origin/develop' 2022-11-16 15:57:46 +00:00
snipe 4ffe13d3c2 Merge pull request #12131 from snipe/fixes/check_for_format_index_in_custom_field_api_call
Fixed 500 if `format` is not passed to the create custom field endpoint payload
2022-11-16 15:57:07 +00:00
snipe 5df76155ce Check for the format index in the $data array when creating a new custom field via API
Signed-off-by: snipe <snipe@snipe.net>
2022-11-16 15:53:16 +00:00
snipe e1c33d4eff Merge pull request #12129 from deloz/fix-remove-duplicate-column-checkin_email
Fixed #12109 - Duplicate column on Category listing
2022-11-16 11:41:55 +00:00
Instead of looking elsewhere, it is better to come here together 2fc7a15372 Fixed: #12109 2022-11-16 18:22:11 +08:00
Instead of looking elsewhere, it is better to come here together 9056d48775 Fixed: 12095 2022-11-16 18:16:45 +08:00
Godfrey M 8a0517fb5d removes data dump 2022-11-15 15:59:47 -08:00
Godfrey M 90828e3a87 fixes variable name 2022-11-15 15:51:52 -08:00
Godfrey M 45636b8114 adds should_autoassign boolean to users table 2022-11-15 15:42:57 -08:00
Godfrey M 9fefdea9de fixes checkout to all description 2022-11-15 12:50:46 -08:00
snipe 2239c6f7e2 Merge remote-tracking branch 'origin/develop' 2022-11-15 17:58:19 +00:00
snipe da0efaa278 Add @fernando-almeida as a contributor 2022-11-15 17:56:19 +00:00
snipe 69bde0443e Add @lukasfehling as a contributor 2022-11-15 17:56:01 +00:00
snipe 6400bdc266 Merge pull request #12120 from snipe/features/added_deleted_filter_to_search_by_tag
Added ability to include deleted items in tag search endpoint
2022-11-15 17:54:34 +00:00
snipe ffd252a00c Merge pull request #12119 from lukasfehling/feature/added-endpoint-for-user-notification
Added: API endpoint to trigger a user email notification with their assigned assets
2022-11-15 17:51:15 +00:00
snipe 7fcf6f2463 Removed deleted parameter
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:47:21 +00:00
snipe 5103f28598 Merge pull request #12121 from snipe/fixes/safer_file_existance_checking_for_model_files
Replace error suppression with better logic
2022-11-15 17:43:39 +00:00
snipe 60d7128a5e Replace error suppression with better logic
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:41:57 +00:00
snipe 2c5a0d370c Clean up API byserial and bytag, allow deleted param
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:33:56 +00:00
snipe bcbe517446 Added ability to include deleted items in tag search endpoint
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:18:09 +00:00
lukasfehling d9a9bd1c0d Added a api endpoint for sending email notifications to users with their assigned assets 2022-11-15 18:17:51 +01:00
snipe 2166fcec41 Merge pull request #12118 from snipe/features/adds_asset_tag_and_serial_to_api
Allow searching firectly for asset tag and serial
2022-11-15 17:16:17 +00:00
snipe 9a5d431962 Allow searching firectly for asset tag and serial
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:13:26 +00:00
snipe 6dc0846f38 Merge pull request #12117 from snipe/fixes/pr_12106_missing_slash_for_stdClass
Fixes PR #12106 missing slash for std class
2022-11-15 17:04:58 +00:00
snipe 50431c046f Fixed missing slash in stdClass
Signed-off-by: snipe <snipe@snipe.net>
2022-11-15 17:04:06 +00:00
Ivan Nieto Vivanco f0ecab7bb1 Fix typo in variable (ah-hyuck!) 2022-11-15 11:00:40 -06:00
Ivan Nieto Vivanco 7cc8b39863 Checks if settings let URL's be shown in email notifications 2022-11-15 10:55:54 -06:00
snipe ae259f36ae Merge pull request #12106 from fernando-almeida/develop
Fix HTTP AssetTransformer to generate an empty object for missing custom fields
2022-11-15 15:54:43 +00:00
Ivan Nieto Vivanco cd2997b674 Determine if email_logo or logo setting needs to be used in the Forgot Password email 2022-11-15 08:08:26 -06:00
snipe b4ff07ce9e Merge remote-tracking branch 'origin/develop' 2022-11-14 22:53:39 +00:00
snipe 8122236944 Merge pull request #12096 from snipe/features/add_custom_field_option_to_view_assets
Added custom field option to view assets
2022-11-14 22:45:26 +00:00
snipe 56c4fa7c27 Override display settings if field is encrypted
Signed-off-by: snipe <snipe@snipe.net>
2022-11-14 22:41:31 +00:00
snipe 602c2698d2 Fixed broken table header tag
Signed-off-by: snipe <snipe@snipe.net>
2022-11-14 22:06:23 +00:00
snipe ff0b68724f Merge pull request #12107 from snipe/fixes/500_on_missing_model_file
Fixed 500 error if model files are missing
2022-11-14 22:04:31 +00:00
snipe d4ac7530b6 Removed download button for files that don’t exist on the server
Signed-off-by: snipe <snipe@snipe.net>
2022-11-14 22:04:06 +00:00
snipe 4aded5e117 FIxed 500 error if model files are missing
Signed-off-by: snipe <snipe@snipe.net>
2022-11-14 22:01:33 +00:00
snipe 8d03ce5e2c Merge remote-tracking branch 'origin/develop' 2022-11-14 17:45:01 +00:00
snipe 15da39d44a Merge pull request #12105 from snipe/fixes/500_on_missing_license_files
Fixed 500 on missing license files
2022-11-14 17:44:16 +00:00
snipe 077d343f01 Prevent 500 if license file is missing
Signed-off-by: snipe <snipe@snipe.net>
2022-11-14 17:42:40 +00:00
Fernando Almeida 47ee2a8153 Fix HTTP AssetTransformer to generate an empty object for missing custom_fields instead of an empty array. 2022-11-14 16:31:08 +00:00
snipe ae95ee49f1 Hide the option if the field is encrypted
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 17:56:50 +00:00
snipe 2ac558494d Set column width instead of letting BS tables guess
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 17:21:07 +00:00
snipe ede16ad2c2 Removed unused block
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 17:19:35 +00:00
snipe 1e34398c99 Permissions check on the field itself
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 17:19:12 +00:00
snipe 7a5fcfb87a Loop through fields array
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 16:46:59 +00:00
snipe 1fa624420e Removed unneeded relationships
Signed-off-by: snipe <snipe@snipe.net>
2022-11-10 16:46:49 +00:00
Godfrey M 92ae271292 adds validation for department names at Company locations 2022-11-09 13:11:33 -08:00
snipe 6a9131e771 Merge pull request #12088 from uberbrady/minimal_scim_upgrade
Added new SCIM env vars; and upgraded SCIM library
2022-11-09 19:30:50 +00:00
Brady Wetherington 383bd6bb45 Add new SCIM env vars; upgrade SCIM library 2022-11-09 19:08:15 +00:00
snipe 097821b818 Slight revamping of column layouts and also added new general.display_in_user_view column
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:28:19 +00:00
snipe 2e56c9b521 Added new general.display_in_user_view field to form
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:27:59 +00:00
snipe b95d24b5eb Additional translations
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:27:44 +00:00
snipe f91e1d58ad Migration to add the field to the custom_fields table
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:27:34 +00:00
snipe 7c37c70164 Added new field to allowed_fields so that the API can change them if needed
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:27:22 +00:00
snipe 52dc5aa4ba Added field to controller and tranformer
Signed-off-by: snipe <snipe@snipe.net>
2022-11-08 15:26:59 +00:00
snipe 23cbee9493 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-11-03 14:18:55 -07:00
snipe 7c21158680 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 14:18:13 -07:00
snipe 30f4af3ac2 Merge remote-tracking branch 'origin/develop' 2022-11-03 14:14:23 -07:00
snipe b1fa50cde2 Merge pull request #12067 from snipe/fixes/modelfile_image_path
Fixed model file image path/variable
2022-11-03 14:13:54 -07:00
snipe 236684ec92 Fixed model file image path/variable
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 14:12:49 -07:00
snipe c45e777324 Merge remote-tracking branch 'origin/develop' 2022-11-03 14:10:08 -07:00
snipe 53499b1e29 Merge pull request #12066 from snipe/fixes/small_uploads_fixes
Fixed - small uploads fixes
2022-11-03 14:08:52 -07:00
snipe 04b6f023ae Use new upload string
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 13:57:50 -07:00
snipe 3c7d63c060 Disallow uploads if app is locked
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 13:52:23 -07:00
snipe 7cb1ca8754 Fixed image path to show preview
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 13:51:48 -07:00
snipe 52e33a8b0e Merge remote-tracking branch 'origin/develop' 2022-11-03 13:27:21 -07:00
snipe 0f5fbb6a04 Re-added gitignore
Signed-off-by: snipe <snipe@snipe.net>
2022-11-03 13:27:06 -07:00
snipe 6d5ace0458 Merge pull request #12049 from uberbrady/improve_scim_externalid_support
Fixed writes to the `externalId` from SCIM
2022-11-02 15:43:55 -07:00
snipe 6f14355cbc Merge pull request #12060 from snipe/features/added_accessories_file_uploads
Added accessories file uploads
2022-11-01 19:51:38 -07:00
snipe eb81c290dc Accessory file upload
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:50:39 -07:00
snipe 2f9e097854 Merge pull request #12059 from snipe/fixes/consumables_files_translations
Use the generic file uploads strings
2022-11-01 19:32:35 -07:00
snipe 97aeb1fcec Use the generic file uploads strings
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:31:23 -07:00
snipe e6d259bac0 Merge pull request #12058 from snipe/features/added_uploads_to_components
Added uploads to components
2022-11-01 19:30:17 -07:00
snipe 8887d40b86 Added gitignore
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:29:21 -07:00
snipe 3d8e0b707e Fixed component file route controller names
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:29:13 -07:00
snipe 71a7176a6e Updated component blade
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:28:57 -07:00
snipe def89bfa0c Added some generic file translations
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:28:49 -07:00
snipe f1cb7ee410 Fixed some translations
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:28:39 -07:00
snipe 84c0f50266 Added ComponentFilesController
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:10:04 -07:00
snipe f51b312843 Added component routes for uploads
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:09:51 -07:00
snipe 3d3a4b02fc Added helper method for uploads
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:09:34 -07:00
snipe 276f534ded Updated permissions
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:09:21 -07:00
snipe 1d47d9e52b Merge pull request #12057 from snipe/features/add_uploads_to_components
Added uploads to components
2022-11-01 19:07:42 -07:00
snipe 2106b64da6 Fixed some layout issues
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 19:06:49 -07:00
snipe fa79a6c15f Skip storage:: facade on missing images
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 18:19:13 -07:00
snipe 761da534f3 Updated consumables UI to allow uploads and display files
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 17:53:08 -07:00
snipe b362951c95 Added consumables permissions
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 17:52:45 -07:00
snipe 25f69a7bd2 Added consumable methods for uploads
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 17:52:28 -07:00
snipe f6a6478804 Added consumable uploads gitignore
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 17:52:04 -07:00
snipe 3282702c73 Added consumables upload routes
Signed-off-by: snipe <snipe@snipe.net>
2022-11-01 17:51:53 -07:00
Brady Wetherington 4e5c878b73 Needed to fix the way we write externalId from SCIM 2022-10-31 19:15:08 -07:00
snipe 5711706367 Merge remote-tracking branch 'origin/develop' 2022-10-31 12:17:06 -07:00
snipe a930661150 Check for valid category
Signed-off-by: snipe <snipe@snipe.net>
2022-10-31 12:16:39 -07:00
snipe 7cb4740359 Merge pull request #11766 from snipe/fixes/wtf_method_names_derp
Fixed (?) method name?
2022-10-26 17:39:11 -07:00
snipe 9f8f028484 Merge remote-tracking branch 'origin/develop' 2022-10-26 12:21:20 -07:00
snipe d0b9e956df Merge pull request #12042 from snipe/fixes/added_missing_hashed_password_string
Corrected string for invalid current password
2022-10-26 12:20:35 -07:00
snipe c1eee2cc72 Corrected string for invalid current password
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 12:18:29 -07:00
snipe f32183d51b Merge remote-tracking branch 'origin/develop' 2022-10-26 10:58:52 -07:00
snipe 73f30c0a41 Merge pull request #12041 from snipe/features/reflect_status_label_color_in_sidenav
Fixed #12009 - Added ability to reflect color in sidenav if one is given
2022-10-26 10:58:19 -07:00
snipe c233d7fb1c Removed extra spaces
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 10:51:06 -07:00
snipe dea0fcefbd Reflect color in sidenav if one is given
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 10:48:42 -07:00
snipe 38678d4646 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-10-26 09:50:44 -07:00
snipe 476a5cbc02 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 09:49:50 -07:00
snipe bc4c6abe06 Merge remote-tracking branch 'origin/develop' 2022-10-26 09:43:33 -07:00
snipe 73f61ce032 Merge pull request #12040 from snipe/fixes/locations_asset_count
Renamed column back to assets_count for legacy
2022-10-26 09:43:01 -07:00
snipe 12c7223bcd Renamed column back to assets_count for legacy
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 09:39:03 -07:00
snipe de856d6045 Merge remote-tracking branch 'origin/develop' 2022-10-26 00:57:17 -07:00
snipe b7efb58733 Merge pull request #12038 from snipe/fixes/clear_expected_checkin_on_checkin_action
Added - set `expected_checkin` to `null` on user bulk checkin and delete
2022-10-26 00:56:43 -07:00
snipe 28b0d8cf0f Null expected_checkin on user bulk checkin and delete
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 00:54:37 -07:00
snipe 88ae8858e8 Merge remote-tracking branch 'origin/develop' 2022-10-26 00:32:39 -07:00
snipe 0bc0a116aa Merge pull request #12035 from snipe/features/added_new_tab_to_locations
Features/added new tab to locations
2022-10-26 00:32:07 -07:00
snipe e670ffe349 Added Assets Assigned to tab
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 00:16:06 -07:00
snipe a94f1c4a64 Cleaned up and added comments
Signed-off-by: snipe <snipe@snipe.net>
2022-10-26 00:15:52 -07:00
snipe b503b672ba Merge pull request #11951 from Godmartinz/AccessKey_shortcuts
adds shortcuts for listing, creating, and saving
2022-10-25 15:53:57 -07:00
snipe 72296eea5c Merge remote-tracking branch 'origin/develop' 2022-10-25 15:46:26 -07:00
snipe bc023a2566 Add @eltociear as a contributor 2022-10-25 15:46:07 -07:00
snipe 2f7e22be1e Fixed all-contributors type
Signed-off-by: snipe <snipe@snipe.net>
2022-10-25 15:46:07 -07:00
snipe 9409965239 Merge pull request #11928 from eltociear/patch-1
Fix typo in Dockerfile.fpm-alpine
2022-10-25 15:45:42 -07:00
snipe f54c92ade2 Merge pull request #12028 from StarlessNights/feature/add-memcached-php-extensions-to-docker-images
Fixed #12027: Add memcached php extensions to docker images
2022-10-25 15:42:15 -07:00
snipe b1fb70cb7b Merge remote-tracking branch 'origin/develop' 2022-10-25 15:35:04 -07:00
snipe 9e08936cbc Merge pull request #12030 from uberbrady/scim_externalid_support
Added externalId support to SCIM integration
2022-10-25 14:51:52 -07:00
Brady Wetherington cd385e0865 Set scim_externalid to nullable, default null 2022-10-25 14:38:19 -07:00
Brady Wetherington 1e3281c76c Add externalId support to SCIM integration 2022-10-25 14:19:01 -07:00
Iisakki Jaakkola af4d62759f Added php memcached extension to docker Alpine image. 2022-10-25 16:16:25 +03:00
Iisakki Jaakkola 9452973845 Added php memcached extension to the docker image. 2022-10-25 16:16:25 +03:00
snipe 8e23787888 Merge remote-tracking branch 'origin/develop' 2022-10-21 17:44:04 -07:00
snipe 3b16157d6b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-10-21 17:43:53 -07:00
snipe 3ec3d38c9f Merge remote-tracking branch 'origin/develop' 2022-10-21 17:01:00 -07:00
snipe ae430959a4 Merge pull request #12015 from snipe/fixes/revert_processing_button
Changed button icon for importer
2022-10-21 17:00:22 -07:00
snipe 85a85082b7 Changed button icon for importer
Signed-off-by: snipe <snipe@snipe.net>
2022-10-21 16:59:19 -07:00
snipe 5acb493efd Merge pull request #12008 from snipe/features/add_default_loc_to_location_view
Added default tab to locations
2022-10-21 16:43:24 -07:00
snipe 515b14a001 Updated JS to better handle input IDs
Signed-off-by: snipe <snipe@snipe.net>
2022-10-20 19:21:09 -07:00
snipe 4eed2baa31 Added default tab to locations
Signed-off-by: snipe <snipe@snipe.net>
2022-10-20 19:06:58 -07:00
snipe 453f2c3b0e Merge pull request #12006 from uberbrady/ldap_manager_cache
Added cache manager lookups in LDAP for performance boost
2022-10-20 17:06:23 -07:00
Brady Wetherington bc78d341a0 Caches manager lookups in LDAP for performance boost 2022-10-20 16:52:40 -07:00
snipe da579a302c Merge remote-tracking branch 'origin/develop' 2022-10-19 19:09:34 -07:00
snipe edf191b724 Merge pull request #11995 from uberbrady/ldap_manager_fix
Fixed: Okta LDAP Manager Attribute - Try to better-handle LDAP Manager settings
2022-10-19 19:04:10 -07:00
Brady Wetherington 12d86bd6e2 Erroneous line-break removal - re-add 2022-10-19 19:01:52 -07:00
Brady Wetherington c4f11de90d Remove incorrect comment. 2022-10-19 18:49:19 -07:00
Brady Wetherington 8fb61cf5f8 Try to better handle LDAP Manager settings that don't line up with what we expect 2022-10-19 18:36:16 -07:00
Godfrey M f2d4a61e3c removes dead space 2022-10-18 15:31:37 -07:00
Godfrey M 3f25a1bf61 removes dead code 2022-10-18 15:25:38 -07:00
Godfrey M f9ac447dd1 adds default group to LDAP 2022-10-18 15:18:09 -07:00
snipe 4e83b06d71 Merge remote-tracking branch 'origin/develop' 2022-10-18 15:00:51 -07:00
snipe 23e613f903 Fixed kit parse error on model edit
Signed-off-by: snipe <snipe@snipe.net>
2022-10-18 15:00:33 -07:00
snipe f1c82ca732 Merge pull request #11988 from snipe/fixes/wrong_icons_for_mobile_location_view
Fixed wrong icons for mobile view for locations listing
2022-10-17 20:14:01 -07:00
snipe 2543fa6b98 Fixed user icon for tab
Signed-off-by: snipe <snipe@snipe.net>
2022-10-17 20:04:42 -07:00
snipe 7c34652da0 Fixed incorrect icons for mobile view on location tabs
Signed-off-by: snipe <snipe@snipe.net>
2022-10-17 20:02:27 -07:00
snipe aa3f94973f Merge remote-tracking branch 'origin/develop' 2022-10-17 14:45:05 -07:00
snipe 1ec303931a Merge pull request #11986 from Godmartinz/FD31357_depreciation
Fixes the calc of months and fixes typo of the word depreciation
2022-10-17 14:44:46 -07:00
Godfrey M d359bcb88d adds proper spacing 2022-10-17 13:15:10 -07:00
Godfrey M 28059c878a gets the proper amount of months and fixes typo of the word depreciation 2022-10-17 11:16:29 -07:00
Phan Nguyen e457b2e98d Correct assignedusers relation setting 2022-10-17 13:10:09 +07:00
snipe b7bcfaccc9 Merge pull request #11834 from uberbrady/try_catch_notifications
try/catch wrap notifications on checkin/checkout
2022-10-13 14:20:22 -07:00
snipe f4a3f896bd Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-10-13 13:20:35 -07:00
snipe 0303df4b25 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 13:19:51 -07:00
snipe 9151868839 Merge remote-tracking branch 'origin/develop' 2022-10-13 13:06:52 -07:00
snipe 8c6aaec9ce Merge pull request #11971 from snipe/localization/new_translations
Added new translations
2022-10-13 13:06:16 -07:00
snipe fb228d6ded Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:57:10 -07:00
snipe 1360ce90a5 Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:52:45 -07:00
snipe 3549afe157 Added strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:43:24 -07:00
snipe cfb780b20b Remove unused files
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:39:10 -07:00
snipe eb9f17122e Updated strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:21:09 -07:00
snipe 2ef45afb2b Removed extraneous files
Signed-off-by: snipe <snipe@snipe.net>
2022-10-13 12:18:57 -07:00
snipe c8baf4c6ad Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 16:25:43 -07:00
snipe 0b20cf6d70 Merge remote-tracking branch 'origin/develop' 2022-10-12 16:24:46 -07:00
snipe ecc6bd8a24 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 16:24:31 -07:00
snipe 3c9c89355e Aaaand master again
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 16:01:55 -07:00
snipe 43479efed0 Merge remote-tracking branch 'origin/develop' 2022-10-12 16:01:17 -07:00
snipe 80279a95ae Merge pull request #11964 from snipe/fixes/audit_admin_presenting
Use admin ID for audit log notification
2022-10-12 16:00:50 -07:00
snipe ac055c01dc Use admin ID for audit log notification
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 15:59:43 -07:00
snipe 5ff72420a6 Set branch back to develop
I hads to switch branches because the automated GH action script always targets masterb

Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 11:00:06 -07:00
snipe 55b33c1042 Merge pull request #11944 from snipe/dependabot/github_actions/actions/checkout-3.1.0
Bump actions/checkout from 2 to 3.1.0
2022-10-12 10:59:21 -07:00
snipe a499a92bb7 Added @nh314 as a contributor
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 10:57:50 -07:00
snipe e7ae7742b0 Merge pull request #11949 from nh314/Remove-required-mark
Remove required mark
2022-10-12 10:55:49 -07:00
snipe 98f2e0271b Merge pull request #11942 from nh314/develop
Correct comparison logic
2022-10-12 10:55:29 -07:00
snipe e721665fd8 Merge remote-tracking branch 'origin/develop' 2022-10-12 10:53:42 -07:00
snipe cd43fc50fb Merge pull request #11960 from snipe/fixes/better_validation_for_ldap_filter
Sets nullable attribute on validation
2022-10-12 10:53:08 -07:00
snipe 06803092c5 Merge pull request #11952 from snipe/features/clearer_activated_helptext
Added clearer LDAP activated helptext
2022-10-12 10:52:56 -07:00
snipe 0312ecf09d Sets nullable attribute on validation
Signed-off-by: snipe <snipe@snipe.net>
2022-10-12 10:30:47 -07:00
snipe 0ed50f4e58 Merge remote-tracking branch 'origin/develop' 2022-10-12 10:22:48 -07:00
snipe 3f105cd3b2 Merge pull request #11959 from inietov/fixes/depreciation_date
Fixed Depreciation date diff readable precision
2022-10-12 10:21:37 -07:00
Ivan Nieto Vivanco ab0c5bcd9d Add precision parameter to the diffForHumans() Carbon function to report 2022-10-12 12:16:13 -05:00
snipe 5ba01728d9 More text tweaking
Signed-off-by: snipe <snipe@snipe.net>
2022-10-11 12:51:25 -07:00
snipe ae0eb378e4 Additional clarification
Signed-off-by: snipe <snipe@snipe.net>
2022-10-11 12:43:54 -07:00
snipe ad8a2387f0 Updated help text to be more clear
Signed-off-by: snipe <snipe@snipe.net>
2022-10-11 12:38:37 -07:00
Godfrey M 4fa01350c3 adds shortcuts for listing, creating, and saving 2022-10-11 12:00:15 -07:00
Phan Nguyen d3161fad02 Remove required mark
Because it actually not required by model.
2022-10-11 15:49:56 +07:00
dependabot[bot] 36eb51b52f Bump actions/checkout from 2 to 3.1.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:36:34 +00:00
Phan Nguyen 8ff109e9da Correct comparison logic
Comparison operator should be greater than or equal
2022-10-08 12:54:15 +07:00
snipe 15da3b831d Merge pull request #11937 from Godmartinz/gh11868_sidebar_unclickable
Fixes the margin top adjustment for desktop
2022-10-06 10:43:27 -07:00
Godfrey M 0c6441ebed removes the margin top adjustment for desktop 2022-10-06 10:35:28 -07:00
snipe fbfc9d123c Merge remote-tracking branch 'origin/develop' 2022-10-06 09:26:07 -07:00
snipe cd942196cc Merge pull request #11933 from inietov/fixes/500_creating_new_user_undefined_variable_item
Fixed Error 500 undefined variable item creating a new user.
2022-10-06 09:07:18 -07:00
Ivan Nieto Vivanco f1edbc9810 Send item variable that the datepicker needs 2022-10-06 09:15:00 -05:00
Ikko Ashimine 66e64cb136 Fix typo in Dockerfile.fpm-alpine
enviroment -> environment
2022-10-06 11:53:13 +09:00
snipe 1ef3eb94db Merge remote-tracking branch 'origin/develop' 2022-10-05 17:55:33 -07:00
snipe 25e4b7d59d Merge pull request #11927 from uberbrady/use_improved_scim
Use the new scim-trace feature from our fork of laravel-scim-server lib
2022-10-05 17:53:20 -07:00
Brady Wetherington 9605dec22a Use the new scim-trace feature from our fork of laravel-scim-server lib 2022-10-05 17:43:59 -07:00
snipe ca937667b4 Indented divs per @uberbrady
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 17:21:39 -07:00
snipe e9c61903f1 Merge pull request #11926 from snipe/features/add_start_and_term_dates_to_users
Added start and end dates to users
2022-10-05 17:20:37 -07:00
snipe 14b7319b63 Added start/end to sortable columns
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 17:07:07 -07:00
snipe 9d641573b5 Make the APU return null instead of blank
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 17:01:04 -07:00
snipe 3605aa8f5a Added clear button to generic datepicker and made it wider
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:59:06 -07:00
snipe 0817308822 Added start/end to edit/view screens
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:58:49 -07:00
snipe bdfac1a345 Added start/end to the users API
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:58:37 -07:00
snipe f7a9be92ca Store data for start and end
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:58:26 -07:00
snipe 56ba8a7e24 Added API select fields and filters
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:58:16 -07:00
snipe cf62761d18 Added date casting and fillable to models
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:57:59 -07:00
snipe d23e178c62 Adde language strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:56:10 -07:00
snipe 7353ecd388 Added start_date and end_date migration to users table
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 16:55:59 -07:00
snipe 18663c2599 Merge pull request #11925 from inietov/fixes/checkbox_customfields_comma_issues
Fixed #11710 - Validation of checkbox data with multiple values
2022-10-05 16:48:32 -07:00
Ivan Nieto Vivanco 5b8e0b3af1 Use a regex (gulp) to admit ',' (comma) and ', '(comma plus space) as customfields checkbox value delimiter 2022-10-05 18:40:07 -05:00
snipe dab83091d2 Merge remote-tracking branch 'origin/develop' 2022-10-05 12:12:27 -07:00
snipe 4c0be7ec98 Merge pull request #11924 from snipe/features/autoglossonym_locales
Added autoglossonyms for locales and translations for countries
2022-10-05 12:09:29 -07:00
snipe 018f71a157 Switched to translations for better autoglossonym support
Signed-off-by: snipe <snipe@snipe.net>
2022-10-05 11:46:42 -07:00
snipe 9f03f0f6f6 Updated link
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 23:39:47 -07:00
snipe da40c0ad48 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 18:09:18 -07:00
snipe c70c8ce856 Merge pull request #11916 from Godmartinz/gh11868_sidebar_unclickable
fixes mobile views and clickability of sidebar menu
2022-10-04 18:07:02 -07:00
snipe fe49ac79d1 Updated all contributors
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 18:06:09 -07:00
snipe 687a764fc1 Dev to master in version.php
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 17:53:16 -07:00
snipe 81be84568e Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 17:52:24 -07:00
snipe 61fa0bda4d Merge pull request #11917 from snipe/updates/updated_language_strings
Updated lnaguage strings
2022-10-04 17:49:27 -07:00
snipe 81d2a3acda Updated lnaguage strings
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 17:48:43 -07:00
snipe 931d81d825 Merge pull request #11908 from snipe/features/nicer_view_assets_ui_for_regular_users
Overhaul of UI for unprivileged users
2022-10-04 16:41:44 -07:00
snipe bcebc1e33b Stylistic refactoring
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 16:37:33 -07:00
snipe ba0483b33e Phrasing!
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 16:21:10 -07:00
snipe 97b9f96030 Added nag alert for unaccepted assets
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 16:16:21 -07:00
snipe 891b5b2882 Added routes, language
Signed-off-by: snipe <snipe@snipe.net>
2022-10-04 15:45:25 -07:00
Godfrey M e21660ae05 off by a pixel 2022-10-04 12:11:37 -07:00
Godfrey M 53392d6069 fixes mobile views and clickability of sidebar menu 2022-10-04 12:01:13 -07:00
snipe 3469e49470 First UI overhaul
Signed-off-by: snipe <snipe@snipe.net>
2022-10-03 21:28:22 -07:00
snipe e9224f094e Merge pull request #11906 from inietov/fixes/server_error_downloading_unaccepted_assets
Fixed error 500 when downloading asset acceptance report. [sc-19555]
2022-10-03 16:40:28 -07:00
Ivan Nieto Vivanco 25c10c3819 Filter non-asset items from download unaccepted assets report 2022-10-03 18:12:30 -05:00
snipe b9419c7454 Merge pull request #11901 from snipe/security/escape_formats_in_csv
Use `EscapeFormula()` in CSV export
2022-09-30 11:59:11 -07:00
snipe b07c4caa37 Extra whitespace
Signed-off-by: snipe <snipe@snipe.net>
2022-09-30 11:47:27 -07:00
snipe aa52bc6c6a Added Vautia
Signed-off-by: snipe <snipe@snipe.net>
2022-09-30 11:47:20 -07:00
snipe 5a7e35c0e8 Made a conditional escape according to .env
Signed-off-by: snipe <snipe@snipe.net>
2022-09-30 09:48:43 -07:00
snipe bae200edd7 Use EscapeFormula() in CSV export
Signed-off-by: snipe <snipe@snipe.net>
2022-09-30 09:29:17 -07:00
snipe 2fd197c2db Merge pull request #11896 from snipe/fixes/500_on_depreciation
Fixed depreciation API call
2022-09-29 17:09:39 -07:00
snipe 36484d50ef Fixed depreciation API call
Signed-off-by: snipe <snipe@snipe.net>
2022-09-29 17:07:42 -07:00
snipe 2b7c8cf82b Merge pull request #11895 from uberbrady/switch_dashboard_piechart_to_percent
Modified dashboard tooltips to add percentage as well as count
2022-09-29 14:11:16 -07:00
Brady Wetherington 0424308863 Modified dashboard tooltips to add percentage as well as count 2022-09-29 13:46:56 -07:00
snipe 78580136f6 Merge pull request #11894 from uberbrady/improve_piechart_labels_legends
Added counts to Dashboard Pie Chart legends and tooltips
2022-09-29 13:27:28 -07:00
Brady Wetherington 420c216973 Added counts to Dashboard Pie Chart legends and tooltips 2022-09-29 13:20:58 -07:00
snipe 9c6fa18454 Merge pull request #11893 from snipe/features/switch_dash_pie_to_status_type
Fixed #11521 - Add option to switch to using status meta from status label name
2022-09-29 13:02:28 -07:00
snipe 70c766e8b3 Added setting to choose dashboard type
Signed-off-by: snipe <snipe@snipe.net>
2022-09-29 04:16:46 -07:00
snipe 0b2ce7be07 Fixed #11521 - switch to using status meta from status label name
Signed-off-by: snipe <snipe@snipe.net>
2022-09-29 03:48:58 -07:00
snipe 3d48dd19cb Merge pull request #11890 from snipe/fixes/statuslabels_assetlist
Fixed #11889 - API route for status labels asset listing
2022-09-29 00:51:25 -07:00
snipe 08bab4f101 Fixed #11889 - API route for status labels asset listing
Signed-off-by: snipe <snipe@snipe.net>
2022-09-29 00:50:07 -07:00
snipe 95b49f8deb Merge pull request #11886 from sunflowerbofh/tmp-replace-patchwork-utf8
Tmp replace patchwork utf8
2022-09-28 10:32:07 -07:00
Katharina Drexel 4f5d536e32 Fixed: #11871 Replacing (deprecated) patchwork/utf8 by polyfill/mbstring. 2022-09-28 14:52:02 +02:00
snipe 9dbc5070f8 Remove phplint (for now)
Signed-off-by: snipe <snipe@snipe.net>
2022-09-27 16:47:09 -07:00
snipe 055a2f827f Merge pull request #11872 from sunflowerbofh/tmp-replace-patchwork-utf8
Fixed #11871 Replacing (deprecated) patchwork/utf8 by polyfill/mbstring.
2022-09-27 16:46:12 -07:00
snipe 8d3fe423e1 Merge pull request #11671 from chartjes/ch-fix-tests
Fixed unit test suite that was not running, added working browser test
2022-09-27 16:20:56 -07:00
snipe 1377725a97 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-09-27 14:53:47 -07:00
snipe 58ccfe9226 Updated prod assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2022-09-27 14:51:19 -07:00
snipe 05ac9f4a68 Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-09-27 14:47:54 -07:00
snipe 0889cd61cf Updated skins
Signed-off-by: snipe <snipe@snipe.net>
2022-09-27 14:47:09 -07:00
snipe 8168ca4074 Merge pull request #11853 from Godmartinz/ldap_test_results_color
Fixes the color choice for the ldap_test_results
2022-09-27 14:46:46 -07:00
snipe de399a9f8f Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/all.css
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2022-09-27 14:46:30 -07:00
snipe af150f0192 Add @BasO12 as a contributor 2022-09-27 14:44:32 -07:00
snipe c194c8a0c8 Merge pull request #11764 from BasO12/master
Added notes to audit mail notification
2022-09-27 14:43:50 -07:00
snipe a7b83fc531 Merge pull request #11854 from inietov/fixes/location_issue_during_import
Fixed #11847 404 error during Import if a checkout type of location is specified and no checkout location is passed
2022-09-27 14:34:26 -07:00
snipe ef22da622d Merge pull request #11870 from snipe/dependabot/github_actions/codacy/codacy-analysis-cli-action-4.2.0
Bump codacy/codacy-analysis-cli-action from 4.1.0 to 4.2.0
2022-09-27 14:33:53 -07:00
dependabot[bot] 8443796cbe Bump codacy/codacy-analysis-cli-action from 4.1.0 to 4.2.0
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/v4.1.0...v4.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-27 21:33:19 +00:00
snipe ac996a771c Merge pull request #11882 from snipe/security/upgraded_fontawesome
Upgraded fontawesome
2022-09-27 14:27:22 -07:00
snipe 942eaac2ee Upgraded fontawesome
Signed-off-by: snipe <snipe@snipe.net>
2022-09-27 14:25:44 -07:00
snipe ada2a2cd43 Merge pull request #11878 from inietov/fixes/asset_importer_duplicate_fields
Delete duplicate fields from the importer dropdown menu [sc-19547]
2022-09-27 14:21:30 -07:00
Ivan Nieto Vivanco 06ba9356ca Delete another set of duplicates 2022-09-26 18:57:35 -05:00
Ivan Nieto Vivanco e034f7b674 Delete another duplicate that somehow has survived 2022-09-26 18:56:24 -05:00
Ivan Nieto Vivanco 4d14243f57 Delete duplicate fields from the importer dropdown menu 2022-09-26 18:51:13 -05:00
snipe 88a371082d Merge remote-tracking branch 'origin/develop' 2022-09-26 16:29:21 -07:00
snipe ee7e26ae8d Merge pull request #11877 from snipe/features/use_built_in_clear_on_datepicker
Use BS datepicker’s built in clear button
2022-09-26 16:23:27 -07:00
snipe 9d93c72534 Use BS datepicker’s built in clear button
Signed-off-by: snipe <snipe@snipe.net>
2022-09-26 14:34:35 -07:00
snipe 44b72e0f5f Merge remote-tracking branch 'origin/develop' 2022-09-26 13:49:48 -07:00
snipe d91d226652 Merge pull request #11857 from inietov/fixes/throw_exception_instead_of_redirect_when_no_available_licenseseats
Fixed #11827 Throw exception when there are no available seats for checkout.
2022-09-26 13:43:57 -07:00
snipe 091ef62cbe Merge pull request #11856 from inietov/fixes/purchase_date_not_nullable
Fixed Purchase date "readonly" value makes purchase date unable to be nulled in update form [sc-19540]
2022-09-26 13:38:24 -07:00
Katharina Drexel 8316a4eb92 Fixed: #11871 Replacing (deprecated) patchwork/utf8 by polyfill/mbstring. 2022-09-26 12:06:06 +02:00
snipe b4518677bd Merge pull request #11762 from geo-chen/master
correcting default mysql port from 3309 to 3306
2022-09-22 15:12:11 -07:00
Ivan Nieto Vivanco 23cf556a8b Adds cursor:pointer to indicate a clickable link 2022-09-20 22:24:52 -05:00
Ivan Nieto Vivanco c0f83a7927 Delete not necessary conditional 2022-09-20 19:02:01 -05:00
Ivan Nieto Vivanco 5a1062f0f4 Delete debugging symbols (just kidding, it's just a dd() function) 2022-09-20 18:58:31 -05:00
Ivan Nieto Vivanco c32676596c Redirect correctly if not enough license seats exists to be checkout 2022-09-20 18:55:53 -05:00
Ivan Nieto Vivanco f75917d34d Add a link used to clear the purchase date input 2022-09-20 17:53:55 -05:00
Godfrey M c55f2d5417 corrects color for query and results of ldap sync test 2022-09-20 10:35:55 -07:00
Ivan Nieto Vivanco e267f5491a Adds a check for empty location values on import 2022-09-19 19:05:48 -05:00
Godfrey M 571ce5b741 corrects the color choice for the ldap_test_results 2022-09-19 11:59:02 -07:00
snipe 733b0750a2 Merge remote-tracking branch 'origin/develop' 2022-09-16 14:20:25 -07:00
snipe 9369165007 Merge pull request #11842 from snipe/security/license_file_access
Check for `licenses.files` permissions
2022-09-16 14:19:37 -07:00
snipe f75d348dc0 Fixed license policy method
Signed-off-by: snipe <snipe@snipe.net>
2022-09-16 14:06:46 -07:00
snipe dcab1381e7 Check for licenses.files permissions
Signed-off-by: snipe <snipe@snipe.net>
2022-09-16 14:00:27 -07:00
snipe 0924d2144b Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2022-09-15 21:47:14 -07:00
snipe 9cae4f1d1b Merge pull request #11838 from snipe/features/larger_checkboxes_in_lists
Larger checkbox in lists
2022-09-15 21:44:42 -07:00
snipe ca70988879 Larger checkbox in lists
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 21:42:16 -07:00
snipe 421c9baecc # Conflicts:
Signed-off-by: snipe <snipe@snipe.net>
#	public/css/dist/all.css
#	public/css/dist/bootstrap-table.css
#	public/js/dist/bootstrap-table.js
#	public/mix-manifest.json
2022-09-15 20:11:07 -07:00
snipe 5c9e84f663 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 20:09:00 -07:00
snipe fbb5f1445a Merge pull request #11837 from snipe/fixes/disappearing_checkboxes
Downgraded BS Tables
2022-09-15 20:06:42 -07:00
snipe 07e0fec1de Downgraded BS Tables
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 20:05:29 -07:00
snipe c6cbf3712e Merge remote-tracking branch 'origin/develop' 2022-09-15 16:22:47 -07:00
snipe 0f777b3168 Merge pull request #11836 from snipe/fixes/500_if_image_is_missing
Fixed 500 error if uploaded file is missing from asset view
2022-09-15 16:21:13 -07:00
snipe 62ad3fad1c Remove DL button if file doesn’t exist
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 16:11:27 -07:00
snipe eb1e287c15 Better handle missing files
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 16:08:13 -07:00
snipe 3eab44f748 Merge pull request #11835 from snipe/fixes/depreciation_when_no_purchase_date
Fixes 500 in depreciation on asset view when no purchase date
2022-09-15 15:52:58 -07:00
snipe 1885e73704 Ignore warning icon if no purchase date
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 15:42:47 -07:00
snipe 24910433a1 Fixed 500 when depreciation is set but no purchase_date
Signed-off-by: snipe <snipe@snipe.net>
2022-09-15 15:39:47 -07:00
Brady Wetherington 1899e4d1e8 try/catch wrap notifications on checkin/checkout 2022-09-15 13:18:42 -07:00
snipe 481eb2c7f0 Merge remote-tracking branch 'origin/develop' 2022-09-15 11:40:33 -07:00
snipe 51d7f2b97b Merge pull request #11830 from inietov/fixes/default_values_for_checkboxes_unaccessible
Fixed #9801 #11199 Default Values for Checkbox Field Types Unaccessible
2022-09-15 11:28:15 -07:00
Ivan Nieto Vivanco 9b2eda2d70 Save and show the default values properly on custom fields of type checkbox 2022-09-15 11:52:49 -05:00
Ivan Nieto Vivanco 41b75704e3 Removes format when changing to custom fields elements that doesn't need it 2022-09-15 11:21:02 -05:00
Ivan Nieto Vivanco 20220764bb Add possible values for custom fields of type checkbox 2022-09-15 11:18:54 -05:00
snipe abd2349604 Add @rnelsonee as a contributor 2022-09-14 20:08:39 -07:00
snipe ac4f91918e Merge pull request #11771 from rnelsonee/PAT_test
Fixed #11769: PAT Test hardcoded text
2022-09-14 20:01:18 -07:00
snipe 28f0b72bcd Merge remote-tracking branch 'origin/develop' 2022-09-14 19:56:16 -07:00
snipe ad7bc6f38a Merge pull request #11825 from snipe/features/added_applecare_lookup_link
Added Applecare lookup link if manufacturer is apple
2022-09-14 19:54:47 -07:00
snipe 72feaee6c0 Added Applecare lookup link if manufacturer is apple
Signed-off-by: snipe <snipe@snipe.net>
2022-09-14 19:43:48 -07:00
snipe 4ac3650d64 Merge remote-tracking branch 'origin/develop' 2022-09-14 18:21:40 -07:00
snipe 3877770160 Merge pull request #11824 from snipe/fixes/removed_assetlog_from_custom_report
Fixed custom asset report timeout - removed assetlog
2022-09-14 18:20:14 -07:00
snipe 3192a68b06 Pulled assetlog from custom report controller
Signed-off-by: snipe <snipe@snipe.net>
2022-09-14 18:17:52 -07:00
snipe 284b4d869f Merge pull request #11823 from Godmartinz/gh11822_depreciation_calc_off
Fixes depreciation calculations off
2022-09-14 17:39:59 -07:00
Godfrey M 6b6a079440 fixes current value and monthly depreciation on reports and calculations 2022-09-14 17:01:18 -07:00
Godfrey M a0624fe179 reworks the depreciation formula, includes months passed instead of months remaining 2022-09-14 16:00:21 -07:00
snipe d598f75721 Merge pull request #11811 from inietov/fixes/min_qty_not_importing_consumables
Fixed Mini quantity field values are not importing into Snipe-IT
2022-09-14 12:12:52 -07:00
Godfrey M 9b448227f7 tinkering to no avail 2022-09-13 11:40:10 -07:00
Ivan Nieto Vivanco d51eca20f0 Add min_amt field in Consumables and Accessories imports 2022-09-12 18:11:48 -05:00
snipe 9b5790b7e6 Merge pull request #11072 from snipe/fixes/support_apache_24
YOLO
2022-09-12 14:26:43 -07:00
Godfrey M 28bc97f29f one line away from this being over with 2022-09-12 11:40:16 -07:00
snipe a8a00f0a79 Updated prod JS assets
Signed-off-by: snipe <snipe@snipe.net>
2022-09-12 11:08:29 -07:00
snipe cbd16174d8 Merge pull request #11810 from snipe/maintenance/updated_dev_assets
Updated compiled assets
2022-09-12 10:55:40 -07:00
snipe 448aefac28 Updated compiled assets
Signed-off-by: snipe <snipe@snipe.net>
2022-09-12 10:54:54 -07:00
snipe b23cd6d4f0 Merge pull request #11808 from snipe/snyk-upgrade-390057161cf95c21d9a4b53f57207321
[Snyk] Upgrade bootstrap-table from 1.20.2 to 1.21.0
2022-09-11 16:56:22 -07:00
snyk-bot b0ea1a31dc fix: upgrade bootstrap-table from 1.20.2 to 1.21.0
Snyk has created this PR to upgrade bootstrap-table from 1.20.2 to 1.21.0.

See this package in npm:
https://www.npmjs.com/package/bootstrap-table

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-09-11 23:55:26 +00:00
snipe 11a2f96b4f Merge pull request #11806 from snipe/snyk-upgrade-390057161cf95c21d9a4b53f57207321
[Snyk] Upgrade bootstrap-table from 1.20.2 to 1.21.0
2022-09-11 01:30:34 -07:00
snyk-bot 7361977cdc fix: upgrade bootstrap-table from 1.20.2 to 1.21.0
Snyk has created this PR to upgrade bootstrap-table from 1.20.2 to 1.21.0.

See this package in npm:
https://www.npmjs.com/package/bootstrap-table

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-09-10 23:32:02 +00:00
snipe 659703bd7d Merge pull request #11790 from inietov/fixes/double_login_issue_when_switching_users
Fixed Double login when switching users
2022-09-06 17:03:21 -07:00
Ivan Nieto Vivanco 3aff97ace1 Remove the previous user hashed password 2022-09-06 18:43:35 -05:00
Rick Nelson 6e82de2f47 Fixed #11769: PAT Test hardcoded text 2022-09-01 11:21:02 -04:00
snipe ae505ef44d Literally have no idea how this ever worked
Signed-off-by: snipe <snipe@snipe.net>
2022-08-31 19:20:35 -07:00
snipe e86e96e159 Merge pull request #11765 from snipe/fixes/colspan_for_delete_checkboxes
Increased colspan for checkboxes
2022-08-31 13:35:21 -07:00
snipe 93428e1ed4 Increased colspan for checkboxes
Signed-off-by: snipe <snipe@snipe.net>
2022-08-31 13:34:27 -07:00
Godfrey M 193b31e427 select options working, testing sync then done 2022-08-31 12:58:33 -07:00
Godfrey M 70ac8af9c4 . 2022-08-31 09:53:20 -07:00
BasO12 61e1650542 Add files via upload 2022-08-31 13:08:09 +02:00
BasO12 ab54ac9408 Add files via upload 2022-08-31 13:07:05 +02:00
snipe dcbd407698 Merge pull request #11661 from inietov/fixes/notifications_asset_acceptance
Send notifications when Acceptance Assets actions occur [sc-9917]
2022-08-30 12:14:58 -07:00
geo-chen 4e7fea3468 correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:40:49 +08:00
geo-chen 3ef25c3a4d correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:40:35 +08:00
geo-chen 22596f4bb8 correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:40:19 +08:00
geo-chen 8fdca7f42b correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:40:04 +08:00
geo-chen 1f04cfdb44 correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:39:50 +08:00
geo-chen 04c130e596 correcting default mysql port from 3309 to 3306
installation breaks using default config and manual edits to correct the port is currently required
2022-08-30 20:39:34 +08:00
snipe 7fa9214beb Merge pull request #11489 from Godmartinz/bug/sc-19333/expiring-assets-report-email-content-ordering
Fixed the order expiring assets are listed in notifications
2022-08-29 12:37:01 -07:00
Godfrey M ea63049b4b removed redundancy with raw query 2022-08-29 12:33:51 -07:00
Godfrey M 0c362e8b57 gets the groups selector to appear but options are blank 2022-08-29 12:09:56 -07:00
snipe e94b5ac435 Merge pull request #11758 from snipe/security/xss_on_dashboard_note
Fixed possible XSS on dashboard note
2022-08-29 11:50:48 -07:00
snipe 9cf5f30c77 Set safeMode to true and use helper for all parsedown
Signed-off-by: snipe <snipe@snipe.net>
2022-08-29 11:26:47 -07:00
snipe e8f2e50ada Add @dsferruzza as a contributor 2022-08-29 10:10:13 -07:00
snipe 3527902ba3 Merge pull request #11752 from dsferruzza/fixes/s3-file-size
Fixed #11742: display correct file sizes when using S3(-like) storage
2022-08-29 10:08:10 -07:00
David Sferruzza f60ea9581d Fixed #11742: display correct file sizes when using S3(-like) storage 2022-08-28 12:07:14 +02:00
Chris Hartjes 74fe3dc733 Updated testing-related documentation 2022-08-26 13:55:12 -04:00
snipe 96ec96ff7f Merge pull request #11737 from inietov/fixes/validation_error_still_without_required_rule
Fixed Validation error when empty default customfield values
2022-08-25 17:54:04 -07:00
snipe 4fd1827576 Merge pull request #11738 from inietov/fixes/problem_checkin_and_delete_users
Fixed #11695 Problem with checkin all and delete user.
2022-08-25 17:52:51 -07:00
Ivan Nieto Vivanco 0d4e9c183b Save correct id in action log if the bulk-checkin is of type license 2022-08-25 19:16:48 -05:00
Ivan Nieto Vivanco 1ff2d15c4a Replace 'required' rule with 'nullable' to allow blank default customfields values 2022-08-25 18:16:50 -05:00
Godfrey M fc6fefdb4e adds migration, variables, checkbox,working on groups 2022-08-25 15:19:38 -07:00
snipe 482a7b2a3a Merge pull request #11700 from inietov/fixes/unaccepted_assets_reminder_500
Fixed 500 error when sending unaccepted assets reminder
2022-08-25 14:00:00 -07:00
snipe 6f0f6c8042 Don’t prevent deletion if user has consumables checked out
Signed-off-by: snipe <snipe@snipe.net>
2022-08-25 12:51:02 -07:00
snipe 4cc9b5a5a2 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-08-25 12:34:38 -07:00
snipe 8720a58b51 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-08-25 12:34:02 -07:00
snipe 22710afee3 Merge remote-tracking branch 'origin/develop' 2022-08-25 12:28:06 -07:00
snipe 968f8fb554 Merge pull request #11735 from snipe/security/logout_other_devices
Fixed: Log user out of other devices when they change their password
2022-08-25 12:26:13 -07:00
snipe 6fde72a693 Log user out of other devices when they change their password
Signed-off-by: snipe <snipe@snipe.net>
2022-08-25 12:24:26 -07:00
snipe afb7fa2e81 Merge remote-tracking branch 'origin/develop' 2022-08-24 18:12:26 -07:00
snipe c9ef49ec65 Merge pull request #11731 from snipe/fixes/add_sig_column_to_user_history
Fixed #10593 - added signature column to user history
2022-08-24 18:08:41 -07:00
snipe 36ab794adc Added signature field to user history
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 18:05:43 -07:00
snipe 2ad9c39090 Merge pull request #11730 from inietov/fixes/importing_licenses_field_mismatch
Fixed #11679 Importing Licenses - Field Mismatch
2022-08-24 17:31:12 -07:00
Ivan Nieto Vivanco c59fd7b8da Fix importer field mapping for command line 2022-08-24 19:20:23 -05:00
snipe 44e598b0dc Updated branch name in version
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 17:17:38 -07:00
snipe ffd38292cf Merge pull request #11729 from uberbrady/improve_docker_assetmodels_restore
Fixed #11708 - pre-create private_storage directories for Docker restores
2022-08-24 17:16:21 -07:00
snipe 660c1429b2 Merge pull request #11728 from snipe/fixes/adds_style_to_readonly_date_fields
Added style to readonly date fields
2022-08-24 17:14:16 -07:00
Brady Wetherington 8ad5fb34d3 Fixed #11708 - pre-create private_storage directories for Docker restores 2022-08-24 17:11:21 -07:00
snipe a5fd9ebbb1 Added style to readonly datetime picker field
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 17:10:15 -07:00
snipe 49d2aef831 Merge pull request #11726 from inietov/fixes/customfields_date_format_issue
Fixed #11709 Dates in custom fields not always stored in the correct format
2022-08-24 16:46:35 -07:00
snipe 74f5980af7 Merge pull request #11724 from inietov/fixes/remove_required_rule_for_default_custom_values
Fixed Validation error when creating custom fields' default values
2022-08-24 16:44:46 -07:00
snipe 1a47e1000d Merge pull request #11727 from snipe/security/updated_compiled_assets
Updated compiled assets
2022-08-24 16:43:08 -07:00
snipe ab60fa08df Updated dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 16:38:11 -07:00
snipe 8a312f69a6 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 16:37:22 -07:00
Ivan Nieto Vivanco 581cae94ab Add readonly property to datepickers 2022-08-24 18:21:54 -05:00
Ivan Nieto Vivanco 6e85c2e5cb Delete unused import 2022-08-24 16:30:25 -05:00
Ivan Nieto Vivanco 30d0125cbd Remove the rule 'required' for default values, if custom field is obligatory 2022-08-24 16:18:11 -05:00
snipe e2dec5d5d7 Merge pull request #11723 from snipe/fixes/fail_with_error_when_uploaded_file_does_not_exist
Fixed crash on Asset View if file doesn’t exist on server
2022-08-24 13:50:26 -07:00
snipe af34fc207c Suppress error output if file doesn’t exist on server
Signed-off-by: snipe <snipe@snipe.net>
2022-08-24 13:47:56 -07:00
snipe cca531f8ca Add @sunflowerbofh as a contributor 2022-08-22 16:32:30 -07:00
snipe 45f17fea8a Merge pull request #11510 from sunflowerbofh/tmp-ldap
Fixed #11509 allow-ldap-anonymous-bind
2022-08-22 16:32:07 -07:00
snipe 3ac84eab58 Merge pull request #11651 from inietov/fixes/activity_report_search
Fixed Search in activity report for full name in relation
2022-08-22 16:23:50 -07:00
snipe 15af4ea56e Add @kylegordon as a contributor 2022-08-22 16:21:20 -07:00
snipe d649c65508 Merge pull request #11669 from kylegordon/master
Declare DB_PORT in all .env files
2022-08-22 16:20:40 -07:00
snipe 0965ac9592 Merge pull request #11680 from snipe/snyk-upgrade-3dd3b8528a5a6c5104f99fc833e3820e
[Snyk] Upgrade @fortawesome/fontawesome-free from 6.1.1 to 6.1.2
2022-08-22 16:18:15 -07:00
snipe bfadc69d73 Merge pull request #11681 from snipe/snyk-upgrade-ce70c2a6ece4c881ee4f6267e992332c
[Snyk] Upgrade webpack from 5.73.0 to 5.74.0
2022-08-22 16:17:53 -07:00
snipe 41be3f7208 Add @julian-piehl as a contributor 2022-08-22 16:17:24 -07:00
snipe 906a36dc1a Merge pull request #11703 from julian-piehl/fixes/wrong-trans-string
Fixed Translation String: wrong key at request canceled message
2022-08-22 16:16:10 -07:00
snipe aba8449dc6 Merge pull request #11707 from wewhite/manager_name
Fixed #11706 Manager name
2022-08-22 16:15:52 -07:00
snipe 861283b874 Merge pull request #11712 from Godmartinz/gh11711Admin_options_disappear
Fixed #11711 clearfix missing on admin settings page  to prevent blanking divs
2022-08-22 16:15:06 -07:00
Godfrey M 2994c3613a adds clearfix to settings page 2022-08-22 10:46:15 -07:00
Warren White ba7d6dde3f Fixed #11706: changes the display of managers username to First Last name 2022-08-19 10:17:25 -07:00
Warren White 4b9a91f55b Fixed #10565, #11086: correctly looks up Manager DN from AD Manager attribute and sets manager id 2022-08-19 09:09:03 -07:00
Peace 94bbf2bf2f fixed translation string for canceled requests 2022-08-19 13:59:01 +02:00
Ivan Nieto Vivanco e5cc6ec972 Fixes error 500 if checkout_acceptances table have a created_at null column 2022-08-17 22:02:13 -05:00
snyk-bot e97c526050 fix: upgrade webpack from 5.73.0 to 5.74.0
Snyk has created this PR to upgrade webpack from 5.73.0 to 5.74.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-08-15 23:41:31 +00:00
snyk-bot 7b45328fcc fix: upgrade @fortawesome/fontawesome-free from 6.1.1 to 6.1.2
Snyk has created this PR to upgrade @fortawesome/fontawesome-free from 6.1.1 to 6.1.2.

See this package in npm:
https://www.npmjs.com/package/@fortawesome/fontawesome-free

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-08-15 23:41:27 +00:00
snipe 40bc13a946 Merge pull request #11676 from snipe/fixes/added_category_to_model_info
Adds the category in the side info on Models > View
2022-08-14 14:03:09 -07:00
snipe 368bd5da3f Adds the category in the side info on Models > View
Signed-off-by: snipe <snipe@snipe.net>
2022-08-14 14:01:58 -07:00
snipe 1763bbfbd3 Merge pull request #11662 from octobunny/patch-1
Fixed #6899 Docker container's php configuration isn't congruent with snipe-it uploads setting size.
2022-08-14 13:46:38 -07:00
snipe 7b44afc43c Merge pull request #11666 from snipe/features/add_null_option_for_purchase_expected_dates
Added `null` option for `purchase_date` and `expected_checkin` dates
2022-08-14 13:43:03 -07:00
snipe 13b6c281df Merge pull request #11675 from snipe/revert-11663-fixes/user_cant_be_deleted_if_has_consumables
Revert "Prevent to delete a user if still has consumables associated to them"
2022-08-14 13:42:45 -07:00
snipe 5feea17f8d Revert "Prevent to delete a user if still has consumables associated to them" 2022-08-14 13:42:14 -07:00
snipe 60d1578a01 Merge pull request #11663 from inietov/fixes/user_cant_be_deleted_if_has_consumables
Prevent to delete a user if still has consumables associated to them
2022-08-14 13:41:09 -07:00
Chris Hartjes 07585809b3 Got unit and browser tests working, added documentation 2022-08-12 13:00:26 -04:00
Kyle Gordon 98a111796b Declare DB_PORT in all .env files 2022-08-12 15:07:02 +01:00
snipe 7b3be076b4 Make location field the same width
Signed-off-by: snipe <snipe@snipe.net>
2022-08-11 18:38:34 -07:00
snipe 2c68ec927a Use trans_choice for string
Signed-off-by: snipe <snipe@snipe.net>
2022-08-11 18:30:59 -07:00
snipe a0ba33ed7c Added checkboxes
Signed-off-by: snipe <snipe@snipe.net>
2022-08-11 18:25:22 -07:00
snipe 70bb4cd746 Added translation
Signed-off-by: snipe <snipe@snipe.net>
2022-08-11 18:25:15 -07:00
snipe 91e824c5b0 Check for nullifying checkboxes
Signed-off-by: snipe <snipe@snipe.net>
2022-08-11 18:25:07 -07:00
snipe 491cdd4de6 Merge pull request #11664 from snipe/snyk-upgrade-bcc306620433a4ebeaaed8c3e4d4c9eb
[Snyk] Upgrade acorn from 8.7.1 to 8.8.0
2022-08-11 16:59:45 -07:00
snyk-bot 3454cdd2a0 fix: upgrade acorn from 8.7.1 to 8.8.0
Snyk has created this PR to upgrade acorn from 8.7.1 to 8.8.0.

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

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-08-11 23:58:21 +00:00
Ivan Nieto Vivanco db53a00d3f Prevent to delete a user if still has consumables associated to them 2022-08-11 17:01:52 -05:00
octobunny 8324b94022 Change PHP post_max_size
Must change post_max_size in addition to upload_max_filesize to increase total upload size to greater than 8MB.
2022-08-11 17:07:46 -04:00
Ivan Nieto Vivanco a33ca39237 Figure out declined notifications 2022-08-11 16:00:21 -05:00
Ivan Nieto Vivanco 98bcd82108 Add the mail recipient from configuration in the CheckoutAcceptance model 2022-08-11 15:33:18 -05:00
Ivan Nieto Vivanco d2c486bb1e Create the mail template for the acceptance 2022-08-11 15:28:30 -05:00
snipe 8c579d693a Merge pull request #11660 from Godmartinz/departments_location_and_company_updates_with_null
Fixes Departments update/store  to allow company and/or location ids to be null
2022-08-11 13:04:45 -07:00
Godfrey M 814992eb7d allows company and location ids to be null 2022-08-11 12:47:40 -07:00
Ivan Nieto Vivanco 267997f0a6 Customize the notifications with the needed data 2022-08-11 14:01:11 -05:00
Ivan Nieto Vivanco 0172fe6403 Add Notifiable trait to the CheckoutAcceptance Model 2022-08-11 13:02:25 -05:00
Ivan Nieto Vivanco 509bbbc685 Create Notifications classes for accepted and declined and add some necesary lang strings 2022-08-11 13:01:21 -05:00
Ivan Nieto Vivanco 8cee5060af Remove unused DB statement 2022-08-10 19:16:04 -05:00
Ivan Nieto Vivanco a7de97f060 Found a better place for the where condition 2022-08-10 19:13:28 -05:00
Ivan Nieto Vivanco c1074000f9 Add a concat to search for full name when the relationship search in the users table 2022-08-10 18:27:28 -05:00
snipe c7d9baad8e Merge remote-tracking branch 'origin/master' into develop 2022-08-10 16:11:29 -07:00
snipe c77d763f05 Merge pull request #11650 from snipe/fixes/6877_add_notes_to_consumables
Fixed #6877 - Added notes to consumables, components on checkout
2022-08-10 16:11:08 -07:00
snipe ef099aa644 Reverted notes to note since pivot
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 16:09:56 -07:00
snipe acd666fdf5 Added notes to user consumables tab
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:34:07 -07:00
snipe 8de7e9a2ab Use route name in case the user biffs the checkout twice
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:17:52 -07:00
snipe dd0260c3be Use old note on validation failure
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:15:29 -07:00
snipe 512348cc5a Added withInput()
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:15:09 -07:00
snipe fb3d7bf82e Made button wider
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:07:58 -07:00
snipe e3293151a2 Added note on checkout
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:04:59 -07:00
snipe 3ec77724d8 Added note pivot
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:04:34 -07:00
snipe 024a014298 Changed notes to note
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:04:19 -07:00
snipe c1e5d03340 Added pivot for note
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:03:41 -07:00
snipe fb2fe61daf Use a less stupid URL for this endpoint
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:03:26 -07:00
snipe 0d9eccb7eb Addeed note field
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 15:03:12 -07:00
snipe f9956cc5df Added DB migration
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 14:54:33 -07:00
snipe f7cceaedd5 Merge pull request #11649 from snipe/features/add_url_in_export
Fixed #8928 - add URL and ID to custom asset report
2022-08-10 13:58:22 -07:00
snipe e7c47408a7 Derp
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 13:57:42 -07:00
snipe 637604dfaf Fixed #8928 - add URL and ID to custom asset report
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 13:51:47 -07:00
snipe f66df4d468 Merge pull request #11648 from uberbrady/reimplement_active_flag
Fixed the active flag to be as it was in later v5 releases
2022-08-10 13:32:52 -07:00
Brady Wetherington b6adfa294c Fixed the active flag to be as it was in later v5 releases
Originally implemented here:

https://github.com/snipe/snipe-it/pull/10610/files
2022-08-10 12:55:30 -07:00
snipe f374f231d4 Added ERD link
Signed-off-by: snipe <snipe@snipe.net>
2022-08-10 11:37:17 -07:00
snipe d4e60a46c1 Merge remote-tracking branch 'origin/develop' 2022-08-09 15:15:31 -07:00
snipe a834ac6ec2 Merge pull request #11642 from Godmartinz/monthly_depreciation_calculation
Fixes Monthly depreciation calculation if EOL is blank
2022-08-09 15:14:57 -07:00
Godfrey M 92e6ea96b2 if eol is missing from asset model monthly depreciation will be recalculated 2022-08-09 15:05:15 -07:00
snipe de449fd1c2 Merge pull request #11635 from exula/fix/missing_closing_div_in_general_admin_settings
Added a closing div tag around the mail text help block, this was cau…
2022-08-09 11:07:19 -07:00
Brad Coudriet 77a1fcb1fc There was actually a missing p tag too 2022-08-09 06:36:53 -04:00
Brad Coudriet 0cf0598936 Added a closing div tag around the mail text help block, this was causing labels further down the page to be formatted in correctly 2022-08-09 06:32:03 -04:00
snipe 80d91c0c51 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-08-08 15:33:10 -07:00
snipe c39bf7b7e6 Added German (Informal) to select list
Signed-off-by: snipe <snipe@snipe.net>
2022-08-08 15:30:58 -07:00
snipe 9db0b038a5 Updated translation strings
Signed-off-by: snipe <snipe@snipe.net>
2022-08-08 15:29:28 -07:00
snipe 4f4c4ed5be Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-08-08 14:35:04 -07:00
snipe 51f7298720 Merge remote-tracking branch 'origin/develop' 2022-08-05 18:16:20 -07:00
snipe bc4032c2cd Merge pull request #11617 from inietov/fixes/components_wrong_remaining_inventory
Fixed wrong calculation of assigned components
2022-08-05 18:05:21 -07:00
Ivan Nieto Vivanco c055c91739 Change db query for an existing method 2022-08-04 09:20:20 -05:00
Ivan Nieto Vivanco ea8f12579d Calculate the proper amount of assigned components 2022-08-04 07:58:25 -05:00
snipe 88db2d9e18 Merge remote-tracking branch 'origin/develop' 2022-08-03 17:57:07 -07:00
snipe 5f93d7b3be Merge pull request #11615 from inietov/fixes/autoincrement_in_importer
Fix auto incrementing in CSV importer [sc-19366]
2022-08-03 17:50:23 -07:00
snipe 1875ed55cc Merge pull request #11612 from snipe/fixes/improved_report_search
Added relations to report search
2022-08-03 17:49:59 -07:00
Ivan Nieto Vivanco 9f0ecba9b9 Add autoincrementing asset tags to the import if the CSV column is empty 2022-08-03 12:48:48 -05:00
snipe 9acfceba29 Added relations to report search
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 23:50:10 -07:00
snipe 92bf8b4436 Merge remote-tracking branch 'origin/develop' 2022-08-02 20:22:02 -07:00
snipe b52c00d49b Merge pull request #11611 from snipe/fixes/added_configuration_change_to_maintenance_types
Added configuration change to maintenance types
2022-08-02 20:21:25 -07:00
snipe 20fcf7a1e9 Added configuration change to maintenance types
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 20:19:43 -07:00
snipe 095dd3ecf2 Added configuration, PAT test strings
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 20:19:28 -07:00
snipe 5a1b8bc4b6 Fixed icheck checkbox class
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 20:19:19 -07:00
snipe eadb36cb26 Merge remote-tracking branch 'origin/develop' 2022-08-02 20:00:13 -07:00
snipe 6eac133caf Merge pull request #11610 from snipe/fixes/adds_deleted_at_to_custom_report_export
Added deleted at to custom report export
2022-08-02 19:59:39 -07:00
snipe cc92d342ea Added deleted at value
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:58:37 -07:00
snipe 02caa13222 Removed debugging
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:58:30 -07:00
snipe 975b4dee2f Added deleted header
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:58:17 -07:00
snipe 65f0a3f535 Merge pull request #11609 from snipe/fixes/checkboxes_on_custom_report
Fixed labels on radio buttons in custom report
2022-08-02 19:54:14 -07:00
snipe 9ae7c66b77 Fixed indenting
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:50:21 -07:00
snipe 77ab4ac1b5 Fixed labels on radio buttons in custom report
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:48:41 -07:00
snipe b0e66ae445 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	resources/views/locations/print.blade.php
2022-08-02 19:41:17 -07:00
snipe 5fe8db541e Merge pull request #11608 from snipe/features/add_time_diff_to_eol
Added time diff to EOL in asset view
2022-08-02 19:40:10 -07:00
snipe 87bed9b294 Fixed typo in code comments
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:24:46 -07:00
snipe da1c1dbdd9 Added warning icon
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:19:08 -07:00
snipe 56b6904564 Added time difference
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:13:02 -07:00
snipe 10e64deafe Updated method name in mail
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:12:44 -07:00
snipe ac72b69ece Update method name
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:12:28 -07:00
snipe 8e18ce74b2 Update method name
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 19:12:18 -07:00
snipe 254ce72415 Add @vickyjaura183 as a contributor 2022-08-02 17:20:51 -07:00
snipe 1b657ee995 Merge pull request #11601 from vickyjaura183/bugfix/error_404_bulkcheckout
Error 404 fixed on submitting without mandatory field
2022-08-02 17:19:22 -07:00
snipe 71facb1850 Merge pull request #11596 from snipe/fixes/unique_undeleted_for_custom_fields
Use unique_undeleted instead of unique for custom fields
2022-08-02 17:16:12 -07:00
snipe 8d8c502546 Merge pull request #11605 from snipe/fixes/really_disable_consumable_checkout
Disallow checkout if qty = 0
2022-08-02 12:31:29 -07:00
snipe 0a9bd07f20 Disallow checkout if qty = 0
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 12:27:58 -07:00
snipe 688577c1ed Merge pull request #11604 from snipe/fixes/only_show_requested_if_requestable_perms
Hide requested assets if the user cannot see requestable items
2022-08-02 11:49:22 -07:00
snipe 8027039754 Hide requested assets if the user cannot see requestable items
Signed-off-by: snipe <snipe@snipe.net>
2022-08-02 11:48:45 -07:00
snipe 031b7998c9 Merge pull request #11603 from inietov/fixes/actions_on_licenses
Use apropiate string for license actions
2022-08-02 10:40:20 -07:00
Ivan Nieto Vivanco 13053b85ef Remove Actions button and pass the correct variable to the routes 2022-08-02 12:37:27 -05:00
snipe e3b13143bf Merge pull request #11594 from Godmartinz/adds_deleted_asset_options_to_custom_reports
Adds options to include Deleted assets to custom asset reports
2022-08-02 10:33:57 -07:00
Godfrey M e150ab58e9 reworded trans 2022-08-02 10:31:06 -07:00
Godfrey M ff080a2d8f replace checkboxes with radiobuttons 2022-08-02 10:27:55 -07:00
Ivan Nieto Vivanco a63d00bb5c Use apropiate string for license actions 2022-08-02 11:55:11 -05:00
vishalkumar183 96b40a5edd Error 404 fixed on sumitting witout mandtory field 2022-08-02 18:44:16 +05:30
Katharina Drexel 8596c54d6a Fixing query order (otherwise you run into app_key exception before anonymous ldap applied).
Signed-off-by: Katharina Drexel <katharina.drexel@bfh.ch>
2022-08-02 14:24:00 +02:00
snipe e07532dd1b Applied master fix to develop
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 18:55:28 -07:00
snipe 04a467bdc7 One more
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 18:53:00 -07:00
snipe 06d60bb1d1 Applied date formatter PR to master
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 18:49:56 -07:00
snipe 9c6c01bab1 Merge pull request #11597 from snipe/fixes/missed_date_formatting_on_print
Fixed date format for Current Date output on location print assigned
2022-08-01 18:48:41 -07:00
snipe 4133ac6ef0 Applied date formatter to Current Date output on location print assigned
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 18:47:29 -07:00
snipe 4834c33861 Missed a named route
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 18:43:54 -07:00
snipe 904b5c2886 Merge pull request #11595 from snipe/fixes/fix_routes_for_optimize
Fixed routes for optimize
2022-08-01 17:55:34 -07:00
snipe e79a819724 Fixed inconsistency in naming
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 17:45:39 -07:00
snipe 0fdbd410b6 Use unique_undeleted instead of unique for custom fields
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 17:10:39 -07:00
snipe af7ccf3beb Handle logout route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:17:40 -07:00
snipe 3e48f436af Handled user route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:13:30 -07:00
snipe 5e488bd81f Handle components route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:10:39 -07:00
snipe 53ff28d2b0 Handle consumables route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:07:56 -07:00
snipe 4a4636bd03 Handle accessories route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:06:28 -07:00
snipe 744d0d299e Handle model route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 16:03:45 -07:00
snipe b035003546 Handled hardware route names
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 15:59:54 -07:00
Godfrey M 842dafefec adds options to include Deleted assets to custom asset reports 2022-08-01 14:52:12 -07:00
snipe 375963f92d Merge remote-tracking branch 'origin/develop' 2022-08-01 14:08:16 -07:00
snipe a51b446a10 Merge pull request #11578 from snipe/fixes/conditionally_add_nbsp
Switched to conditionally adding the nbsp; that the table needs for proper layout if cell is empty
2022-08-01 14:07:50 -07:00
snipe 371aba9912 Merge pull request #11593 from snipe/fixes/add_bulk_assets_to_company_view
Added bulk edit to company view
2022-08-01 14:07:14 -07:00
snipe 8b30992a11 Added bulk edit to company view
Signed-off-by: snipe <snipe@snipe.net>
2022-08-01 14:06:18 -07:00
snipe 33de45d8fb Swirtched to conditionally adding the nbsp; that the table needs for proper layout if cell is empty
Signed-off-by: snipe <snipe@snipe.net>
2022-07-29 00:57:20 -07:00
snipe d7d0056b73 Merge remote-tracking branch 'origin/develop' 2022-07-27 15:10:38 -07:00
snipe 7d2fcef807 Merge pull request #11562 from uberbrady/clarify_logging
Fixed inconsistent `*_LOG_LEVEL` variables; set reasonable defaults
2022-07-25 20:02:37 -07:00
Brady Wetherington 1981b79557 Good catch! APP_LOG -> LOG_CHANNEL 2022-07-25 19:57:14 -07:00
Brady Wetherington 0c7d4a709a Cleaned up more logging options 2022-07-25 19:25:06 -07:00
snipe 6c8d226b21 Merge pull request #11561 from snipe/features/added_perl_module_link
Added link to SEDC / perl-www-snipe
2022-07-25 18:54:57 -07:00
snipe 211bbeda5b Added link to SEDC / perl-www-snipe
Signed-off-by: snipe <snipe@snipe.net>
2022-07-25 18:53:17 -07:00
Brady Wetherington 7057cb0104 Make all *_LOG_LEVEL vars consistent; set default to 'warning' 2022-07-25 18:44:37 -07:00
snipe 658edb64d6 Merge remote-tracking branch 'origin/develop' 2022-07-22 19:06:28 -07:00
snipe dc06f14505 Merge pull request #11554 from snipe/security/upgrade_dompdf
Bumped packages
2022-07-22 18:21:51 -07:00
snipe f446314ce6 Merge pull request #11547 from snipe/fixes/midnight_timestamp
Applies current time to checkin date
2022-07-22 17:58:45 -07:00
snipe 443b1df5e1 Bumped packages
Signed-off-by: snipe <snipe@snipe.net>
2022-07-22 17:55:19 -07:00
snipe 3c22e0d203 Merge remote-tracking branch 'origin/develop' 2022-07-22 17:28:43 -07:00
snipe d636ad8e09 Merge pull request #11553 from snipe/security/upgrade_imagemin
Upgraded imagemin
2022-07-22 17:27:35 -07:00
snipe adfdbf3d44 Upgraded imagemin
Signed-off-by: snipe <snipe@snipe.net>
2022-07-22 17:26:47 -07:00
snipe 8b03abde8d Production assets for dark skin fix
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-green-dark.css
#	public/css/dist/skins/skin-green-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2022-07-22 15:39:46 -07:00
snipe 67320dc024 Merge pull request #11551 from snipe/fixes/dark_skin_dropdowns
Fixed #11549 - dark skin dropdown menu fixes
2022-07-22 15:38:02 -07:00
snipe c5530104ff Fixed #11549 - dark skin dropdowbn menu fixes
Signed-off-by: snipe <snipe@snipe.net>
2022-07-22 15:36:51 -07:00
snipe 78097df7ff Aplpies current time to checkin date
Signed-off-by: snipe <snipe@snipe.net>
2022-07-21 21:45:25 -07:00
snipe 072e6029b6 Merge remote-tracking branch 'origin/develop' 2022-07-21 12:20:24 -07:00
snipe 5926441984 Merge pull request #11542 from snipe/features/users_checkin_without_delete
Features/users checkin without delete
2022-07-20 18:59:45 -07:00
snipe a1fe2a8d58 Fixed translation reference
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 18:01:55 -07:00
snipe 25cc46e416 Fixed button string
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 18:01:41 -07:00
snipe 458d61fafe Front-end updates for checkin without delete
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 17:57:39 -07:00
snipe 32010d5387 Updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 17:57:27 -07:00
snipe 7313bca403 Checkin without deleting
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 17:57:19 -07:00
snipe b7c7e6c623 Added/updated language strings
Signed-off-by: snipe <snipe@snipe.net>
2022-07-20 17:56:58 -07:00
snipe 0b4d243bf0 Merge pull request #11541 from Godmartinz/gh11540_Error_405_when_checking_out_Accessory
Fixes #11540 - accessory api routes from get to posts
2022-07-20 14:14:15 -07:00
Godfrey M 377c0e7075 fixes component routes 2022-07-20 13:41:35 -07:00
Godfrey M 0c4c4fc352 changes api checkin and checkout routes to post 2022-07-20 11:52:54 -07:00
Katharina Drexel 9d627936e6 Fixed #11509: Allow LDAP anonymous bind. 2022-07-20 17:24:20 +02:00
snipe 29a32c4726 Merge remote-tracking branch 'origin/develop' 2022-07-19 12:46:05 -07:00
snipe e72c4f989f Merge pull request #11528 from uberbrady/upgrade_laravel_scim_server
Upgraded our fork of laravel-scim-server to better support scim creates
2022-07-18 19:56:06 -07:00
snipe 0d656e3963 Production assets
Signed-off-by: snipe <snipe@snipe.net>
2022-07-18 17:29:37 -07:00
snipe 50ce471dc6 Production assets
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/js/build/app.js
#	public/js/dist/all.js
#	public/mix-manifest.json
2022-07-18 17:29:29 -07:00
snipe 8113838eee Merge pull request #11531 from snipe/security/upgrade_jquery_ui
Upgraded jquery-UI
2022-07-18 17:28:22 -07:00
snipe a92bb80055 Upgraded jquery-UI
Signed-off-by: snipe <snipe@snipe.net>
2022-07-18 17:27:54 -07:00
snipe e9121c15d8 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-07-18 16:50:53 -07:00
snipe 43bd00da86 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-07-18 16:50:12 -07:00
snipe d124c89ced Moved session driver setting to be more clear
Signed-off-by: snipe <snipe@snipe.net>
2022-07-18 16:47:46 -07:00
Brady Wetherington b2112e6792 Whoops, bump version to have the right syntax! 2022-07-18 15:16:45 -07:00
Brady Wetherington 250db10249 Upgrade our fork of laravel-scim-server to better support scim creates 2022-07-18 15:05:42 -07:00
snipe ff5d64fcbf Merge remote-tracking branch 'origin/develop' 2022-07-18 12:15:44 -07:00
snipe ec01aadbe4 Merge pull request #11526 from snipe/fixes/use_icheck_on_custom_report
Use icheckbox formatting on BOM and archived checkboxes
2022-07-18 12:13:27 -07:00
snipe f0a9de72b1 Use icheckbox formatting on BOM and archived checkboxes
Signed-off-by: snipe <snipe@snipe.net>
2022-07-18 12:12:22 -07:00
snipe 145c191a65 Merge remote-tracking branch 'origin/develop' 2022-07-15 19:17:04 -07:00
snipe 5cb5ef249b Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-07-15 19:16:54 -07:00
snipe ea38cef48c Merge remote-tracking branch 'origin/develop' 2022-07-15 19:15:31 -07:00
snipe 4808185b5c Added link to MosyleSnipeSync
Signed-off-by: snipe <snipe@snipe.net>
2022-07-15 19:15:19 -07:00
snipe b3d65b5703 Merge remote-tracking branch 'origin/develop' 2022-07-15 18:53:20 -07:00
snipe 0f38714e21 Merge pull request #11517 from snipe/fixes/small_changes_to_gh_actions_configs
Changed some autolabeler and code owners
2022-07-15 18:53:01 -07:00
snipe 7a099bc268 Changed some autolabeler and code owners
Signed-off-by: snipe <snipe@snipe.net>
2022-07-15 18:51:57 -07:00
snipe 6f1f6c75e6 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2022-07-15 17:11:55 -07:00
snipe 40d5c37aea Merge pull request #11516 from snipe/fixes/11508_alert_font_size
Fixed #11508 - font size in alert menu
2022-07-15 17:10:26 -07:00
snipe 58499c2322 Fixed #11508 - font size in alert menu
Signed-off-by: snipe <snipe@snipe.net>
2022-07-15 17:09:17 -07:00
snipe 6428dc5cd2 Removed duplicate supplier_id
Signed-off-by: snipe <snipe@snipe.net>
2022-07-13 13:08:15 -07:00
snipe 5f5ff04636 Merge pull request #11502 from mikeroq/fixes/eula_download_if_app_locale_is_not_en
Fixes #11496 - Wrong URL generated for download of asset acceptance PDF if locale was not en
2022-07-12 16:18:59 -07:00
mikeroq f21824a8e2 Changed comparing the action type from translated in presenter to actual value 2022-07-12 17:59:03 -05:00
snipe 0ccd7e09de Merge pull request #11488 from Godmartinz/feature/sc-19107/add-box-to-custom-reports-to-not-include
adds a checkbox to exclude archived assets from custom reports
2022-07-12 12:59:18 -07:00
Godfrey M 27039325f3 removed comments, because I forgot 2022-07-12 12:41:07 -07:00
Godfrey M 58c54cc3dc uses notArchived scope instead now 2022-07-12 12:20:11 -07:00
Godfrey M 48349071ed accounts for status_id as well 2022-07-12 09:46:44 -07:00
snipe bb5ac900ec Merge pull request #11492 from mikeroq/fixes/email_all_assigned_to_user_with_no_email
Fixes "email list of all assigned" apparently being successful even if the user has no email address
2022-07-11 18:27:01 -07:00
mikeroq 5efe45226d Fixes Email List of All Assigned being "successful" when the user has no email
Added check in view to disable button if there is no email
Added translation for title on disabled button and for email check in controller
Fixed missing trans for user not found message
2022-07-11 20:02:10 -05:00
snipe a0183ff56f Merge remote-tracking branch 'origin/develop' 2022-07-11 17:11:44 -07:00
snipe bb091760af Fixedd unclosed brace
Signed-off-by: snipe <snipe@snipe.net>
2022-07-11 17:11:28 -07:00
snipe 78d13871eb Merge pull request #11458 from snipe/dependabot/github_actions/codacy/codacy-analysis-cli-action-4.1.0
Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.1.0
2022-07-11 16:34:51 -07:00
snipe fc5cf3e291 Merge pull request #11483 from snipe/fixes/migrations_on_restore
Fixes - migrations on restore
2022-07-11 16:34:06 -07:00
snipe 3182f251e1 Merge remote-tracking branch 'origin/develop' 2022-07-11 16:26:14 -07:00
snipe d6ba8655bb Merge pull request #11490 from snipe/fixes/print_assigned_sig_broken
Fixed - print assigned sig broken
2022-07-11 14:48:25 -07:00
snipe 8114d01799 Only show sig file if there is a value for accepted sig
Signed-off-by: snipe <snipe@snipe.net>
2022-07-11 14:46:45 -07:00
Godfrey M 309229619b fixes the order expiring assets are listed in notifications 2022-07-11 12:25:38 -07:00
Godfrey M 75844c5942 adds a checkbox to exclude archived assets from custom reports 2022-07-11 09:56:58 -07:00
snipe 78d5c37267 Merge pull request #11484 from mikeroq/fixes/delete_file_modal_on_licenses
Fixes license file(s) delete modal showing entire model data instead of just the name
2022-07-10 13:23:03 -07:00
mikeroq 397e89cbed Fixes modal showing entire model data instead of just the name 2022-07-09 14:09:40 -05:00
snipe 2518e2f0ee Removed > 300
Signed-off-by: snipe <snipe@snipe.net>
2022-07-08 17:09:56 -07:00
snipe e833052e8e Check for column
Signed-off-by: snipe <snipe@snipe.net>
2022-07-08 16:46:00 -07:00
snipe 43e370f35a Move migrations further up
Signed-off-by: snipe <snipe@snipe.net>
2022-07-08 16:40:51 -07:00
snipe 8d3c9e67a0 Merge remote-tracking branch 'origin/develop' 2022-07-07 16:19:29 -07:00
snipe 3988c0e3f0 Merge pull request #11480 from snipe/fixes/changed_model_file_icon
Changed model file icon
2022-07-07 16:19:09 -07:00
snipe 723454b04d Changed model file icon
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 16:17:35 -07:00
snipe 30c03435e4 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2022-07-07 16:01:17 -07:00
snipe 5043533fde Merge pull request #11479 from snipe/fixes/padlock_icon
Fixes padlock icon
2022-07-07 16:00:02 -07:00
snipe d458973649 Removed unneeded JS
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 15:58:37 -07:00
snipe 9c86b4bf88 Fixes padlock icon
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 15:57:33 -07:00
snipe 3a6c6d8466 Prod assets
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 14:40:39 -07:00
snipe d62167e364 Merge remote-tracking branch 'origin/develop' 2022-07-07 14:39:02 -07:00
snipe 9297d8af1d Merge pull request #11478 from snipe/fixes/upgrade_font_awesome
Upgrade font-awesome to v6
2022-07-07 14:38:34 -07:00
snipe bae9792f01 Missed two
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 14:36:09 -07:00
snipe b98af0f50f Upgrade font-awesome to v6
Signed-off-by: snipe <snipe@snipe.net>
2022-07-07 14:22:08 -07:00
snipe 75e5cde39b Merge remote-tracking branch 'origin/develop' 2022-07-06 18:20:30 -07:00
snipe f853188bc7 Merge pull request #11471 from uberbrady/add_license_seat_indexes
This adds some indexes for performance on license_seats
2022-07-06 18:19:40 -07:00
Brady Wetherington 61813a6f2c This adds some indexes for performance on license_seats 2022-07-06 18:10:48 -07:00
snipe 7a0c9776b4 Merge remote-tracking branch 'origin/develop' 2022-07-05 17:58:59 -07:00
snipe ee4f355e49 Changed logging to debug
Signed-off-by: snipe <snipe@snipe.net>
2022-07-05 17:58:45 -07:00
snipe bfc8c18675 Merge pull request #11451 from mikeroq/fixes/populate_custom_fields_from_asset_model_create
Fixes custom fields not populating when creating asset from asset model page
2022-07-05 17:31:08 -07:00
snipe f1488767f8 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-07-05 16:41:00 -07:00
snipe 2d5755c1dd Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-07-05 16:40:17 -07:00
snipe acc2e12f12 Merge remote-tracking branch 'origin/develop' 2022-07-05 16:35:34 -07:00
snipe eb2793bfa7 Added @reederda
Signed-off-by: snipe <snipe@snipe.net>
2022-07-05 16:35:12 -07:00
snipe 1a05843183 Merge pull request #11462 from reederda/develop
Fixed #NA: typo
2022-07-05 16:33:09 -07:00
snipe ef17fd41f7 Merge branch 'develop' into develop 2022-07-05 16:26:53 -07:00
snipe 7bdbbbee50 Branch in config set to master
Signed-off-by: snipe <snipe@snipe.net>
2022-07-05 16:20:33 -07:00
snipe 2e800e6a0d Merge pull request #11467 from snipe/translations/updated_strings
Updated translations
2022-07-05 16:19:46 -07:00
snipe dae53a1128 Updated translations
Signed-off-by: snipe <snipe@snipe.net>
2022-07-05 16:18:53 -07:00
mikeroq 2781bd02b5 Add TODO to indicate future refactoring. 2022-07-05 18:02:37 -05:00
Daniel Reeder 7772ef22db Quick typo fix 2022-07-04 21:57:54 +00:00
snipe 2137c4e897 Back to develop
Signed-off-by: snipe <snipe@snipe.net>
2022-07-04 10:12:25 -07:00
snipe 4a0e51bf34 Merge remote-tracking branch 'origin/develop' 2022-07-04 10:11:05 -07:00
snipe 9f581a7677 Merge pull request #11460 from mikeroq/fix_missing_use_statement
Fixes #11459 Missing import for Setting model in AcceptanceController
2022-07-04 10:07:54 -07:00
mikeroq be8869978d Added import for Setting model 2022-07-04 07:29:01 -05:00
dependabot[bot] 1ae044b91e Bump codacy/codacy-analysis-cli-action from 1.1.0 to 4.1.0
Bumps [codacy/codacy-analysis-cli-action](https://github.com/codacy/codacy-analysis-cli-action) from 1.1.0 to 4.1.0.
- [Release notes](https://github.com/codacy/codacy-analysis-cli-action/releases)
- [Commits](https://github.com/codacy/codacy-analysis-cli-action/compare/1.1.0...v4.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 08:28:05 +00:00
snipe e550fb1a52 Merge pull request #11447 from snipe/dependabot/github_actions/docker/metadata-action-4
Bump docker/metadata-action from 3 to 4
2022-07-03 20:04:15 -07:00
snipe fc65bb020f Merge pull request #11446 from snipe/dependabot/github_actions/docker/login-action-2
Bump docker/login-action from 1 to 2
2022-07-03 20:03:50 -07:00
snipe a4dfdcd90d Merge pull request #11450 from snipe/dependabot/github_actions/docker/build-push-action-3
Bump docker/build-push-action from 2 to 3
2022-07-03 20:03:32 -07:00
snipe 16d2e34148 Merge pull request #11448 from snipe/dependabot/github_actions/docker/setup-buildx-action-2
Bump docker/setup-buildx-action from 1 to 2
2022-07-03 20:03:08 -07:00
snipe 567eefab1a Merge pull request #11449 from snipe/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-07-03 20:02:31 -07:00
snipe 1ef20ec622 Merge remote-tracking branch 'origin/develop' 2022-07-02 13:08:59 -07:00
snipe afab167e8c Fixed restore button in listings
Signed-off-by: snipe <snipe@snipe.net>
2022-07-02 13:08:46 -07:00
snipe af14ee0d47 Merge pull request #11453 from mikeroq/fixes/asset_restore_not_working
Fixes #11452 - Asset Restore routes/buttons also asset models/users restore as well
2022-07-02 13:07:29 -07:00
Mike Roquemore 0a5ca6eb25 Change restore route to POST instead of GET 2022-07-02 14:34:43 -05:00
Mike Roquemore 6e9f24c08f Change restore route to POST instead of GET 2022-07-02 14:34:23 -05:00
Mike Roquemore 07ac4087a3 Remove link from alert since there is already a restore button on the side 2022-07-02 14:34:22 -05:00
Mike Roquemore 1650c9f878 Remove duplicate users routes 2022-07-02 14:34:22 -05:00
Mike Roquemore 123963c14c Modify genericActionsFormatter restore link to be a button instead since it's in a form.
Changed user restore route to POST
2022-07-02 14:34:22 -05:00
Mike Roquemore 1b45170ca3 Adds check if request has model_id, if so call fetchCustomFields on document ready 2022-07-01 20:15:11 -05:00
snipe 9a0b677dac Merge remote-tracking branch 'origin/develop' 2022-07-01 14:31:29 -07:00
snipe b44f27dafa Add @mikeroq as a contributor 2022-07-01 14:31:07 -07:00
snipe 92d46edca3 Cleaned up logging output
Signed-off-by: snipe <snipe@snipe.net>
2022-07-01 13:33:58 -07:00
dependabot[bot] 471cf117ab Bump docker/build-push-action from 2 to 3
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 18:36:55 +00:00
dependabot[bot] bf78bd4b8b Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 18:36:50 +00:00
dependabot[bot] a0a0d7e344 Bump docker/setup-buildx-action from 1 to 2
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 18:36:45 +00:00
dependabot[bot] a9361571d6 Bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 18:36:41 +00:00
dependabot[bot] 1a13be9b5d Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-01 18:36:36 +00:00
snipe 0ed84c83c8 Merge pull request #11437 from turrisxyz/Dependabot-GitHub-Actions
chore: Included githubactions in the dependabot config
2022-07-01 11:35:58 -07:00
snipe 9670ca3b8a Merge remote-tracking branch 'origin/develop' 2022-07-01 11:26:46 -07:00
snipe d4476cb10b Merge pull request #11445 from snipe/fixes/11444
Replicates #11444
2022-07-01 11:26:25 -07:00
snipe 45c616639c Replicates #11444
Signed-off-by: snipe <snipe@snipe.net>
2022-07-01 11:21:02 -07:00
snipe eedd646c28 Merge remote-tracking branch 'origin/develop' 2022-06-30 21:10:46 -07:00
snipe acbd4deb1b Merge pull request #11440 from snipe/fixes/check_for_image_on_signing
Fixed #11393 - reject acceptance if no file is present
2022-06-30 21:09:16 -07:00
snipe 4e547a3639 Fixed typos :(
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 21:06:36 -07:00
snipe b910db0617 Fixed #11393 - reject acceptance if no file is present
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 21:01:58 -07:00
snipe bb382f3d2a Merge remote-tracking branch 'origin/develop' 2022-06-30 18:52:02 -07:00
snipe 25cb32ca6a Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 18:51:44 -07:00
snipe 6a13a7e096 Merge remote-tracking branch 'origin/develop' 2022-06-30 18:38:25 -07:00
snipe e366caf3d1 Merge pull request #11438 from uberbrady/backout_linear_depreciation_math
Revert a change in our Linear Depreciation math
2022-06-30 18:38:03 -07:00
naveen cfa301f5ae chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-07-01 01:33:50 +00:00
Brady Wetherington f72aa2415f Revert a change in our Linear Depreciation math; I think the old algorithm was correct 2022-06-30 18:24:45 -07:00
snipe 7969a66552 Merge remote-tracking branch 'origin/develop' 2022-06-30 18:17:51 -07:00
snipe 4edba064d5 Removed duplicate model column in depreciation report
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 18:17:30 -07:00
snipe f3a3c59b7b Fixed branch name
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 18:05:46 -07:00
snipe aa54c23f98 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 18:04:53 -07:00
snipe df1e2687d6 Updated languages
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 17:35:02 -07:00
snipe 4f07e77bf9 Add @naveensrinivasan as a contributor 2022-06-30 17:35:02 -07:00
snipe a10f570350 Merge pull request #11436 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-06-30 17:30:17 -07:00
naveen ac94aa8e46 chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-07-01 00:29:21 +00:00
snipe 7ebf125dae Merge remote-tracking branch 'origin/develop' 2022-06-30 15:44:51 -07:00
snipe 9a361d573f Merge pull request #11435 from snipe/features/ldap_warnings
Added warnings for common LDAP misconfigs
2022-06-30 15:44:33 -07:00
snipe 1a423a252b Derp
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 15:22:58 -07:00
snipe 7591f3f092 Added auth filter check regex
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 15:15:49 -07:00
snipe 2cace3c73a Added LDAP warnings on page load
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 15:08:12 -07:00
snipe 97afafdd48 Merge remote-tracking branch 'origin/develop' 2022-06-30 14:20:34 -07:00
snipe 656efc5f92 Fixed missing trans()
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 14:20:15 -07:00
snipe 46d055cf74 Fixed weird extra padding on crown
Signed-off-by: snipe <snipe@snipe.net>
2022-06-30 14:17:53 -07:00
snipe 423e7439ee Merge remote-tracking branch 'origin/develop' 2022-06-30 14:09:19 -07:00
Nathan Butler 0617480f73 Asset checkinbytag now consistent with existingAPI
This is a non-breaking change to the checkinbytag endpoint to bring it
inline with the usage/formatting of the other bytag endpoints that
currently exist - using the URL path to define the asset_tag instead of
passing it through as a url query.

Both methods will work, but the URL Path method will take precidence if
it is used (the query will be ignored if included)
2022-06-30 09:23:52 +10:00
snipe 2262ef818e Merge pull request #11427 from Godmartinz/email_users_list
[feature] adds button to email user list of assets from profile
2022-06-29 15:25:18 -07:00
snipe 02459aad26 Merge pull request #11430 from uberbrady/scim_more_tolerant
Make SCIM be more tolerant of missing fields
2022-06-29 15:24:25 -07:00
Brady Wetherington 2451bb9a2b Make SCIM be more tolerant of missing fields 2022-06-29 14:48:59 -07:00
Godfrey M cd9d2d0cec adds docblock 2022-06-29 13:01:29 -07:00
Godfrey M fc636ea888 removed redundant header 2022-06-29 12:01:56 -07:00
Godfrey M e471aa8639 adds button to email user list of assets from profile 2022-06-29 11:15:15 -07:00
snipe 180f36d145 Merge remote-tracking branch 'origin/develop' 2022-06-29 05:04:21 -07:00
snipe f8fd87b896 Add @ntbutler-nbcs as a contributor 2022-06-29 05:04:07 -07:00
snipe 130c8ea1b0 Add @ntbutler-nbcs as a contributor 2022-06-29 05:03:22 -07:00
snipe 5af6330398 Merge pull request #11417 from ntbutler-nbcs/master
[Feature] - Add checkoutByTag API endpoint for assets
2022-06-29 05:03:01 -07:00
snipe daaf8713d8 Merge branch 'dampfklon-9813-duplicate-accept-asset' into develop 2022-06-29 04:58:26 -07:00
snipe 5b02d9ed06 Merge branch '9813-duplicate-accept-asset' of https://github.com/dampfklon/snipe-it into dampfklon-9813-duplicate-accept-asset
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	resources/views/account/accept/create.blade.php
2022-06-29 04:58:13 -07:00
snipe b04cf20735 Merge pull request #10758 from inietov/fixes/badmethodcallexception_undefined_method_Asset.unaccepted_develop
Fixes BadMethodCallException Call to undefined method App\Models\Asset::unaccepted() for master [ch-17636]
2022-06-29 04:34:51 -07:00
Nathan Butler 6531657ee0 Revert version to dev for pull request 2022-06-29 18:00:15 +10:00
Nathan Butler e28e7e37b8 Removed unneeded checks when searching for asset 2022-06-29 17:49:50 +10:00
snipe 467f59e193 Merge remote-tracking branch 'origin/develop' 2022-06-29 00:25:00 -07:00
snipe be9e6fe847 Another typo
Signed-off-by: snipe <snipe@snipe.net>
2022-06-29 00:24:33 -07:00
snipe b0e13611f7 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-06-29 00:24:08 -07:00
snipe f3887aef33 Merge remote-tracking branch 'origin/develop' 2022-06-29 00:10:38 -07:00
snipe 7b3f891edd Merge pull request #11418 from snipe/features/api_backup_download
Download backup via API
2022-06-29 00:07:09 -07:00
snipe b590f29f33 Attempt a download via API
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:59:13 -07:00
snipe 1debdc47cf Backups endpoint
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:30:17 -07:00
snipe bb7662a214 Merge pull request #11416 from snipe/features/personal_access_endpoint
Added personal access endpoint to API
2022-06-28 23:27:21 -07:00
snipe 53bc15900b Formatted show api
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:23:55 -07:00
snipe 90fe7af863 Small refactor
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:18:16 -07:00
snipe 67ad24af08 Return token ID in cli
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:13:25 -07:00
Nathan Butler 67e9b7795a Added asset checkoutByTag API endpoint 2022-06-29 16:11:57 +10:00
snipe 52332bc9ed Include token ID in payload
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:10:56 -07:00
snipe dc27d3bec9 Change to plural endpoints
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 23:10:40 -07:00
snipe a711e608c9 Changed siganture to be clearer
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:26:37 -07:00
snipe 2f7c04362e Make -kkey-only a flag
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:20:55 -07:00
snipe 9b6fd7e19a Set $accessTokenName
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:11:46 -07:00
snipe 9680b02bce Check that the user has permission to create their own API keys
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:09:18 -07:00
snipe e7de7d1716 Show user info as well
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:06:46 -07:00
snipe 112f147596 Console script to generate API tokens
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 22:04:39 -07:00
snipe 413487de80 Made method naming consistent
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 21:32:12 -07:00
snipe 1158fa9ea8 Added personal access tokens to api
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 21:29:15 -07:00
snipe a8e8112b34 Merge pull request #11415 from snipe/features/more_api_filters
Added additional filters for api indexes
2022-06-28 20:04:01 -07:00
snipe 3df9260ca8 Added additional filters for api indexes
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 19:59:45 -07:00
snipe 14ba3af086 Merge pull request #11414 from snipe/features/additional_search_fields_for_locations
Added additional search filters for location API
2022-06-28 19:08:08 -07:00
snipe 71c8050883 Added additional search filters for location API
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 19:07:11 -07:00
snipe df5b01492c Merge remote-tracking branch 'origin/develop' 2022-06-28 18:55:59 -07:00
snipe 9dbb355e8d Merge pull request #11412 from snipe/features/model_uploads
Added model uploads
2022-06-28 18:42:05 -07:00
snipe 0f3778f07b Merge pull request #11413 from uberbrady/add_username_index
Add index across username and deleted_at to improve performance
2022-06-28 17:16:01 -07:00
Brady Wetherington f515bd2dc8 Add index across username and deleted_at to improve large directory sync performance 2022-06-28 17:12:14 -07:00
snipe f3075facb4 Added delete button
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 16:25:22 -07:00
snipe ed95adb45c Show model files on hardware page
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 16:17:46 -07:00
snipe 95d4f7c62e Added models router to BS tables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 15:56:18 -07:00
snipe c90ed9f25f Allow models uploads
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 15:50:07 -07:00
snipe 7f664a7971 Layout changes for file upload
Signed-off-by: snipe <snipe@snipe.net>
2022-06-28 12:32:12 -07:00
snipe 14c6879f06 Merge remote-tracking branch 'origin/develop' 2022-06-28 11:41:56 -07:00
snipe d8d12d4590 Merge pull request #11408 from uberbrady/add_filter_option_to_ldap_sync
Add a new `--filter` option to Artisan ldap-sync command
2022-06-28 09:50:48 -07:00
Brady Wetherington be3388d647 Add a new --filter option to Artisan ldap-sync command 2022-06-27 19:49:59 -07:00
snipe 242836719d Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 19:32:10 -07:00
snipe 393c32558b Gotta bump that hash up
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 19:31:26 -07:00
snipe 94e723a88f Merge pull request #11404 from snipe/features/fix_transliteration
Fixed custom field transliteration
2022-06-27 17:42:02 -07:00
snipe 14d8fb66aa Merge pull request #11405 from snipe/fixes/use_db_column_instead_of_converted_value
Only care about the custom field's converted name when updating the custom field itself
2022-06-27 17:36:26 -07:00
snipe ae73d4cc7c Merge pull request #11407 from snipe/features/disclosure_arrows_on_user_screen
Added disclosure arrows for lesser used options on user screen
2022-06-27 17:33:31 -07:00
snipe bf08e73f8f Removed comments and server side cookie info
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 16:36:09 -07:00
snipe 4a3f56acf2 Removed old cooke stuff
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 16:35:54 -07:00
snipe e33a4c2ef2 Added disclosure arrows to use screen
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 16:35:44 -07:00
snipe 52bd7d0d68 Merge remote-tracking branch 'origin/develop' 2022-06-27 14:25:38 -07:00
snipe baad3b9d58 Only care about the converted name when updating the custom field itself
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 14:17:07 -07:00
snipe 131edb611e Refine output and checks
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 13:54:21 -07:00
snipe 518395bbc7 Merge pull request #11403 from uberbrady/remember_disclosure_triangles
Remember the state of the disclosure triangles in Assets
2022-06-27 13:28:14 -07:00
Brady Wetherington 34b4499178 Remember the state of the disclosure triangles in Assets 2022-06-27 12:57:19 -07:00
snipe 8f900fb4e1 More UI tweaks
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 12:15:11 -07:00
snipe 9355689dd4 Nicer output for custom fields error
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 11:52:51 -07:00
snipe 0909feaa6b Few more UI tweaks
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 11:01:19 -07:00
snipe 7f18180105 Fixed toggle
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 10:26:37 -07:00
snipe bee694e605 Fixed typo
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 09:57:20 -07:00
snipe 08525a3c20 Few more changes
Signed-off-by: snipe <snipe@snipe.net>
2022-06-27 09:43:32 -07:00
snipe d70b36750c Merge pull request #10967 from veenone/fix/hide_optional_field_on_create_asset
Fixes #8155 -  improve the workflow during asset creation
2022-06-24 18:53:07 -07:00
snipe 8c85d7bc97 Merge pull request #11370 from inietov/fixes/customfields_default_values_not_validating
Adds validation to custom fields' default values
2022-06-24 18:11:16 -07:00
snipe cb225cb1ce Merge remote-tracking branch 'origin/develop' 2022-06-24 18:00:21 -07:00
snipe 7e7ae3bb95 Really reverting this time
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 17:55:34 -07:00
snipe 838579e9a8 Reverting :(
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 17:30:56 -07:00
snipe a99896618d Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	composer.json
#	composer.lock
2022-06-24 17:21:57 -07:00
snipe 24cb13d52b Upgraded guzzle (not broken this time)
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 17:18:34 -07:00
snipe cc7513e202 Merge pull request #11392 from snipe/security/upgrade_guzzle
Upgraded guzzle to 7.4.5
2022-06-24 17:04:17 -07:00
snipe c0b6d5aa2c Upgraded guzzle to 7.4.5
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 17:01:24 -07:00
snipe 5788038b49 Merge pull request #11391 from snipe/security/upgrade_webpack
Upgrade webpack from 5.72.1 to 5.73.0
2022-06-24 16:41:59 -07:00
snipe fbf0815b16 Upgrade webpack from 5.72.1 to 5.73.0
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 16:41:19 -07:00
snipe e2c227f02b Merge remote-tracking branch 'origin/develop' 2022-06-24 16:21:10 -07:00
snipe be0f0fc421 Merge pull request #11388 from snipe/features/disable_purge_in_env
Disallow purge backup deletion by default and, enable via .env
2022-06-24 16:12:00 -07:00
snipe a03075b6ea Merge pull request #11389 from uberbrady/errmagerd_the_gerneral
Typo of 'general' was in the migration blade a few places
2022-06-24 16:05:40 -07:00
Brady Wetherington 3b3f1a817e Typo of 'general' was in the migration blade a few places 2022-06-24 16:00:15 -07:00
snipe 601f7a6994 Moved new variables in example env
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 16:00:05 -07:00
snipe 75d19d815d Still show the purge button even if not allowed to avoid confusion
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:59:40 -07:00
snipe d167d2a10f Disallow backup deletion and log attempt if not allowed
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:49:22 -07:00
snipe fce4f0dc0e Disable delete button if not allowed
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:49:07 -07:00
snipe 657039882c Added purge and backup strings
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:48:46 -07:00
snipe cf99d42413 Added backup delete to app config
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:48:37 -07:00
snipe f483eafae9 Added backup delete env
Signed-off-by: snipe <snipe@snipe.net>
2022-06-24 15:44:11 -07:00
snipe 77bf28bcb6 Disallow purge
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 20:11:43 -07:00
snipe 6c2d06efb9 Merge remote-tracking branch 'origin/develop' 2022-06-23 20:02:19 -07:00
snipe d0081188c7 Merge pull request #11387 from snipe/fixes/nicer_settings_search
Moved the settings search box higher
2022-06-23 19:31:24 -07:00
snipe ce2362459c Layout tweak for search and back placement
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 19:30:52 -07:00
snipe 4e568bec8a Moves the settings search box higher
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 19:25:30 -07:00
snipe 18c37c97b8 Dark skin prod assets
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 19:14:12 -07:00
snipe 82e5faa869 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/dist/skins/skin-black-dark.css
#	public/css/dist/skins/skin-black-dark.min.css
#	public/css/dist/skins/skin-blue-dark.css
#	public/css/dist/skins/skin-blue-dark.min.css
#	public/css/dist/skins/skin-orange-dark.css
#	public/css/dist/skins/skin-orange-dark.min.css
#	public/css/dist/skins/skin-purple-dark.css
#	public/css/dist/skins/skin-purple-dark.min.css
#	public/css/dist/skins/skin-red-dark.css
#	public/css/dist/skins/skin-red-dark.min.css
#	public/css/dist/skins/skin-yellow-dark.css
#	public/css/dist/skins/skin-yellow-dark.min.css
#	public/mix-manifest.json
2022-06-23 19:14:01 -07:00
snipe dec7122ac7 Dark skin dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 19:13:01 -07:00
snipe a75fc8af7e Merge remote-tracking branch 'origin/develop' 2022-06-23 19:12:13 -07:00
snipe 86d2c2b153 Small naming changes
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 19:11:59 -07:00
snipe 9fc4565bc1 Merge remote-tracking branch 'origin/develop' 2022-06-23 18:56:04 -07:00
snipe f0cc418965 Merge pull request #11383 from snipe/features/adds_user_id_to_users
Added created_by to users
2022-06-23 18:48:42 -07:00
snipe 0bc3ca5c42 Fixed comments
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:44:27 -07:00
snipe 62ab867051 Fixed url param
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:43:10 -07:00
snipe 9fd3541520 Missed on createdBy
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:42:22 -07:00
snipe 3e559044b2 Changed method and scope names
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:41:13 -07:00
snipe 75a631b91f Merge pull request #11375 from Godmartinz/bootS_dropdown_menu_fix
fixes dropdown column select font color  in bootstrap tables
2022-06-23 18:31:36 -07:00
snipe 3a8786fdb7 Updated assets for prod
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:27:31 -07:00
snipe f2a89161b3 Merge remote-tracking branch 'origin/develop' 2022-06-23 18:26:36 -07:00
snipe 1c25057e42 Merge pull request #11379 from Godmartinz/license_acceptance_eula
adds eula blade for licenses/consumables/components and fixes assigned_to for dom_pdf
2022-06-23 18:26:19 -07:00
snipe 590630e4e0 Merge pull request #11386 from snipe/fixes/default_skin_settings_colors
Small fixes to default blue
2022-06-23 18:23:45 -07:00
snipe 487dedba25 Merge pull request #11384 from snipe/fixes/bs_tables_undefined_for_archived
Fixed missing archived tooltip
2022-06-23 18:16:31 -07:00
snipe f4c346a57c Small fixes to default blue skin
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:11:42 -07:00
snipe 35365882ac Used new settings_button class in settings index
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:10:28 -07:00
snipe ea254ccc04 Tweaked default @blue
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:10:14 -07:00
snipe 06d5b5f4b1 Small change to color in overrides
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:10:03 -07:00
snipe 2536b02ace Fixed some colors on default skin
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 18:09:52 -07:00
snipe 6b8abb1511 Fixed missing archived tooltip
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:32:39 -07:00
snipe 9c9f5be6fe Do not show the creating admin by default in list view
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:28:34 -07:00
snipe d8daec2e0a Added created_by results to user index API
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:19:30 -07:00
snipe c9b81d65f1 Save the user id who is creating the user
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:19:08 -07:00
snipe 7f05029089 Added created_by to API output
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:18:31 -07:00
snipe 23c50ea9a5 Added admihn scopes
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:18:11 -07:00
snipe 2e5e8f363b Added admin to oresenter
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:18:04 -07:00
snipe e63183649a Show admin in user view
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:17:48 -07:00
snipe ef86c0273a Added migration to store admin ID
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 17:17:38 -07:00
snipe dd8d90aa39 Merge remote-tracking branch 'origin/develop' 2022-06-23 16:16:04 -07:00
snipe 670a46e85c Merge pull request #11382 from snipe/fixes/check_for_archived_setting_on_counts
Fixes check for archived setting on counts
2022-06-23 16:13:20 -07:00
snipe daf6c72005 Fleshed out comments on new scope
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 16:02:54 -07:00
snipe 1a4579b770 Missed one
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 16:00:27 -07:00
snipe 398c77bfdc Use new scope for additional tabs
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 15:37:39 -07:00
snipe d45d322b54 Use scoped query for asset count
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 13:43:23 -07:00
Godfrey M b0897a1fc9 adds acceptance for consumables and components 2022-06-23 11:52:35 -07:00
Godfrey M d00b469001 fixed the search for the license 2022-06-23 11:33:36 -07:00
snipe c5a6cec194 Merge pull request #11380 from snipe/features/better_excel_export
Fixed #11378 - Added better excel export
2022-06-23 11:25:33 -07:00
snipe e2b1494511 Reordered and added xlsx to export list
Signed-off-by: snipe <snipe@snipe.net>
2022-06-23 11:18:59 -07:00
Godfrey M df76e6eacf adds eula blade for licenses and fixes assigned_to for dom_pdf 2022-06-23 11:15:15 -07:00
Godfrey M 541ae919d9 fixes dropdown column select font color in bootstrap tables 2022-06-23 09:38:44 -07:00
Ivan Nieto Vivanco 7976401aa2 Add error message when the default customfield values can't be validated 2022-06-22 22:17:05 -05:00
Ivan Nieto Vivanco 7e10abe605 Fix the date control in custom fields' default values form to show the selected date 2022-06-22 21:47:08 -05:00
Ivan Nieto Vivanco afdf93ca63 Adds controls for custom fields of type date in the default value form 2022-06-22 21:37:11 -05:00
Ivan Nieto Vivanco 321367b974 Adds validation to custom fields' default values 2022-06-22 21:06:07 -05:00
snipe 366f3aacef Merge pull request #11367 from snipe/js_library_updates
Updated/upgraded assets
2022-06-22 16:23:03 -07:00
snipe 4b9ec9218d Upgraded/updates assets
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 15:54:58 -07:00
snipe cae66753fb Merge pull request #11323 from Godmartinz/bug/sc-19255/issues-with-black-light-sk
fixes non-dark mode black theme
2022-06-22 15:47:55 -07:00
snipe 5ac9efa9a3 Merge remote-tracking branch 'origin/develop' 2022-06-22 12:20:04 -07:00
snipe ded635207f Merge pull request #11365 from snipe/fixes/adds_missing_zip_to_user_view
Added missing postal code from user view
2022-06-22 12:19:27 -07:00
snipe f0f37df76e Added missing postal code from user view
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 12:18:57 -07:00
snipe f5702532f0 Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 11:21:51 -07:00
snipe 2f02eee69b Bumped version
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 11:21:04 -07:00
snipe 89c234b1c2 Merge pull request #11358 from snipe/fixes/missing_token_lang
Fixed missing password.token string and checked for user existing before attempting to send reset email
2022-06-22 11:15:08 -07:00
snipe c24052cb2d Merge pull request #11364 from snipe/features/link_asset_to_order_number
Fixed #11351 - add link on asset view to order number
2022-06-22 11:08:40 -07:00
snipe a7a61a3620 Fixed #11351 - add link on asset view to order number
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 11:07:54 -07:00
snipe 135fdae209 Merge pull request #11337 from mikeroq/fixes/user_edit_website_missing
Fixed #11332 Added website field that was missing from update and store method.
2022-06-22 10:16:38 -07:00
snipe 5c30de517d Use rate limiter for API calls
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 09:11:40 -07:00
snipe a7dc6162fa Simplify password attempts rate limiting
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 09:11:24 -07:00
snipe 18778d3723 Additional example variables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-22 09:07:48 -07:00
snipe 5ff1b5fd50 Increased throttle
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:39:50 -07:00
snipe 1c1f3dc42c Added password requests cleanup to scheduler
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:35:16 -07:00
snipe d67afc3bd0 Merge pull request #11359 from uberbrady/dont_show_images_on_checkin_email_if_not_requested
Fixes issue where asset images were showing up in checkin emails
2022-06-21 19:34:22 -07:00
snipe a5b857c753 Return error if token is incorrect
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:30:51 -07:00
snipe b00db3cc56 Added throttling to password reset token form
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:30:11 -07:00
snipe 57720cb978 Added comment block
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:12:57 -07:00
snipe 172e8d463f Use newer forgotten password variables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:11:57 -07:00
snipe 284dbb7553 Set higher threshhold, moved throttle settings
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 19:11:39 -07:00
Brady Wetherington 1156eea8af Fixes issue where asset images were showing up in checkin emails 2022-06-21 19:11:16 -07:00
snipe 17ee332715 Remove throttle from GET in password reset
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:53:14 -07:00
snipe 2f258a3e3d Make the strings match
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:48:22 -07:00
snipe a31bca1798 Check that the user is activated before letting them reset their password
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:48:02 -07:00
snipe 791f77f641 Fixed throttle variables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:41:12 -07:00
snipe 1b6df232aa Updated string
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:41:02 -07:00
snipe 386272a618 Manually add the additional routes so we can throttle them
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 18:40:53 -07:00
snipe 7f8fc7add9 Make SAML debugging less noisy
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 17:57:17 -07:00
snipe 6bc525bc25 Merge pull request #11352 from inietov/fixes/assets_transformer_date_customfields_fixes
Fixed #11335 Assets transformer date customfields issues
2022-06-21 17:56:17 -07:00
snipe de048e1009 Updated language
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 16:13:59 -07:00
snipe 68150d11b7 Make logo clickable
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 16:13:52 -07:00
snipe f4f400ed87 Handle workflow better for invalid users
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 16:13:43 -07:00
snipe a49ccf0863 Removed unused rules
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 16:13:26 -07:00
snipe 300879847f Added a few comments to make it clearer what’s happening
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 14:33:10 -07:00
snipe d4c53945d9 Tweaked language
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 14:19:49 -07:00
snipe 21875100b6 Fixed missing password.token string and checked for user existing before trying to reset
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 14:15:38 -07:00
snipe 87980643ea Merge pull request #11357 from snipe/fixes/11343_null_asset_name
Fixed #11343 - ability to null asset name on checkin
2022-06-21 10:58:28 -07:00
snipe 675f42401c Fixed #11343 - ability to null asset name
Signed-off-by: snipe <snipe@snipe.net>
2022-06-21 10:57:39 -07:00
Ivan Nieto Vivanco 3a5c09c424 Used the getFormattedDateObject() function with the expected parameters 2022-06-20 19:58:51 -05:00
snipe 3b462ffadc Merge pull request #11329 from mikeroq/fixes/deprecations_pagination_missing
Fixed #11285 - Depreciation index table missing pagination
2022-06-18 19:58:32 -07:00
mikeroq d60af478ad Added website field that was missing from update and store method. 2022-06-17 08:09:39 -05:00
snipe cabef8ff12 Merge pull request #11326 from snipe/features/added_number_format_to_tab_badges
Added number_format() to tab badges
2022-06-16 14:05:29 -07:00
Mike Roquemore 8a27ef30d5 Missing total argument on transformDeprecations method
Removed duplicate array key on transformDeprecation method
2022-06-15 21:52:15 -05:00
snipe a111482217 Use number_format on badges
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 14:59:06 -07:00
snipe a758e825ed Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 13:45:33 -07:00
snipe af66f83a3d Check for blank (not null) values i asset transformer date
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 13:42:30 -07:00
snipe b3605fa141 Merge remote-tracking branch 'origin/develop' 2022-06-15 11:39:16 -07:00
snipe 6f713985fb Merge pull request #11324 from snipe/features/add_badges_to_companies
Features/add badges to companies
2022-06-15 11:38:32 -07:00
snipe 677e5a8cf1 Added tab badges to company detail view
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 11:37:44 -07:00
snipe 872600a7a7 Link company on license page
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 11:37:26 -07:00
Godfrey M 3a879bda4a more adjustments 2022-06-15 11:08:42 -07:00
Godfrey M a6852cf4d2 fixes non-dark mode black theme 2022-06-15 10:20:25 -07:00
snipe 61c601dbdf Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	public/css/build/app.css
#	public/css/build/overrides.css
#	public/css/dist/all.css
#	public/mix-manifest.json
2022-06-15 02:09:32 -07:00
snipe 74bc06cc49 Removed debugging code
Signed-off-by: snipe <snipe@snipe.net>
2022-06-15 02:07:58 -07:00
snipe 5fe1078013 Squashed commit of the following:
commit a011b07d99
Merge: b392ed269 6059e9e11
Author: snipe <snipe@snipe.net>
Date:   Tue Jun 14 17:52:50 2022 -0700

    Merge pull request #11315 from snipe/features/adds_fullscreen_option_to_tables

    Added fullscreen option to tables

commit b392ed269b
Merge: 693043e64 e6d792bdf
Author: snipe <snipe@snipe.net>
Date:   Tue Jun 14 17:52:41 2022 -0700

    Merge pull request #11316 from snipe/fixes/smaller_padlock_on_table_header

    Tweaked CSS for smaller padlock

commit 6059e9e119
Author: snipe <snipe@snipe.net>
Date:   Tue Jun 14 17:49:00 2022 -0700

    Added fullscreen option to tables

    Signed-off-by: snipe <snipe@snipe.net>

commit e6d792bdf7
Author: snipe <snipe@snipe.net>
Date:   Tue Jun 14 17:43:12 2022 -0700

    Tweaked CSS for smaller padlock

    Signed-off-by: snipe <snipe@snipe.net>

Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 17:54:18 -07:00
snipe a011b07d99 Merge pull request #11315 from snipe/features/adds_fullscreen_option_to_tables
Added fullscreen option to tables
2022-06-14 17:52:50 -07:00
snipe b392ed269b Merge pull request #11316 from snipe/fixes/smaller_padlock_on_table_header
Tweaked CSS for smaller padlock
2022-06-14 17:52:41 -07:00
snipe 6059e9e119 Added fullscreen option to tables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 17:49:00 -07:00
snipe e6d792bdf7 Tweaked CSS for smaller padlock
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 17:43:12 -07:00
snipe f16a4b6aef Removed footer from show category
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 17:16:14 -07:00
snipe d74b4f55fb Merge remote-tracking branch 'origin/develop' 2022-06-14 17:15:39 -07:00
snipe 693043e645 Merge pull request #11313 from snipe/fixes/nicer_suppliers_mfgs_ui
Nicer suppliers and manufacturers UI
2022-06-14 17:14:53 -07:00
snipe e935a34946 Merge remote-tracking branch 'origin/develop' 2022-06-14 16:25:50 -07:00
snipe 4052e360c1 Merge pull request #11314 from snipe/fixes/deja_vu_font_pdf
Fixed #11175 - Use the Deja Vu font in PDFs to be able to support Cyrillic, etc
2022-06-14 16:25:33 -07:00
snipe cc6a2f2d49 Use the Deja Vu font to be able to support cyrllic, etc
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:23:30 -07:00
snipe 07bc2fd742 Added maintenance scope for ordering by supplier
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:11:43 -07:00
snipe a57a6486e7 Only add http:// if the url variable isn’t blank
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:11:13 -07:00
snipe a33276cb3d Additional filters on maintenances UI
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:10:48 -07:00
snipe bfec0059c5 Improved manufacturers UI
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:10:36 -07:00
snipe aea9dd1de5 Improved suplpiers UI
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 16:06:56 -07:00
snipe 954b54f914 Removed duplicated $allowed_columns
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 15:06:04 -07:00
snipe 56a15731ef Merge remote-tracking branch 'origin/develop' 2022-06-14 12:56:16 -07:00
snipe 766e59acde Merge pull request #11310 from snipe/fixes/statuslabels_bulk_edit
Fixes #11308 - bulk edit on statuslabels detail page
2022-06-14 12:55:56 -07:00
snipe f1a63f25e7 Partialize and add data atributes to statuslabel bulk
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 12:50:26 -07:00
snipe 88dfdb7538 Fixed bug in uncheck
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 12:50:10 -07:00
snipe 9072f7c6c9 Added click-to-select to tables
Signed-off-by: snipe <snipe@snipe.net>
2022-06-14 12:49:50 -07:00
snipe bff34063cd Merge pull request #11309 from uberbrady/ldap_troubleshooter_improvements
Fixed SC-19104 - fixes to ldap:troubleshoot artisan command
2022-06-14 12:24:24 -07:00
Brady Wetherington 1e685ca835 Fixed SC-19104 - fixes to ldap:troubleshoot artisan command 2022-06-14 12:18:42 -07:00
snipe b55630aafa Merge remote-tracking branch 'origin/develop' 2022-06-14 11:45:27 -07:00
snipe c3b644797e Merge pull request #11169 from inietov/fixes/user_update_from_import_location_in_assets
Fixes Asset location doesn't change when assigned user's location change via importer
2022-06-14 11:44:26 -07:00
snipe 1806dacb9d Bumped hash on master to 6.0.4
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-06-13 23:59:43 -07:00
snipe abb7f23ca5 Bumped version to 6.0.4
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 23:58:53 -07:00
snipe b448c89655 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-06-13 23:52:48 -07:00
snipe 8857391da7 Merge pull request #11305 from inietov/fixes/trying_to_access_array_offset_on_value_of_type_null
Fixed #11304 Trying to access array offset on value of type null at .../Transformers/AssetsTransformer.php
2022-06-13 23:51:51 -07:00
Ivan Nieto Vivanco 50c008ead5 Adds check in condition that format custom dates 2022-06-14 01:37:15 -05:00
snipe 3e8837dd6e Bumped dev branch to 6.0.3
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 22:13:18 -07:00
snipe ea1ff1e8bb Bumped version to 6.0.3
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 22:12:40 -07:00
snipe a7b155108d Merge remote-tracking branch 'origin/develop' 2022-06-13 22:07:13 -07:00
snipe 44c0c1bf0e Merge pull request #11301 from snipe/features/models_view_in_categories
Added models view (and bulk edit) in category detail view
2022-06-13 21:45:43 -07:00
snipe 7cd35a80b6 Updated assets for production
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:52:47 -07:00
snipe e8973f08b5 Added a back button
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:47:35 -07:00
snipe dd9c9520fb Correctly filter by category_id
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:42:21 -07:00
snipe aec033d8d2 Use better phrasing for tab
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:33:37 -07:00
snipe 5496b62b33 Split categories into two tabs if the type = asset
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:30:50 -07:00
snipe e393e2eb4b Fixed issue in BS tables where uncheck-all then checking a few would not uncheck properly
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:30:35 -07:00
snipe 10781a6e4b Use new bulk edit partial
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:29:17 -07:00
snipe 5a86004081 Created new models bulk edit partial
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 20:29:08 -07:00
snipe 91ade1f33e Merge remote-tracking branch 'origin/develop' 2022-06-13 20:02:52 -07:00
snipe eaecf8137a Updated assets for develop
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 19:52:27 -07:00
snipe 92bb8fac32 Removed log statement
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 19:49:14 -07:00
snipe d4a7811078 Merge pull request #11282 from Godmartinz/new_Yellow_skin
redone none dark mode yellow skin
2022-06-13 19:48:24 -07:00
snipe cb8dbcc172 Merge pull request #11281 from Godmartinz/chore_dark_mode_color_clean_up
cleans up dark modes
2022-06-13 19:48:15 -07:00
snipe 495e68d23c Merge pull request #11258 from Godmartinz/bug/sc-19123/link-colors-slightly-different-settings
Fixed colors in light color skins
2022-06-13 19:48:05 -07:00
snipe 20a0c4e3b5 Merge pull request #11272 from inietov/fixes/date_localization_in_customfields
Fixes #8143 Date localization not working on custom fields
2022-06-13 19:47:20 -07:00
snipe 4d773829f8 Merge pull request #10988 from bestlong/bestlong-patch-1
Ensure schedule analysis job never runs on forked repos
2022-06-13 19:45:36 -07:00
snipe bcb9804be8 Added a little more context to mail template
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 19:44:18 -07:00
snipe 5e59fa2598 Default to $snipeSettings->site_name
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 19:29:46 -07:00
snipe 6ea722d41e Merge pull request #11271 from inietov/fixes/bulk_delete_not_checking_assignedto_type
Fix typo in language files
2022-06-13 19:24:08 -07:00
snipe 66346684a9 Merge pull request #11288 from snipe/fixes/set_crons_as_app_user_in_installer
Fixes - set crons as app user in installer
2022-06-13 19:18:55 -07:00
snipe 9731a31cb6 Merge remote-tracking branch 'origin/develop' 2022-06-13 18:37:18 -07:00
snipe ef3e016667 Merge pull request #11300 from snipe/fixes/fa_map_icon_in_chrome
Fixed font-awesome leading class
2022-06-13 18:37:04 -07:00
snipe 93e4d23143 Changed font-awesome leading class
Signed-off-by: snipe <snipe@snipe.net>
2022-06-13 18:36:13 -07:00
snipe 0153a37cd7 Merge pull request #11264 from snipe/fixes/set_default_ldap_version
Fixed default ldap version if not specified
2022-06-13 17:14:57 -07:00
snipe cce5846018 Squashed commit of the following:
commit a070f7cd5e
Merge: 166f52630 4c1104147
Author: snipe <snipe@snipe.net>
Date:   Thu Jun 9 17:23:05 2022 -0700

    Merge pull request #11291 from snipe/fixes/regression_missing_restore_command

    Fixed regression: missing restore option for assets via API

commit 4c11041477
Author: snipe <snipe@snipe.net>
Date:   Thu Jun 9 17:17:38 2022 -0700

    Fixed regression: missing restore option for assets via API

    Signed-off-by: snipe <snipe@snipe.net>

Signed-off-by: snipe <snipe@snipe.net>
2022-06-09 17:23:50 -07:00
snipe a070f7cd5e Merge pull request #11291 from snipe/fixes/regression_missing_restore_command
Fixed regression: missing restore option for assets via API
2022-06-09 17:23:05 -07:00
snipe 4c11041477 Fixed regression: missing restore option for assets via API
Signed-off-by: snipe <snipe@snipe.net>
2022-06-09 17:17:38 -07:00
snipe 166f526302 Merge pull request #11290 from inietov/fixes/asset_observer_fails_checkout_on_creating
Fixes observer fails when creating and assigning a new asset
2022-06-09 16:13:12 -07:00
Ivan Nieto Vivanco f8718ffc1e Fixes observer fails when creating and assigning asset 2022-06-09 18:08:04 -05:00
snipe 31e4d3b725 Added second run_as_app_user
Signed-off-by: snipe <snipe@snipe.net>
2022-06-09 14:31:02 -07:00
snipe a766572a2f Set crons as app user for installer
Signed-off-by: snipe <snipe@snipe.net>
2022-06-09 14:21:38 -07:00
snipe 6a8824a467 Merge pull request #11286 from inietov/fixes/return_element_type_of_customfield
Fixes #11092 Add element type of customfield to API response
2022-06-09 11:40:09 -07:00
Ivan Nieto Vivanco 0c3972d7b7 Add spaces to the code for consistency 2022-06-09 13:02:31 -05:00
Ivan Nieto Vivanco 4a0eb2b3f1 Add element type of customfield to API response 2022-06-09 12:57:20 -05:00
Godfrey M b3559ac74e redone none dark mode yellow skin 2022-06-08 13:59:46 -07:00
Godfrey M 4252bd2348 cleans up dark modes 2022-06-08 13:17:16 -07:00
snipe 728338bfa8 Merge pull request #10824 from inietov/fixes/accessories_consumables_negative_numbers_develop
Fixes Accessories total quantity shows a negative number for develop branch
2022-06-08 10:53:57 -07:00
snipe df8834fd88 Merge pull request #11278 from Godmartinz/bug/sc-19134/possible-missing-wrong-translations-in-ldap
fixes translation references in the users ldap blade
2022-06-08 10:47:03 -07:00
Godfrey M c8bc0eff11 fixes translation references in the users ldap blade 2022-06-08 09:52:55 -07:00
snipe 8b6e869215 Merge pull request #11276 from snipe/fixes/added_bulk_data_attributes_to_manufacturers
Added new JS data attributes for assets in manufacturers
2022-06-08 04:19:38 -07:00
snipe 063893c109 Added new JS data attributes for assets in manufacturers
Signed-off-by: snipe <snipe@snipe.net>
2022-06-08 04:18:05 -07:00
Ivan Nieto Vivanco 44f4f20187 Only fix typo in 'en' file 2022-06-07 19:09:59 -05:00
Ivan Nieto Vivanco 792b18f845 Return language files to previous state 2022-06-07 19:09:03 -05:00
snipe 0671e478cd Merge pull request #11273 from inietov/fixes/eol_without_specified_date_format
Fixes EOL field doesn't have date formatter applied
2022-06-07 17:01:46 -07:00
Ivan Nieto Vivanco d2fc27e21d Add formatted date to EOL field in asset detailed view 2022-06-07 18:22:09 -05:00
Ivan Nieto Vivanco 740f27198f Evaluate if a custom field is a Date to present it with the correct format 2022-06-07 18:00:46 -05:00
Ivan Nieto Vivanco 064f4b3fc6 Fix typo in language files 2022-06-07 16:30:18 -05:00
snipe 5458676ead Default to v3 of LDAP on settings save
Signed-off-by: snipe <snipe@snipe.net>
2022-06-06 21:00:22 -07:00
snipe 8337628323 Set elvis operator to ensure ldap version is 3 if null
Signed-off-by: snipe <snipe@snipe.net>
2022-06-06 20:57:18 -07:00
snipe 7faaa4ce24 Merge pull request #11263 from inietov/fixes/dont_save_update_action_if_nothings_changed
Fixes log update action even if no changes are made to assets [sc-19131]
2022-06-06 20:06:19 -07:00
snipe 9583a72016 Merge pull request #11262 from snipe/fixes/11093_use_true_false_in_custom_fields_fieldsets
Fixed #11093 - Return true/false for custom fields/fieldsets required value in API
2022-06-06 20:04:52 -07:00
snipe e0102ddbf0 Fixes #11093 Return true/false for custom fields/fieldsets required in API
Signed-off-by: snipe <snipe@snipe.net>
2022-06-06 20:03:20 -07:00
Ivan Nieto Vivanco 1030ad9a27 Early returns if no change is made in the Asset so the 'update' action doesn't log 2022-06-06 22:00:05 -05:00
snipe ab8dcdcc40 Merge remote-tracking branch 'origin/master' into develop 2022-06-06 19:35:29 -07:00
snipe 773997a492 Merge pull request #11261 from snipe/features/11255_add_location_2_to_locations_listing
Fixed #11255 - add address 2 field to locations listing
2022-06-06 19:35:07 -07:00
snipe 8333c80b7a Added address2 to column selector for locations listing
Signed-off-by: snipe <snipe@snipe.net>
2022-06-06 19:31:08 -07:00
snipe 96644ab6b9 Merge pull request #11259 from inietov/fixes/history_issues
Fixes some issues in the asset observer
2022-06-06 18:25:05 -07:00
Ivan Nieto Vivanco f977c53ecb Fixes some issues in the asset observer 2022-06-06 19:14:32 -05:00
Godfrey M 8c1843b351 updates colors in light color modes 2022-06-06 11:40:57 -07:00
snipe c9e86ac194 Merge remote-tracking branch 'origin/develop' 2022-06-06 10:23:37 -07:00
snipe f7449921e9 Merge pull request #11253 from snipe/features/nicer_locations_ui
Nicer locations UI
2022-06-06 10:23:04 -07:00
snipe 5f79534f4a Merge remote-tracking branch 'origin/develop' 2022-06-05 22:44:53 -07:00
snipe 3bcd5d94d6 Merge pull request #11254 from snipe/fixes/11224_only_show_possible_options_in_bulk_menu
Fixed  #11224 - only show menu options if the user is allowed
2022-06-05 22:44:26 -07:00
snipe 01348187c8 Fixed #11224 - only show menu options if the user is allowed
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 22:41:53 -07:00
snipe b26a4ad333 Added missing headers
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:35:57 -07:00
snipe 89f45d3d05 Removed extra console logs and unused variable
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:16:29 -07:00
snipe e83a062eda Use translation string for model editing
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:11:50 -07:00
snipe 1ea667e709 Update views with additional data fields
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:03:56 -07:00
snipe 5326ebd136 Removed toolbar div we weren’t using
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:03:45 -07:00
snipe 4db9892f8c Use partial in overdue audit screen
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:03:12 -07:00
snipe 880828379e Update bulki partials with new values
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:02:51 -07:00
snipe 9b54077409 Additional tweaks to BS tables partial
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 21:02:19 -07:00
snipe 9f478b51e2 Additional JS tweaking
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 20:13:51 -07:00
snipe 7c77e03c5a Initial rework of locations display
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 18:08:15 -07:00
snipe 9d3aed42b7 Add @denzfarid as a contributor 2022-06-05 17:16:58 -07:00
snipe 3dedd51b84 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2022-06-05 17:16:21 -07:00
snipe 711c713ab8 Bumped hash
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 17:15:29 -07:00
snipe 5bc5e9f108 Merge remote-tracking branch 'origin/develop'
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	resources/lang/en/admin/locations/general.php
2022-06-05 17:14:31 -07:00
snipe 9770692d07 Merge pull request #11251 from denzfarid/fixes/docker-php-redis-extension
Fixed #10910  : Add php-redis extension
2022-06-05 17:09:39 -07:00
snipe 133da6569b Merge pull request #11252 from snipe/fixes/locations_improvements
Fixes/locations improvements
2022-06-05 17:05:25 -07:00
snipe 985e683896 Small display improvements
Signed-off-by: snipe <snipe@snipe.net>
2022-06-05 16:59:53 -07:00
Raden Farid Nugraha c3698053ea Fixed ( #10910 ) : Add php redis extension 2022-06-06 06:58:07 +07:00
snipe dba06a3a9e Check for valid location before trying to print
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 16:56:15 -07:00
snipe 07b1062fb2 Better handle API calls to nonexistent users
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 16:55:23 -07:00
snipe be0933a708 Merge pull request #11249 from snipe/fixes/better_handle_bad_date_values
Fixed crashing on date formatting helper when value is not actually a date
2022-06-03 16:46:09 -07:00
snipe d31f185cce Display the actual value
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 15:36:52 -07:00
snipe 5901182885 Removed stray character
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 15:30:34 -07:00
snipe f033aeda83 Fixed typo in comments
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 15:28:00 -07:00
snipe 53f9e2bc7a Wrap the Carbon method in a try/catch to prevent crashing on bad data
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 15:25:39 -07:00
snipe 514db05770 Merge remote-tracking branch 'origin/develop' 2022-06-03 13:29:04 -07:00
snipe 7ca617f077 Merge pull request #11246 from snipe/fixes/clearer_placeholder_text_for_ldap
Added explicit “Example:” text in placeholders
2022-06-03 13:28:40 -07:00
snipe 8f5ac5fb55 Removed quotes around filter query
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 13:01:53 -07:00
snipe 54f828743e Merge remote-tracking branch 'origin/develop' 2022-06-03 12:54:13 -07:00
snipe f519fb747f Merge pull request #11248 from snipe/fixes/corrected_gate_on_assetmodels
Updated Asset Model gate to correctly display the button on view
2022-06-03 12:53:52 -07:00
snipe 36f714e414 Updated Asset Model gate to correctly display the button on view
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 12:52:53 -07:00
snipe 773c773773 Merge pull request #11247 from snipe/fixes/added_missing_validation_translations
Added the validation strings for user creation password options
2022-06-03 12:03:47 -07:00
snipe 3071a83ae0 Added the validation strings for user creation password options
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 12:00:56 -07:00
snipe 1c4864a3cc Added explicit “Example:” text in placeholders
Signed-off-by: snipe <snipe@snipe.net>
2022-06-03 11:25:18 -07:00
snipe 50c92d4730 Merge remote-tracking branch 'origin/develop' 2022-06-02 17:09:52 -07:00
snipe f8a0bf6a4b Merge pull request #11244 from snipe/fixes/drop_log_level_to_warn_on_SAML
Dropped log level to warn on SAML error
2022-06-02 17:09:32 -07:00
snipe 910fc08406 Dropped log level to warn on SAML error
Signed-off-by: snipe <snipe@snipe.net>
2022-06-02 17:07:49 -07:00
snipe eebc56d54b Merge remote-tracking branch 'origin/develop' 2022-06-02 16:33:04 -07:00
snipe b5ddc2c85b Merge pull request #11243 from snipe/fixes/fix_diff_time_in_audit_report
Don’t use the formatted date for diff days in audit report
2022-06-02 16:32:46 -07:00
snipe 4e03ebe284 Don’t use the formatted date for diff days in audit report
Signed-off-by: snipe <snipe@snipe.net>
2022-06-02 16:30:26 -07:00
snipe 7577fc61e4 Merge pull request #11235 from Godmartinz/gh_5644-checkout_history_for_accessories
fixed issue with misplaced div
2022-06-01 17:03:23 -07:00
Godfrey M d302675056 fixed a div placement 2022-06-01 16:58:29 -07:00
Godfrey M 5316f41eba fixed a div placement 2022-06-01 16:56:01 -07:00
snipe fa6c463d46 Merge pull request #11046 from Godmartinz/gh_5644-checkout_history_for_accessories
Added history tab to accessories
2022-06-01 12:46:38 -07:00
snipe 23a441e7c8 Merge remote-tracking branch 'origin/develop' 2022-06-01 10:27:50 -07:00
snipe ac993184ee Merge pull request #11233 from snipe/fixes/11232_depreciation_layout
Fixed #11232 - missing closing div
2022-06-01 10:27:25 -07:00
snipe 1dbc1f4aa2 Fixed #11232 - missing closing div
Signed-off-by: snipe <snipe@snipe.net>
2022-06-01 10:26:26 -07:00
Achmad Fienan Rahardianto fe65de1207 implements cookie to maintain display preference 2022-06-01 11:54:05 +07:00
snipe 089704c4f9 Merge remote-tracking branch 'origin/develop' 2022-05-31 14:17:23 -07:00
snipe bb933e5214 Merge pull request #11227 from inietov/fixes/exception_getimagesize
Fixes #11116 Error exception in getimagesize
2022-05-31 14:09:18 -07:00
Ivan Nieto Vivanco eb34cf7917 Evaluates if logo is uploaded before export PDF 2022-05-31 15:59:01 -05:00
snipe 4909cf2a9e Merge pull request #11212 from inietov/fixes/checkout_logs_require_target
Fixes Exception checkout logs require target
2022-05-28 06:12:55 -07:00
Ivan Nieto Vivanco 37f9cca5ec Minor stylistic change 2022-05-28 08:11:13 -05:00
Ivan Nieto Vivanco 72192257f2 Delete a test file 2022-05-26 18:18:13 -05:00
Ivan Nieto Vivanco e0050bc844 Don't let a license to be checked out to a non-existent target 2022-05-26 18:06:53 -05:00
snipe d2d0842737 Merge pull request #11206 from snipe/features/suggest_updating_global_composer
Added a self-update suggestion in the upgrader
2022-05-26 11:30:09 -07:00
snipe fe3b9f9e86 Added a self-update suggestion in the upgrader
Signed-off-by: snipe <snipe@snipe.net>
2022-05-25 19:18:37 -07:00
snipe 0ea6671bfa Merge pull request #11202 from snipe/fixes/livewire_config
Starter Livewire config (for subdirectories)
2022-05-25 17:32:17 -07:00
snipe 9209675d45 Merge pull request #11204 from inietov/fixes/file_uploads_dont_show_in_target_activity_report
Fixes #11193 File Uploads don't show target in Activity report
2022-05-25 17:30:01 -07:00
Ivan Nieto Vivanco 3e44f39f4d Set the new File column as not visible by default 2022-05-25 19:19:25 -05:00
Ivan Nieto Vivanco 1f6ab340a6 Give a more descriptive name to variable 2022-05-25 18:53:17 -05:00
Ivan Nieto Vivanco f208869aff Add column to show filenames in Activity Report if the log action is 'uploaded' 2022-05-25 18:50:32 -05:00
snipe c031686825 Fixed path
Signed-off-by: snipe <snipe@snipe.net>
2022-05-25 15:12:38 -07:00
snipe 791c39d977 Starter Livewire config (for subdirectories)
Signed-off-by: snipe <snipe@snipe.net>
2022-05-25 15:10:20 -07:00
snipe aac432b00c Merge remote-tracking branch 'origin/develop' 2022-05-24 20:53:36 -07:00
snipe 2b5b3273e2 Strip quote marks from env_values
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:52:03 -07:00
snipe 4f57eebf24 Merge remote-tracking branch 'origin/develop' 2022-05-24 20:10:13 -07:00
snipe 0c9a1a8922 Merge pull request #11198 from snipe/features/check_for_dev_v_prod_in_updater
Check for APP_ENV in upgrader
2022-05-24 20:09:43 -07:00
snipe fa2a3e4b03 Added a line break
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:08:04 -07:00
snipe 94a337fc9e Rearrange a few thing
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 20:03:10 -07:00
snipe 8d9cdf9c15 Check for APP_ENV
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:56:42 -07:00
snipe fb8d52d599 Merge remote-tracking branch 'origin/develop' 2022-05-24 19:37:34 -07:00
snipe 070c36ffe6 Merge pull request #11197 from uberbrady/improve_ldap_php_81
Fixes #11119 - Downgraded/Removed log statements
2022-05-24 19:37:04 -07:00
snipe 5db1c50816 Merge pull request #11196 from snipe/fearures/env_checker_in_upgrader
Added a simple .env checker into the upgrader
2022-05-24 19:36:21 -07:00
snipe 43e97ea6ea Make printout more consistent
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:36:01 -07:00
Brady Wetherington 8fdedf9441 Downgraded/Removed log statements 2022-05-24 19:30:22 -07:00
snipe b67ed3eac2 Check for present APP_KEY as well
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 19:24:03 -07:00
snipe 116ce931ce Fixed path name to backup temp dir
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 18:44:32 -07:00
snipe 15d0fb4feb Added permissions check
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 18:40:15 -07:00
snipe 132b164a74 Slightly clarified error text
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 17:51:46 -07:00
snipe bdbe2c3ac6 Added a simple .env checker into the upgrader
Signed-off-by: snipe <snipe@snipe.net>
2022-05-24 17:43:23 -07:00
Ivan Nieto Vivanco 340c59969c Add query to update assigned assets location when importing users 2022-05-19 13:34:50 -05:00
snipe 157944b774 Try conditiinal formatting to support apache 2.2 and 2.4
Signed-off-by: snipe <snipe@snipe.net>
2022-05-13 18:01:06 -07:00
Godfrey M 8ebe64e630 fixes final visual issue 2022-05-11 12:13:36 -07:00
Godfrey M c07a244bab fixes 1/2 visual issues, adds history tab to accessories 2022-05-10 11:20:42 -07:00
Shao Yu-Lung (Allen) 8a032ee040 fix type 2022-05-07 22:54:47 +08:00
Shao Yu-Lung (Allen) a835401cb2 skip run schedule analysis job on forked repos 2022-05-07 22:50:01 +08:00
Shao Yu-Lung (Allen) 2cd7c7a357 Ensure analysis job never runs on forked repos 2022-04-28 16:51:53 +08:00
Achmad Fienan Rahardianto dafe353050 Implements #8155 to improve the workflow during asset creation
- adding 2 options to hide optional information
2022-04-23 14:41:38 +07:00
Ivan Nieto Vivanco b5378eff64 Fix several typos 2022-04-05 16:12:31 -05:00
Ivan Nieto Vivanco 570dd09dcd Add validation to Accessories and Consumables to not let the user update the number of items to less than they already have checked out 2022-03-15 17:52:19 -06:00
Ivan Nieto Vivanco 0df9dd8320 Delete a function that is not longer used 2022-03-01 18:59:50 -06:00
Dampfklon 0d49fc3a2e remove unused route, controller functions and view 2022-02-13 12:10:19 +01:00
Dampfklon 43d92bec5b apply translation to view
rearrange eula on top
small design fixes
2022-02-13 12:02:20 +01:00
Tobias Regnery 1a908e361e Make locations deletable for non Superuser-Accounts with FullMultipleCompanySupport
locations->isDeletable() checks via gate::allows if a locations is deletable.
This calls SnipePermissionsPolicy->before() and checks for !Company::isCurrentUserHasAccess($item).
This returns false because locations don't have a company_id.

Check for this and return true if the item don't have a company_id.
2021-07-29 10:43:01 +02:00
3231 changed files with 74980 additions and 34446 deletions
+331
View File
@@ -2621,6 +2621,337 @@
"contributions": [
"code"
]
},
{
"login": "denzfarid",
"name": "denzfarid",
"avatar_url": "https://avatars.githubusercontent.com/u/1294403?v=4",
"profile": "https://github.com/denzfarid",
"contributions": []
},
{
"login": "ntbutler-nbcs",
"name": "ntbutler-nbcs",
"avatar_url": "https://avatars.githubusercontent.com/u/94018771?v=4",
"profile": "https://github.com/ntbutler-nbcs",
"contributions": [
"code"
]
},
{
"login": "naveensrinivasan",
"name": "Naveen",
"avatar_url": "https://avatars.githubusercontent.com/u/172697?v=4",
"profile": "https://naveensrinivasan.dev",
"contributions": [
"code"
]
},
{
"login": "mikeroq",
"name": "Mike Roquemore",
"avatar_url": "https://avatars.githubusercontent.com/u/55674383?v=4",
"profile": "https://github.com/mikeroq",
"contributions": [
"code"
]
},
{
"login": "reederda",
"name": "Daniel Reeder",
"avatar_url": "https://avatars.githubusercontent.com/u/7991086?v=4",
"profile": "https://github.com/reederda",
"contributions": [
"translation",
"translation",
"code"
]
},
{
"login": "vickyjaura183",
"name": "vickyjaura183",
"avatar_url": "https://avatars.githubusercontent.com/u/109422491?v=4",
"profile": "https://github.com/vickyjaura183",
"contributions": [
"code"
]
},
{
"login": "julian-piehl",
"name": "Peace",
"avatar_url": "https://avatars.githubusercontent.com/u/32363424?v=4",
"profile": "https://github.com/julian-piehl",
"contributions": [
"code"
]
},
{
"login": "kylegordon",
"name": "Kyle Gordon",
"avatar_url": "https://avatars.githubusercontent.com/u/231528?v=4",
"profile": "https://github.com/kylegordon",
"contributions": [
"code"
]
},
{
"login": "sunflowerbofh",
"name": "Katharina Drexel",
"avatar_url": "https://avatars.githubusercontent.com/u/53009155?v=4",
"profile": "http://www.bfh.ch",
"contributions": [
"code"
]
},
{
"login": "dsferruzza",
"name": "David Sferruzza",
"avatar_url": "https://avatars.githubusercontent.com/u/1931963?v=4",
"profile": "https://david.sferruzza.fr/",
"contributions": [
"code"
]
},
{
"login": "rnelsonee",
"name": "Rick Nelson",
"avatar_url": "https://avatars.githubusercontent.com/u/19511639?v=4",
"profile": "https://github.com/rnelsonee",
"contributions": [
"code"
]
},
{
"login": "BasO12",
"name": "BasO12",
"avatar_url": "https://avatars.githubusercontent.com/u/94169344?v=4",
"profile": "https://github.com/BasO12",
"contributions": [
"code"
]
},
{
"login": "Vautia",
"name": "Vautia",
"avatar_url": "https://avatars.githubusercontent.com/u/111710123?v=4",
"profile": "https://github.com/Vautia",
"contributions": [
"code"
]
},
{
"login": "chartjes",
"name": "Chris Hartjes",
"avatar_url": "https://avatars.githubusercontent.com/u/28321?v=4",
"profile": "http://www.littlehart.net/atthekeyboard",
"contributions": [
"code"
]
},
{
"login": "geo-chen",
"name": "geo-chen",
"avatar_url": "https://avatars.githubusercontent.com/u/2404584?v=4",
"profile": "https://github.com/geo-chen",
"contributions": [
"code"
]
},
{
"login": "nh314",
"name": "Phan Nguyen",
"avatar_url": "https://avatars.githubusercontent.com/u/6006620?v=4",
"profile": "https://github.com/nh314",
"contributions": [
"code"
]
},
{
"login": "StarlessNights",
"name": "Iisakki Jaakkola",
"avatar_url": "https://avatars.githubusercontent.com/u/115993812?v=4",
"profile": "https://github.com/StarlessNights",
"contributions": [
"code"
]
},
{
"login": "eltociear",
"name": "Ikko Ashimine",
"avatar_url": "https://avatars.githubusercontent.com/u/22633385?v=4",
"profile": "https://bandism.net/",
"contributions": [
"code"
]
},
{
"login": "lukasfehling",
"name": "Lukas Fehling",
"avatar_url": "https://avatars.githubusercontent.com/u/56871540?v=4",
"profile": "https://github.com/lukasfehling",
"contributions": [
"code"
]
},
{
"login": "fernando-almeida",
"name": "Fernando Almeida",
"avatar_url": "https://avatars.githubusercontent.com/u/1975990?v=4",
"profile": "https://github.com/fernando-almeida",
"contributions": [
"code"
]
},
{
"login": "akemidx",
"name": "akemidx",
"avatar_url": "https://avatars.githubusercontent.com/u/116301219?v=4",
"profile": "https://github.com/akemidx",
"contributions": [
"code"
]
},
{
"login": "oguzbilgic",
"name": "Oguz Bilgic",
"avatar_url": "https://avatars.githubusercontent.com/u/144778?v=4",
"profile": "http://oguz.site",
"contributions": [
"code"
]
},
{
"login": "scoo73r",
"name": "Scooter Crawford",
"avatar_url": "https://avatars.githubusercontent.com/u/9262438?v=4",
"profile": "https://github.com/scoo73r",
"contributions": [
"code"
]
},
{
"login": "subdriven",
"name": "subdriven",
"avatar_url": "https://avatars.githubusercontent.com/u/5957345?v=4",
"profile": "https://github.com/subdriven",
"contributions": [
"code"
]
},
{
"login": "AndrewSav",
"name": "Andrew Savinykh",
"avatar_url": "https://avatars.githubusercontent.com/u/658865?v=4",
"profile": "https://github.com/AndrewSav",
"contributions": [
"code"
]
},
{
"login": "kenchan0130",
"name": "Tadayuki Onishi",
"avatar_url": "https://avatars.githubusercontent.com/u/1155067?v=4",
"profile": "https://kenchan0130.github.io",
"contributions": [
"code"
]
},
{
"login": "floschoepfer",
"name": "Florian",
"avatar_url": "https://avatars.githubusercontent.com/u/112496896?v=4",
"profile": "https://github.com/floschoepfer",
"contributions": [
"code"
]
},
{
"login": "spencerrlongg",
"name": "Spencer Long",
"avatar_url": "https://avatars.githubusercontent.com/u/7305753?v=4",
"profile": "http://spencerlong.com",
"contributions": [
"code"
]
},
{
"login": "marcusmoore",
"name": "Marcus Moore",
"avatar_url": "https://avatars.githubusercontent.com/u/1141514?v=4",
"profile": "https://github.com/marcusmoore",
"contributions": [
"code"
]
},
{
"login": "Mezzle",
"name": "Martin Meredith",
"avatar_url": "https://avatars.githubusercontent.com/u/570639?v=4",
"profile": "https://github.com/Mezzle",
"contributions": []
},
{
"login": "dboth",
"name": "dboth",
"avatar_url": "https://avatars.githubusercontent.com/u/5731963?v=4",
"profile": "http://dboth.de",
"contributions": [
"code"
]
},
{
"login": "zacharyfleck",
"name": "Zachary Fleck",
"avatar_url": "https://avatars.githubusercontent.com/u/87536651?v=4",
"profile": "https://github.com/zacharyfleck",
"contributions": [
"code"
]
},
{
"login": "vikaas-cyper",
"name": "VIKAAS-A",
"avatar_url": "https://avatars.githubusercontent.com/u/74609912?v=4",
"profile": "https://github.com/vikaas-cyper",
"contributions": [
"code"
]
},
{
"login": "ak-piracha",
"name": "Abdul Kareem",
"avatar_url": "https://avatars.githubusercontent.com/u/88882041?v=4",
"profile": "https://github.com/ak-piracha",
"contributions": [
"code"
]
},
{
"login": "NojoudAlshehri",
"name": "NojoudAlshehri",
"avatar_url": "https://avatars.githubusercontent.com/u/111287779?v=4",
"profile": "https://github.com/NojoudAlshehri",
"contributions": [
"code"
]
},
{
"login": "stefanstidlffg",
"name": "Stefan Stidl",
"avatar_url": "https://avatars.githubusercontent.com/u/54367449?v=4",
"profile": "https://github.com/stefanstidlffg",
"contributions": [
"code"
]
},
{
"login": "qay21",
"name": "Quentin Aymard",
"avatar_url": "https://avatars.githubusercontent.com/u/87803479?v=4",
"profile": "https://github.com/qay21",
"contributions": [
"code"
]
}
]
}
+63
View File
@@ -0,0 +1,63 @@
version: 1
environment:
php: 8.0
node: 12
services:
- mysql: 5.7
- dusk:
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
pipeline:
- name: Setup
cmd: |
cp -v .env.example .env
composer install --no-interaction --prefer-dist --optimize-autoloader
- name: Generate Key
cmd: |
php artisan key:generate --force
- name: Passport Keys
cmd: |
php artisan passport:keys
- name: Run Migrations
cmd: |
# php artisan migrate --force
- name: PHPUnit Unit Tests
cmd: |
# php artisan test --testsuite Unit
- name: PHPUnit Feature Tests
cmd: |
# php artisan test --testsuite Feature
# - name: Browser Tests
# cmd: |
# cp -v .env.dusk.example .env.dusk.ci
# sed -i "s@APP_ENV=.*@APP_ENV=ci@g" .env.dusk.ci
# sed -i "s@APP_URL=.*@APP_URL=http://$BUILD_HOST:8000@g" .env.dusk.ci
# #sed -i "s@DB_HOST=.*@DB_HOST=mysql@g" .env.dusk.ci
# sed -i "s@DB_HOST=.*@DB_HOST=$DB_HOST@g" .env.dusk.ci
# sed -i "s@DB_USERNAME=.*@DB_USERNAME=chipperci@g" .env.dusk.ci
# sed -i "s@DB_DATABASE=.*@DB_DATABASE=chipperci@g" .env.dusk.ci
# sed -i "s@DB_PASSWORD=.*@DB_PASSWORD=secret@g" .env.dusk.ci
#
# php -S [::0]:8000 -t public 2>server.log &
# sleep 2
# php artisan dusk:chrome-driver $CHROME_DRIVER
# php artisan dusk --env=ci
+2 -2
View File
@@ -155,8 +155,8 @@ RESET_PASSWORD_LINK_EXPIRES=900
# --------------------------------------------
# OPTIONAL: MISC
# --------------------------------------------
APP_LOG=stderr
APP_LOG_MAX_FILES=10
LOG_CHANNEL=stderr
LOG_MAX_DAYS=10
APP_LOCKED=false
APP_CIPHER=AES-256-CBC
GOOGLE_MAPS_API=
+7 -6
View File
@@ -20,12 +20,13 @@ PUBLIC_FILESYSTEM_DISK=local_public
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=snipeit-local
DB_USERNAME=snipeit-local
DB_PASSWORD=snipeit-local
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
DB_PREFIX=null
DB_DUMP_PATH='/Applications/MAMP/Library/bin'
#DB_DUMP_PATH=
# --------------------------------------------
# OPTIONAL: SSL DATABASE SETTINGS
@@ -93,7 +94,7 @@ DISABLE_NOSAML_LOCAL_LOGIN=true
# --------------------------------------------
# OPTIONAL: MISC
# --------------------------------------------
APP_LOG=single
LOG_CHANNEL=single
LOG_LEVEL=debug
LOG_CHANNEL=stack
LOG_SLACK_WEBHOOK_URL=null
+29 -5
View File
@@ -24,6 +24,7 @@ PUBLIC_FILESYSTEM_DISK=local_public
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
@@ -70,11 +71,13 @@ IMAGE_LIB=gd
MAIL_BACKUP_NOTIFICATION_DRIVER=null
MAIL_BACKUP_NOTIFICATION_ADDRESS=null
BACKUP_ENV=true
ALLOW_BACKUP_DELETE=false
ALLOW_DATA_PURGE=false
# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
# --------------------------------------------
SESSION_DRIVER=file
SESSION_LIFETIME=12000
EXPIRE_ON_CLOSE=false
ENCRYPT=false
@@ -97,7 +100,6 @@ ENABLE_HSTS=false
# OPTIONAL: CACHE SETTINGS
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
CACHE_PREFIX=snipeit
@@ -146,13 +148,19 @@ AWS_DEFAULT_REGION=null
# --------------------------------------------
LOGIN_MAX_ATTEMPTS=5
LOGIN_LOCKOUT_DURATION=60
RESET_PASSWORD_LINK_EXPIRES=900
# --------------------------------------------
# OPTIONAL: FORGOTTEN PASSWORD SETTINGS
# --------------------------------------------
RESET_PASSWORD_LINK_EXPIRES=15
PASSWORD_CONFIRM_TIMEOUT=10800
PASSWORD_RESET_MAX_ATTEMPTS_PER_MIN=50
# --------------------------------------------
# OPTIONAL: MISC
# --------------------------------------------
APP_LOG=single
APP_LOG_MAX_FILES=10
LOG_CHANNEL=single
LOG_MAX_DAYS=10
APP_LOCKED=false
APP_CIPHER=AES-256-CBC
APP_FORCE_TLS=false
@@ -165,3 +173,19 @@ IMPORT_MEMORY_LIMIT=500M
REPORT_TIME_LIMIT=12000
REQUIRE_SAML=false
API_THROTTLE_PER_MINUTE=120
CSV_ESCAPE_FORMULAS=true
# --------------------------------------------
# OPTIONAL: HASHING
# --------------------------------------------
HASHING_DRIVER='bcrypt'
BCRYPT_ROUNDS=10
ARGON_MEMORY=1024
ARGON_THREADS=2
ARGON_TIME=2
# --------------------------------------------
# OPTIONAL: SCIM
# --------------------------------------------
SCIM_TRACE=false
SCIM_STANDARDS_COMPLIANCE=false
-74
View File
@@ -1,74 +0,0 @@
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='US/Pacific'
APP_LOCALE=en
FILESYSTEM_DISK=local
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=sqlite_testing
DB_HOST=localhost
DB_DATABASE=testing.sqlite
DB_USERNAME=null
DB_PASSWORD=null
# --------------------------------------------
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
# --------------------------------------------
MAIL_DRIVER=log
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=YOURUSERNAME
MAIL_PASSWORD=YOURPASSWORD
MAIL_ENCRYPTION=null
MAIL_FROM_ADDR=you@example.com
MAIL_FROM_NAME=Snipe-IT
# --------------------------------------------
# REQUIRED: IMAGE LIBRARY
# This should be gd or imagick
# --------------------------------------------
IMAGE_LIB=gd
# --------------------------------------------
# OPTIONAL: AWS SETTINGS
# --------------------------------------------
AWS_SECRET_ACCESS_KEY=null
AWS_ACCESS_KEY_ID=null
AWS_DEFAULT_REGION=null
AWS_BUCKET=null
AWS_BUCKET_ROOT=null
AWS_URL=null
# --------------------------------------------
# OPTIONAL: CACHE SETTINGS
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
# --------------------------------------------
SESSION_LIFETIME=12000
EXPIRE_ON_CLOSE=false
ENCRYPT=false
COOKIE_NAME=snipeittest_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
# --------------------------------------------
# OPTIONAL: APP LOG FORMAT
# --------------------------------------------
APP_LOG=single
APP_LOG_LEVEL=debug
+2 -1
View File
@@ -14,6 +14,7 @@ FILESYSTEM_DISK=local
# --------------------------------------------
DB_CONNECTION=sqlite
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE='sqlite_testing'
DB_USERNAME=root
DB_PASSWORD=null
@@ -34,4 +35,4 @@ IMAGE_LIB=gd
# --------------------------------------------
# OPTIONAL: APP LOG FORMAT
# --------------------------------------------
APP_LOG=single
LOG_CHANNEL=single
+19
View File
@@ -0,0 +1,19 @@
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:glJpcM7BYwWiBggp3SQ/+NlRkqsBQMaGEOjemXqJzOU=
APP_URL=http://localhost:8000
APP_TIMEZONE='UTC'
APP_LOCALE=en
# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
+1
View File
@@ -4,6 +4,7 @@ APP_URL=http://snipe-it.localapp
DB_CONNECTION=mysql
DB_DEFAULT=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=snipeittests
DB_USERNAME=snipeit
DB_PASSWORD=snipe
+1
View File
@@ -4,6 +4,7 @@ APP_URL=http://snipe-it.localapp
DB_CONNECTION=sqlite_testing
DB_DEFAULT=sqlite_testing
DB_HOST=localhost
DB_PORT=3306
APP_KEY=base64:tu9NRh/a6+dCXBDGvg0Gv/0TcABnFsbT4AKxrr8mwQo=
+1 -1
View File
@@ -15,8 +15,8 @@
# *.js @octocat @github/js
app/Importer/* @dmeltzer
app/Http/Controllers/CustomFields* @uberbrady
app/Http/Controllers/Api/CustomFields* @uberbrady
resources/views/custom_fields/* @uberbrady
docker/* @uberbrady
app/Providers/SamlServiceProvider.php @uberbrady
@@ -2,8 +2,6 @@ name: Feature Request
description: Suggest an idea for this project
title: "[Feature Request]: "
labels: ["feature request"]
assignees:
- snipe
body:
- type: textarea
attributes:
+21 -3
View File
@@ -1,4 +1,22 @@
frontend: ["*.js", "*.css", "*.vue", "*.scss", "*.less", "*.blade.*"]
backend: ["/app", "*.php"]
legal: ["LICENSE*", "NOTICES*"]
frontend: ["*.js", "*.css", "*.vue", "*.scss", "*.less", "*.blade.*", "resources/views/livewire/*"]
skins: ["*.js", "*.css", "*.scss", "*.less"]
css: ["*.css","*.scss", "*.less"]
javascript: ["*.js", "package.json", "package.lock"]
backend: ["/app/*", "composer.json", "composer.lock"]
translations: ["/resources/lang"]
livewire: ["/app/Http/Livewire/*", "resources/views/livewire/*"]
backups: ["*backup*"]
restore: ["*restore*"]
saml: ["*saml*"]
scim: ["*scim*"]
custom fields: ["*fields*", "*fieldsets*"]
dependencies: ["composer.json", "composer.lock", "package.json", "package.lock"]
consumables: ["*consumables*"]
api: ["/app/Http/Controllers/Api/*"]
notifications: ["/app/Notifications/*"]
importer: ["/app/Importer/*","/app/Http/Livewire/Importer.php", "resources/views/livewire/importer.php"]
cli / artisan: ["/app/Console/*"]
LDAP: ["*Ldap*", "/app/Console/Commands/Ldap*","/app/Models/Ldap.php"]
docker: ["*docker/*", "Dockerfile", "Dockerfile.alpine", "Dockerfile.fpm-alpine", ".dockerignore", ".env.docker"]
tests: ["/tests/*", "/stubs"]
config: .github
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
+4 -4
View File
@@ -26,14 +26,14 @@ jobs:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3.3.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
+11 -3
View File
@@ -17,18 +17,26 @@ on:
schedule:
- cron: '36 23 * * 3'
permissions:
contents: read
jobs:
codacy-security-scan:
# Ensure schedule job never runs on forked repos. It's only executed for 'snipe/snipe-it'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
if: (github.repository == 'snipe/snipe-it') || ((github.repository != 'snipe/snipe-it') && (github.event_name != 'schedule'))
name: Codacy Security Scan
runs-on: ubuntu-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3.3.0
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@1.1.0
uses: codacy/codacy-analysis-cli-action@v4.3.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
@@ -44,6 +52,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
+21
View File
@@ -0,0 +1,21 @@
name: Crowdin Action
on:
push:
branches: [ develop ]
jobs:
upload-sources-to-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Crowdin push
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: false
download_translations: false
project_id: ${{ secrets.CROWDIN_PROJECT_ID }}
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
+9 -6
View File
@@ -15,6 +15,9 @@ on:
pull_request:
permissions:
contents: read
jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for 'snipe/snipe-it'
@@ -38,17 +41,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
uses: actions/checkout@v3.3.0
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -60,7 +63,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -69,11 +72,11 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.alpine
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
+9 -6
View File
@@ -15,6 +15,9 @@ on:
pull_request:
permissions:
contents: read
jobs:
docker:
# Ensure this job never runs on forked repos. It's only executed for 'snipe/snipe-it'
@@ -38,17 +41,17 @@ jobs:
steps:
# https://github.com/actions/checkout
- name: Checkout codebase
uses: actions/checkout@v2
uses: actions/checkout@v3.3.0
# https://github.com/docker/setup-buildx-action
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
# https://github.com/docker/login-action
- name: Login to DockerHub
# Only login if not a PR, as PRs only trigger a Docker build and not a push
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
@@ -60,7 +63,7 @@ jobs:
# Get Metadata for docker_build step below
- name: Sync metadata (tags, labels) from GitHub to Docker for 'snipe-it' image
id: meta_build
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: snipe/snipe-it
tags: ${{ env.IMAGE_TAGS }}
@@ -69,11 +72,11 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push 'snipe-it' image
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
+4
View File
@@ -1,6 +1,10 @@
.couscous
.DS_Store
.env
.env.dusk.*
!.env.dusk.example
.env.testing
phpstan.neon
.idea
/bin/
/bootstrap/compiled.php
+19 -16
View File
@@ -1,4 +1,4 @@
FROM ubuntu:20.04
FROM ubuntu:22.04
LABEL maintainer="Brady Wetherington <bwetherington@grokability.com>"
# No need to add `apt-get clean` here, reference:
@@ -14,15 +14,17 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
apt-utils \
apache2 \
apache2-bin \
libapache2-mod-php7.4 \
php7.4-curl \
php7.4-ldap \
php7.4-mysql \
php7.4-gd \
php7.4-xml \
php7.4-mbstring \
php7.4-zip \
php7.4-bcmath \
libapache2-mod-php8.1 \
php8.1-curl \
php8.1-ldap \
php8.1-mysql \
php8.1-gd \
php8.1-xml \
php8.1-mbstring \
php8.1-zip \
php8.1-bcmath \
php8.1-redis \
php-memcached \
patch \
curl \
wget \
@@ -36,9 +38,10 @@ gcc \
make \
autoconf \
libc-dev \
libldap-common \
pkg-config \
libmcrypt-dev \
php7.4-dev \
php8.1-dev \
ca-certificates \
unzip \
dnsutils \
@@ -48,16 +51,16 @@ dnsutils \
RUN curl -L -O https://github.com/pear/pearweb_phars/raw/master/go-pear.phar
RUN php go-pear.phar
RUN pecl install mcrypt-1.0.3
RUN pecl install mcrypt
RUN bash -c "echo extension=/usr/lib/php/20190902/mcrypt.so > /etc/php/7.4/mods-available/mcrypt.ini"
RUN bash -c "echo extension=/usr/lib/php/20210902/mcrypt.so > /etc/php/8.1/mods-available/mcrypt.ini"
RUN phpenmod mcrypt
RUN phpenmod gd
RUN phpenmod bcmath
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.4/cli/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/8.1/cli/php.ini
RUN useradd -m --uid 1000 --gid 50 docker
@@ -138,4 +141,4 @@ RUN chmod +x /startup.sh /usr/bin/supervisor-exit-event-listener
CMD ["/startup.sh"]
EXPOSE 80
EXPOSE 443
EXPOSE 443
+30 -28
View File
@@ -1,32 +1,34 @@
FROM alpine:3.14.2
FROM alpine:3.17.3
# Apache + PHP
RUN apk add --no-cache \
apache2 \
php7 \
php7-common \
php7-apache2 \
php7-curl \
php7-ldap \
php7-mysqli \
php7-gd \
php7-xml \
php7-mbstring \
php7-zip \
php7-ctype \
php7-tokenizer \
php7-pdo_mysql \
php7-openssl \
php7-bcmath \
php7-phar \
php7-json \
php7-iconv \
php7-fileinfo \
php7-simplexml \
php7-session \
php7-dom \
php7-xmlwriter \
php7-xmlreader \
php7-sodium \
php81 \
php81-common \
php81-apache2 \
php81-curl \
php81-ldap \
php81-mysqli \
php81-gd \
php81-xml \
php81-mbstring \
php81-zip \
php81-ctype \
php81-tokenizer \
php81-pdo_mysql \
php81-openssl \
php81-bcmath \
php81-phar \
php81-json \
php81-iconv \
php81-fileinfo \
php81-simplexml \
php81-session \
php81-dom \
php81-xmlwriter \
php81-xmlreader \
php81-sodium \
php81-redis \
php81-pecl-memcached \
curl \
wget \
vim \
@@ -39,7 +41,7 @@ COPY docker/column-statistics.cnf /etc/mysql/conf.d/column-statistics.cnf
# Where apache's PID lives
RUN mkdir -p /run/apache2 && chown apache:apache /run/apache2
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php7/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php81/php.ini
COPY docker/000-default-2.4.conf /etc/apache2/conf.d/default.conf
# Enable mod_rewrite
@@ -84,4 +86,4 @@ ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/entrypoint.sh"]
EXPOSE 80
EXPOSE 80
+8 -8
View File
@@ -1,8 +1,8 @@
ARG ENVIRONMENT=production
ARG SNIPEIT_RELEASE=5.1.3
ARG PHP_VERSION=7.4.16
ARG PHP_ALPINE_VERSION=3.13
ARG COMPOSER_VERSION=2.0.11
ARG SNIPEIT_RELEASE=6.1.0
ARG PHP_VERSION=8.2
ARG PHP_ALPINE_VERSION=3.17
ARG COMPOSER_VERSION=2
# Cannot use arguments with 'COPY --from' workaround
# https://github.com/moby/moby/issues/34482#issuecomment-454716952
@@ -52,7 +52,7 @@ RUN { \
# Install php extensions inside docker containers easily
# https://github.com/mlocati/docker-php-extension-installer
COPY --from=mlocati/php-extension-installer:1.2.19 /usr/bin/install-php-extensions /usr/local/bin/
COPY --from=mlocati/php-extension-installer:2.1.15 /usr/bin/install-php-extensions /usr/local/bin/
RUN set -eux; \
install-php-extensions \
bcmath \
@@ -75,14 +75,14 @@ RUN set -eux; \
rm snipeit.tar.gz; \
# Install composer php dependencies
if [ "$ENVIRONMENT" = "production" ]; then \
echo "production enviroment detected!"; \
echo "production environment detected!"; \
composer update \
--no-cache \
--no-dev \
--optimize-autoloader \
--working-dir=/var/www/html; \
else \
echo "development enviroment detected!"; \
echo "development environment detected!"; \
apk add --no-cache \
${DEV_PACKAGES}; \
composer update \
@@ -100,4 +100,4 @@ COPY --chown=www-data:www-data docker/docker-secrets.env /var/www/html/.env
COPY --chmod=655 docker/docker-entrypoint.sh /usr/local/bin/docker-snipeit-entrypoint
COPY docker/column-statistics.cnf /etc/mysql/conf.d/column-statistics.cnf
ENTRYPOINT [ "/usr/local/bin/docker-snipeit-entrypoint" ]
CMD [ "/usr/local/bin/docker-php-entrypoint", "php-fpm" ]
CMD [ "/usr/local/bin/docker-php-entrypoint", "php-fpm" ]
+18 -4
View File
@@ -1,5 +1,5 @@
![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-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)
[![All Contributors](https://img.shields.io/badge/all_contributors-325-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
@@ -59,14 +59,20 @@ Since the release of the JSON REST API, several third-party developers have been
- [SnipeSharp - .NET module in C#](https://github.com/barrycarey/SnipeSharp) by [@barrycarey](https://github.com/barrycarey)
- [InQRy -unmaintained-](https://github.com/Microsoft/InQRy) by [@Microsoft](https://github.com/Microsoft)
- [SnipeitPS](https://github.com/snazy2000/SnipeitPS) by [@snazy2000](https://github.com/snazy2000) - Powershell API Wrapper for Snipe-it
- [jamf2snipe](https://github.com/ParadoxGuitarist/jamf2snipe) by [@ParadoxGuitarist](https://github.com/ParadoxGuitarist) - Python script to sync assets between a JAMFPro instance and a Snipe-IT instance
- [jamf2snipe](https://github.com/grokability/jamf2snipe) - Python script to sync assets between a JAMFPro instance and a Snipe-IT instance
- [jamf-snipe-rename](https://macblog.org/jamf-snipe-rename/) - Python script to rename computers in Jamf from Snipe-IT
- [Marksman](https://github.com/Scope-IT/marksman) - A Windows agent for Snipe-IT
- [Snipe-IT plugin for Jira Service Desk](https://marketplace.atlassian.com/apps/1220964/snipe-it-for-jira)
- [Python 3 CSV importer](https://github.com/gastamper/snipeit-csvimporter) - allows importing assets into Snipe-IT based on Item Name rather than Asset Tag.
- [Snipe-IT Kubernetes Helm Chart](https://github.com/t3n/helm-charts/tree/master/snipeit) - For more information, [click here](https://hub.helm.sh/charts/t3n/snipeit).
- [Snipe-IT Bulk Edit](https://github.com/bricelabelle/snipe-it-bulkedit) - Google Script files to use Google Sheets as a bulk checkout/checkin/edit tool for Snipe-it.
- [MosyleSnipeSync](https://github.com/RodneyLeeBrands/MosyleSnipeSync) by [@Karpadiem](https://github.com/Karpadiem) - Python script to synchronize information between Mosyle and Snipe-IT
- [WWW::SnipeIT](https://github.com/SEDC/perl-www-snipeit) by [@SEDC](https://github.com/SEDC) - perl module for accessing the API
- [UniFi to Snipe-IT](https://github.com/RodneyLeeBrands/UnifiSnipeSync) by [@karpadiem](https://github.com/karpadiem) - Python script that synchronizes UniFi devices with Snipe-IT.
- [Kandji2Snipe](https://github.com/grokability/kandji2snipe) by [@briangoldstein](https://github.com/briangoldstein) - Python script that synchronizes Kandji with Snipe-IT.
- [SnipeAgent](https://github.com/ReticentRobot/SnipeAgent) by @ReticentRobot - Windows agent for Snipe-IT
As these were created by third-parties, Snipe-IT cannot provide support for these project, and you should contact the developers directly if you need assistance. Additionally, Snipe-IT makes no guarantees as to the reliability, accuracy or maintainability of these libraries. Use at your own risk. :)
As these were created by third-parties, Snipe-IT cannot provide support for these project, and you should contact the developers directly if you need assistance. Additionally, Snipe-IT makes no guarantees as to the reliability, accuracy or maintainability of these libraries. Use at your own risk. :)
-----
@@ -77,6 +83,8 @@ Please see the documentation on [contributing and developing for Snipe-IT](https
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
The ERD is available [online here](https://drawsql.app/templates/snipe-it).
-----
### Security
@@ -131,7 +139,13 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [<img src="https://avatars.githubusercontent.com/u/1975640?v=4" width="110px;"/><br /><sub>Evan Taylor</sub>](https://github.com/Delta5)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Delta5 "Code") | [<img src="https://avatars.githubusercontent.com/u/8735148?v=4" width="110px;"/><br /><sub>Petri Asikainen</sub>](https://github.com/PetriAsi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PetriAsi "Code") | [<img src="https://avatars.githubusercontent.com/u/11424540?v=4" width="110px;"/><br /><sub>derdeagle</sub>](https://github.com/derdeagle)<br />[💻](https://github.com/snipe/snipe-it/commits?author=derdeagle "Code") | [<img src="https://avatars.githubusercontent.com/u/176950?v=4" width="110px;"/><br /><sub>Mike Frysinger</sub>](https://wh0rd.org/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vapier "Code") | [<img src="https://avatars.githubusercontent.com/u/22044358?v=4" width="110px;"/><br /><sub>ALPHA</sub>](https://github.com/AL4AL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AL4AL "Code") | [<img src="https://avatars.githubusercontent.com/u/1042587?v=4" width="110px;"/><br /><sub>FliegenKLATSCH</sub>](https://www.ifern.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FliegenKLATSCH "Code") | [<img src="https://avatars.githubusercontent.com/u/442138?v=4" width="110px;"/><br /><sub>Jeremy Price</sub>](https://github.com/jerm)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jerm "Code") |
| [<img src="https://avatars.githubusercontent.com/u/84392209?v=4" width="110px;"/><br /><sub>Toreg87</sub>](https://github.com/Toreg87)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Toreg87 "Code") | [<img src="https://avatars.githubusercontent.com/u/67638596?v=4" width="110px;"/><br /><sub>Matthew Nickson</sub>](https://github.com/Computroniks)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Computroniks "Code") | [<img src="https://avatars.githubusercontent.com/u/1646397?v=4" width="110px;"/><br /><sub>Jethro Nederhof</sub>](https://jethron.id.au)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jethron "Code") | [<img src="https://avatars.githubusercontent.com/u/23289826?v=4" width="110px;"/><br /><sub>Oskar Stenberg</sub>](https://github.com/01ste02)<br />[💻](https://github.com/snipe/snipe-it/commits?author=01ste02 "Code") | [<img src="https://avatars.githubusercontent.com/u/82208283?v=4" width="110px;"/><br /><sub>Robert-Azelis</sub>](https://github.com/Robert-Azelis)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Robert-Azelis "Code") | [<img src="https://avatars.githubusercontent.com/u/60648387?v=4" width="110px;"/><br /><sub>Alexander William Smith</sub>](https://github.com/alwism)<br />[💻](https://github.com/snipe/snipe-it/commits?author=alwism "Code") | [<img src="https://avatars.githubusercontent.com/u/24418301?v=4" width="110px;"/><br /><sub>LEITWERK AG</sub>](https://www.leitwerk.de/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=leitwerk-ag "Code") |
| [<img src="https://avatars.githubusercontent.com/u/1911435?v=4" width="110px;"/><br /><sub>Adam</sub>](http://www.aboutcher.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adamboutcher "Code") | [<img src="https://avatars.githubusercontent.com/u/16104273?v=4" width="110px;"/><br /><sub>Ian</sub>](https://snksrv.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sneak-it "Code") | [<img src="https://avatars.githubusercontent.com/u/4023909?v=4" width="110px;"/><br /><sub>Shao Yu-Lung (Allen)</sub>](http://blog.bestlong.idv.tw/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bestlong "Code") | [<img src="https://avatars.githubusercontent.com/u/76475453?v=4" width="110px;"/><br /><sub>Haxatron</sub>](https://github.com/Haxatron)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Haxatron "Code") | [<img src="https://avatars.githubusercontent.com/u/88776392?v=4" width="110px;"/><br /><sub>PlaneNuts</sub>](https://github.com/PlaneNuts)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PlaneNuts "Code") | [<img src="https://avatars.githubusercontent.com/u/3842948?v=4" width="110px;"/><br /><sub>Bradley Coudriet</sub>](http://bjcpgd.cias.rit.edu)<br />[💻](https://github.com/snipe/snipe-it/commits?author=exula "Code") | [<img src="https://avatars.githubusercontent.com/u/21966173?v=4" width="110px;"/><br /><sub>Dalton Durst</sub>](https://daltondur.st)<br />[💻](https://github.com/snipe/snipe-it/commits?author=UniversalSuperBox "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") |
| [<img src="https://avatars.githubusercontent.com/u/38761237?v=4" width="110px;"/><br /><sub>Alex Janes</sub>](https://adagiohealth.org)<br />[💻](https://github.com/snipe/snipe-it/commits?author=adagioajanes "Code") | [<img src="https://avatars.githubusercontent.com/u/32387849?v=4" width="110px;"/><br /><sub>Nuraeil</sub>](https://github.com/nuraeil)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nuraeil "Code") | [<img src="https://avatars.githubusercontent.com/u/48162670?v=4" width="110px;"/><br /><sub>TenOfTens</sub>](https://github.com/TenOfTens)<br />[💻](https://github.com/snipe/snipe-it/commits?author=TenOfTens "Code") | [<img src="https://avatars.githubusercontent.com/u/9415391?v=4" width="110px;"/><br /><sub>waffle</sub>](https://ditisjens.be/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=insert-waffle "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") | [<img src="https://avatars.githubusercontent.com/u/3839381?v=4" width="110px;"/><br /><sub>Achmad Fienan Rahardianto</sub>](https://github.com/veenone)<br />[💻](https://github.com/snipe/snipe-it/commits?author=veenone "Code") | [<img src="https://avatars.githubusercontent.com/u/19945501?v=4" width="110px;"/><br /><sub>Yevhenii Huzii</sub>](https://github.com/QveenSi)<br />[💻](https://github.com/snipe/snipe-it/commits?author=QveenSi "Code") |
| [<img src="https://avatars.githubusercontent.com/u/97299851?v=4" width="110px;"/><br /><sub>Christian Weirich</sub>](https://github.com/chrisweirich)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chrisweirich "Code") | [<img src="https://avatars.githubusercontent.com/u/1294403?v=4" width="110px;"/><br /><sub>denzfarid</sub>](https://github.com/denzfarid)<br /> | [<img src="https://avatars.githubusercontent.com/u/94018771?v=4" width="110px;"/><br /><sub>ntbutler-nbcs</sub>](https://github.com/ntbutler-nbcs)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ntbutler-nbcs "Code") | [<img src="https://avatars.githubusercontent.com/u/172697?v=4" width="110px;"/><br /><sub>Naveen</sub>](https://naveensrinivasan.dev)<br />[💻](https://github.com/snipe/snipe-it/commits?author=naveensrinivasan "Code") | [<img src="https://avatars.githubusercontent.com/u/55674383?v=4" width="110px;"/><br /><sub>Mike Roquemore</sub>](https://github.com/mikeroq)<br />[💻](https://github.com/snipe/snipe-it/commits?author=mikeroq "Code") | [<img src="https://avatars.githubusercontent.com/u/7991086?v=4" width="110px;"/><br /><sub>Daniel Reeder</sub>](https://github.com/reederda)<br />[🌍](#translation-reederda "Translation") [🌍](#translation-reederda "Translation") [💻](https://github.com/snipe/snipe-it/commits?author=reederda "Code") | [<img src="https://avatars.githubusercontent.com/u/109422491?v=4" width="110px;"/><br /><sub>vickyjaura183</sub>](https://github.com/vickyjaura183)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vickyjaura183 "Code") |
| [<img src="https://avatars.githubusercontent.com/u/32363424?v=4" width="110px;"/><br /><sub>Peace</sub>](https://github.com/julian-piehl)<br />[💻](https://github.com/snipe/snipe-it/commits?author=julian-piehl "Code") | [<img src="https://avatars.githubusercontent.com/u/231528?v=4" width="110px;"/><br /><sub>Kyle Gordon</sub>](https://github.com/kylegordon)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kylegordon "Code") | [<img src="https://avatars.githubusercontent.com/u/53009155?v=4" width="110px;"/><br /><sub>Katharina Drexel</sub>](http://www.bfh.ch)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sunflowerbofh "Code") | [<img src="https://avatars.githubusercontent.com/u/1931963?v=4" width="110px;"/><br /><sub>David Sferruzza</sub>](https://david.sferruzza.fr/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dsferruzza "Code") | [<img src="https://avatars.githubusercontent.com/u/19511639?v=4" width="110px;"/><br /><sub>Rick Nelson</sub>](https://github.com/rnelsonee)<br />[💻](https://github.com/snipe/snipe-it/commits?author=rnelsonee "Code") | [<img src="https://avatars.githubusercontent.com/u/94169344?v=4" width="110px;"/><br /><sub>BasO12</sub>](https://github.com/BasO12)<br />[💻](https://github.com/snipe/snipe-it/commits?author=BasO12 "Code") | [<img src="https://avatars.githubusercontent.com/u/111710123?v=4" width="110px;"/><br /><sub>Vautia</sub>](https://github.com/Vautia)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Vautia "Code") |
| [<img src="https://avatars.githubusercontent.com/u/28321?v=4" width="110px;"/><br /><sub>Chris Hartjes</sub>](http://www.littlehart.net/atthekeyboard)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chartjes "Code") | [<img src="https://avatars.githubusercontent.com/u/2404584?v=4" width="110px;"/><br /><sub>geo-chen</sub>](https://github.com/geo-chen)<br />[💻](https://github.com/snipe/snipe-it/commits?author=geo-chen "Code") | [<img src="https://avatars.githubusercontent.com/u/6006620?v=4" width="110px;"/><br /><sub>Phan Nguyen</sub>](https://github.com/nh314)<br />[💻](https://github.com/snipe/snipe-it/commits?author=nh314 "Code") | [<img src="https://avatars.githubusercontent.com/u/115993812?v=4" width="110px;"/><br /><sub>Iisakki Jaakkola</sub>](https://github.com/StarlessNights)<br />[💻](https://github.com/snipe/snipe-it/commits?author=StarlessNights "Code") | [<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="110px;"/><br /><sub>Ikko Ashimine</sub>](https://bandism.net/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=eltociear "Code") | [<img src="https://avatars.githubusercontent.com/u/56871540?v=4" width="110px;"/><br /><sub>Lukas Fehling</sub>](https://github.com/lukasfehling)<br />[💻](https://github.com/snipe/snipe-it/commits?author=lukasfehling "Code") | [<img src="https://avatars.githubusercontent.com/u/1975990?v=4" width="110px;"/><br /><sub>Fernando Almeida</sub>](https://github.com/fernando-almeida)<br />[💻](https://github.com/snipe/snipe-it/commits?author=fernando-almeida "Code") |
| [<img src="https://avatars.githubusercontent.com/u/116301219?v=4" width="110px;"/><br /><sub>akemidx</sub>](https://github.com/akemidx)<br />[💻](https://github.com/snipe/snipe-it/commits?author=akemidx "Code") | [<img src="https://avatars.githubusercontent.com/u/144778?v=4" width="110px;"/><br /><sub>Oguz Bilgic</sub>](http://oguz.site)<br />[💻](https://github.com/snipe/snipe-it/commits?author=oguzbilgic "Code") | [<img src="https://avatars.githubusercontent.com/u/9262438?v=4" width="110px;"/><br /><sub>Scooter Crawford</sub>](https://github.com/scoo73r)<br />[💻](https://github.com/snipe/snipe-it/commits?author=scoo73r "Code") | [<img src="https://avatars.githubusercontent.com/u/5957345?v=4" width="110px;"/><br /><sub>subdriven</sub>](https://github.com/subdriven)<br />[💻](https://github.com/snipe/snipe-it/commits?author=subdriven "Code") | [<img src="https://avatars.githubusercontent.com/u/658865?v=4" width="110px;"/><br /><sub>Andrew Savinykh</sub>](https://github.com/AndrewSav)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AndrewSav "Code") | [<img src="https://avatars.githubusercontent.com/u/1155067?v=4" width="110px;"/><br /><sub>Tadayuki Onishi</sub>](https://kenchan0130.github.io)<br />[💻](https://github.com/snipe/snipe-it/commits?author=kenchan0130 "Code") | [<img src="https://avatars.githubusercontent.com/u/112496896?v=4" width="110px;"/><br /><sub>Florian</sub>](https://github.com/floschoepfer)<br />[💻](https://github.com/snipe/snipe-it/commits?author=floschoepfer "Code") |
| [<img src="https://avatars.githubusercontent.com/u/7305753?v=4" width="110px;"/><br /><sub>Spencer Long</sub>](http://spencerlong.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=spencerrlongg "Code") | [<img src="https://avatars.githubusercontent.com/u/1141514?v=4" width="110px;"/><br /><sub>Marcus Moore</sub>](https://github.com/marcusmoore)<br />[💻](https://github.com/snipe/snipe-it/commits?author=marcusmoore "Code") | [<img src="https://avatars.githubusercontent.com/u/570639?v=4" width="110px;"/><br /><sub>Martin Meredith</sub>](https://github.com/Mezzle)<br /> | [<img src="https://avatars.githubusercontent.com/u/5731963?v=4" width="110px;"/><br /><sub>dboth</sub>](http://dboth.de)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dboth "Code") | [<img src="https://avatars.githubusercontent.com/u/87536651?v=4" width="110px;"/><br /><sub>Zachary Fleck</sub>](https://github.com/zacharyfleck)<br />[💻](https://github.com/snipe/snipe-it/commits?author=zacharyfleck "Code") | [<img src="https://avatars.githubusercontent.com/u/74609912?v=4" width="110px;"/><br /><sub>VIKAAS-A</sub>](https://github.com/vikaas-cyper)<br />[💻](https://github.com/snipe/snipe-it/commits?author=vikaas-cyper "Code") | [<img src="https://avatars.githubusercontent.com/u/88882041?v=4" width="110px;"/><br /><sub>Abdul Kareem</sub>](https://github.com/ak-piracha)<br />[💻](https://github.com/snipe/snipe-it/commits?author=ak-piracha "Code") |
| [<img src="https://avatars.githubusercontent.com/u/111287779?v=4" width="110px;"/><br /><sub>NojoudAlshehri</sub>](https://github.com/NojoudAlshehri)<br />[💻](https://github.com/snipe/snipe-it/commits?author=NojoudAlshehri "Code") | [<img src="https://avatars.githubusercontent.com/u/54367449?v=4" width="110px;"/><br /><sub>Stefan Stidl</sub>](https://github.com/stefanstidlffg)<br />[💻](https://github.com/snipe/snipe-it/commits?author=stefanstidlffg "Code") | [<img src="https://avatars.githubusercontent.com/u/87803479?v=4" width="110px;"/><br /><sub>Quentin Aymard</sub>](https://github.com/qay21)<br />[💻](https://github.com/snipe/snipe-it/commits?author=qay21 "Code") |
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
+51
View File
@@ -0,0 +1,51 @@
# Running the Test Suite
This document is targeted at developers looking to make modifications to this application's code base and want to run the existing test suite.
Before starting, follow the [instructions](README.md#installation) for installing the application locally and ensure you can load it in a browser properly.
## Unit and Feature Tests
Before attempting to run the test suite copy the example environment file for tests and update the values to match your environment:
`cp .env.testing.example .env.testing`
> Since the data in the database is flushed after each test it is recommended you create a separate mysql database for specifically for tests
Now you are ready to run the entire test suite from your terminal:
`php artisan test`
To run individual test files, you can pass the path to the test that you want to run:
`php artisan test tests/Unit/AccessoryTest.php`
## Browser Tests
Browser tests are run via [Laravel Dusk](https://laravel.com/docs/8.x/dusk) and require Google Chrome to be installed.
Before attempting to run Dusk tests copy the example environment file for Dusk and update the values to match your environment:
`cp .env.dusk.example .env.dusk.local`
> `local` refers to the value of `APP_ENV` in your `.env` so if you have it set to `dev` then the file should be named `.env.dusk.dev`.
**Important**: Dusk tests cannot be run using an in-memory SQLite database. Additionally, the Dusk test suite uses the `DatabaseMigrations` trait which will leave the database in a fresh state after running. Therefore, it is recommended that you create a test database and point `DB_DATABASE` in `.env.dusk.local` to it.
### Running Browser Tests
Your application needs to be configured and up and running in order for the browser tests to actually run. When running the tests locally, you can start the application using the following command:
`php artisan serve`
Now you are ready to run the test suite. Use the following command from another terminal tab or window:
`php artisan dusk`
To run individual test files, you can pass the path to the test that you want to run:
`php artisan dusk tests/Browser/LoginTest.php`
If you get an error when attempting to run Dusk tests that says `Couldn't connect to server` run:
`php artisan dusk:chrome-driver --detect`
This command will install the specific ChromeDriver Dusk needs for your operating system and Chrome version.
+3 -3
View File
@@ -118,7 +118,7 @@
"description": "The duration (in seconds) that the user should be blocked from attempting to authenticate again.",
"value": "60"
},
"APP_LOG": {
"LOG_CHANNEL": {
"description": "Driver to send logs to. (errorlog for stderr)",
"value": "errorlog"
},
@@ -148,7 +148,7 @@
"image": "heroku/php",
"addons": [
"cleardb:ignite",
"heroku-redis:hobby-dev",
"heroku-redis:mini",
"papertrail:choklad"
]
}
}
@@ -22,7 +22,7 @@ class CheckoutLicenseToAllUsers extends Command
*
* @var string
*/
protected $description = 'Command description';
protected $description = 'Checks out licenses to all users';
/**
* Create a new command instance.
@@ -56,7 +56,7 @@ class CheckoutLicenseToAllUsers extends Command
return false;
}
$users = User::whereNull('deleted_at')->with('licenses')->get();
$users = User::whereNull('deleted_at')->where('autoassign_licenses', '=', 1)->with('licenses')->get();
if ($users->count() > $license->getAvailSeatsCountAttribute()) {
$this->info('You do not have enough free seats to complete this task, so we will check out as many as we can. ');
+30 -10
View File
@@ -3,15 +3,31 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use \App\Models\User;
class CreateAdmin extends Command
{
/** @mixin User **/
/**
* The name and signature of the console command.
*
* @var string
* App\Console\CreateAdmin
* @property mixed $first_name
* @property string $last_name
* @property string $username
* @property string $email
* @property string $permissions
* @property string $password
* @property boolean $activated
* @property boolean $show_in_list
* @property boolean $autoassign_licenses
* @property \Illuminate\Support\Carbon|null $created_at
* @property mixed $created_by
*/
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?}';
protected $signature = 'snipeit:create-admin {--first_name=} {--last_name=} {--email=} {--username=} {--password=} {show_in_list?} {autoassign_licenses?}';
/**
* The console command description.
@@ -30,11 +46,7 @@ class CreateAdmin extends Command
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$first_name = $this->option('first_name');
@@ -43,11 +55,14 @@ class CreateAdmin extends Command
$email = $this->option('email');
$password = $this->option('password');
$show_in_list = $this->argument('show_in_list');
$autoassign_licenses = $this->argument('autoassign_licenses');
if (($first_name == '') || ($last_name == '') || ($username == '') || ($email == '') || ($password == '')) {
$this->info('ERROR: All fields are required.');
} else {
$user = new \App\Models\User;
$user = new User;
$user->first_name = $first_name;
$user->last_name = $last_name;
$user->username = $username;
@@ -59,6 +74,11 @@ class CreateAdmin extends Command
if ($show_in_list == 'false') {
$user->show_in_list = 0;
}
if ($autoassign_licenses == 'false') {
$user->autoassign_licenses = 0;
}
if ($user->save()) {
$this->info('New user created');
$user->groups()->attach(1);
@@ -0,0 +1,97 @@
<?php
namespace App\Console\Commands;
use App\Helpers\Helper;
use Illuminate\Console\Command;
use App\Models\User;
use Laravel\Passport\TokenRepository;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
use DB;
class GeneratePersonalAccessToken extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:make-api-key
{--user_id= : The ID of the user to create the token for.}
{--name= : The name of the new API token}
{--key-only : Only return the value of the API key}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'This console command allows you to generate Personal API tokens to be used with the Snipe-IT JSON REST API on behalf of a user.';
/**
* The token repository implementation.
*
* @var \Laravel\Passport\TokenRepository
*/
protected $tokenRepository;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(TokenRepository $tokenRepository, ValidationFactory $validation)
{
$this->validation = $validation;
$this->tokenRepository = $tokenRepository;
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$accessTokenName = $this->option('name');
if ($accessTokenName=='') {
$accessTokenName = 'CLI Auth Token';
}
if ($this->option('user_id')=='') {
return $this->error('ERROR: user_id cannot be blank.');
}
if ($user = User::find($this->option('user_id'))) {
$createAccessToken = $user->createToken($accessTokenName)->accessToken;
if ($this->option('key-only')) {
$this->info($createAccessToken);
} else {
$this->warn('Your API Token has been created. Be sure to copy this token now, as it will not be accessible again.');
if ($token = DB::table('oauth_access_tokens')->where('user_id', '=', $user->id)->where('name','=',$accessTokenName)->orderBy('created_at', 'desc')->first()) {
$this->info('API Token ID: '.$token->id);
}
$this->info('API Token User: '.$user->present()->fullName.' ('.$user->username.')');
$this->info('API Token Name: '.$accessTokenName);
$this->info('API Token: '.$createAccessToken);
}
} else {
return $this->error('ERROR: Invalid user. API key was not created.');
}
}
}
+128 -54
View File
@@ -3,6 +3,7 @@
namespace App\Console\Commands;
use App\Models\Department;
use App\Models\Group;
use Illuminate\Console\Command;
use App\Models\Setting;
use App\Models\Ldap;
@@ -17,7 +18,7 @@ class LdapSync extends Command
*
* @var string
*/
protected $signature = 'snipeit:ldap-sync {--location=} {--location_id=} {--base_dn=} {--summary} {--json_summary}';
protected $signature = 'snipeit:ldap-sync {--location=} {--location_id=} {--base_dn=} {--filter=} {--summary} {--json_summary}';
/**
* The console command description.
@@ -43,20 +44,28 @@ class LdapSync extends Command
*/
public function handle()
{
// If LDAP enabled isn't set to 1 (ldap_enabled!=1) then we should cut this short immediately without going any further
if (Setting::getSettings()->ldap_enabled!='1') {
$this->error('LDAP is not enabled. Aborting. See Settings > LDAP to enable it.');
exit();
}
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
$ldap_result_username = Setting::getSettings()->ldap_username_field;
$ldap_result_last_name = Setting::getSettings()->ldap_lname_field;
$ldap_result_first_name = Setting::getSettings()->ldap_fname_field;
$ldap_result_active_flag = Setting::getSettings()->ldap_active_flag_field;
$ldap_result_active_flag = Setting::getSettings()->ldap_active_flag;
$ldap_result_emp_num = Setting::getSettings()->ldap_emp_num;
$ldap_result_email = Setting::getSettings()->ldap_email;
$ldap_result_phone = Setting::getSettings()->ldap_phone_field;
$ldap_result_jobtitle = Setting::getSettings()->ldap_jobtitle;
$ldap_result_country = Setting::getSettings()->ldap_country;
$ldap_result_location = Setting::getSettings()->ldap_location;
$ldap_result_dept = Setting::getSettings()->ldap_dept;
$ldap_result_manager = Setting::getSettings()->ldap_manager;
$ldap_default_group = Setting::getSettings()->ldap_default_group;
try {
$ldapconn = Ldap::connectToLdap();
@@ -66,7 +75,7 @@ class LdapSync extends Command
$json_summary = ['error' => true, 'error_message' => $e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -76,17 +85,21 @@ class LdapSync extends Command
try {
if ($this->option('base_dn') != '') {
$search_base = $this->option('base_dn');
LOG::debug('Importing users from specified base DN: \"'.$search_base.'\".');
Log::debug('Importing users from specified base DN: \"'.$search_base.'\".');
} else {
$search_base = null;
}
$results = Ldap::findLdapUsers($search_base);
if ($this->option('filter') != '') {
$results = Ldap::findLdapUsers($search_base, -1, $this->option('filter'));
} else {
$results = Ldap::findLdapUsers($search_base);
}
} catch (\Exception $e) {
if ($this->option('json_summary')) {
$json_summary = ['error' => true, 'error_message' => $e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -96,20 +109,20 @@ class LdapSync extends Command
if ($this->option('location') != '') {
$location = Location::where('name', '=', $this->option('location'))->first();
LOG::debug('Location name '.$this->option('location').' passed');
LOG::debug('Importing to '.$location->name.' ('.$location->id.')');
Log::debug('Location name '.$this->option('location').' passed');
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
} elseif ($this->option('location_id') != '') {
$location = Location::where('id', '=', $this->option('location_id'))->first();
LOG::debug('Location ID '.$this->option('location_id').' passed');
LOG::debug('Importing to '.$location->name.' ('.$location->id.')');
Log::debug('Location ID '.$this->option('location_id').' passed');
Log::debug('Importing to '.$location->name.' ('.$location->id.')');
}
if (! isset($location)) {
LOG::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
Log::debug('That location is invalid or a location was not provided, so no location will be assigned by default.');
}
/* Process locations with explicitly defined OUs, if doing a full import. */
if ($this->option('base_dn') == '') {
if ($this->option('base_dn') == '' && $this->option('filter') == '') {
// Retrieve locations with a mapped OU, and sort them from the shallowest to deepest OU (see #3993)
$ldap_ou_locations = Location::where('ldap_ou', '!=', '')->get()->toArray();
$ldap_ou_lengths = [];
@@ -121,7 +134,7 @@ class LdapSync extends Command
array_multisort($ldap_ou_lengths, SORT_ASC, $ldap_ou_locations);
if (count($ldap_ou_locations) > 0) {
LOG::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.');
Log::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.');
}
// Inject location information fields
@@ -139,7 +152,7 @@ class LdapSync extends Command
$json_summary = ['error' => true, 'error_message' => trans('admin/users/message.error.ldap_could_not_search').' Location: '.$ldap_loc['name'].' (ID: '.$ldap_loc['id'].') cannot connect to "'.$ldap_loc['ldap_ou'].'" - '.$e->getMessage(), 'summary' => []];
$this->info(json_encode($json_summary));
}
LOG::info($e);
Log::info($e);
return [];
}
@@ -171,22 +184,37 @@ class LdapSync extends Command
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 20);
$pass = bcrypt($tmp_pass);
for ($i = 0; $i < $results['count']; $i++) {
if (empty($ldap_result_active_flag) || $results[$i][$ldap_result_active_flag][0] == 'TRUE') {
$item = [];
$item['username'] = isset($results[$i][$ldap_result_username][0]) ? $results[$i][$ldap_result_username][0] : '';
$item['employee_number'] = isset($results[$i][$ldap_result_emp_num][0]) ? $results[$i][$ldap_result_emp_num][0] : '';
$item['lastname'] = isset($results[$i][$ldap_result_last_name][0]) ? $results[$i][$ldap_result_last_name][0] : '';
$item['firstname'] = isset($results[$i][$ldap_result_first_name][0]) ? $results[$i][$ldap_result_first_name][0] : '';
$item['email'] = isset($results[$i][$ldap_result_email][0]) ? $results[$i][$ldap_result_email][0] : '';
$item['ldap_location_override'] = isset($results[$i]['ldap_location_override']) ? $results[$i]['ldap_location_override'] : '';
$item['location_id'] = isset($results[$i]['location_id']) ? $results[$i]['location_id'] : '';
$item['telephone'] = isset($results[$i][$ldap_result_phone][0]) ? $results[$i][$ldap_result_phone][0] : '';
$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] : '';
$manager_cache = [];
if($ldap_default_group != null) {
$default = Group::find($ldap_default_group);
if (!$default) {
$ldap_default_group = null; // un-set the default group if that group doesn't exist
}
}
for ($i = 0; $i < $results['count']; $i++) {
$item = [];
$item['username'] = $results[$i][$ldap_result_username][0] ?? '';
$item['employee_number'] = $results[$i][$ldap_result_emp_num][0] ?? '';
$item['lastname'] = $results[$i][$ldap_result_last_name][0] ?? '';
$item['firstname'] = $results[$i][$ldap_result_first_name][0] ?? '';
$item['email'] = $results[$i][$ldap_result_email][0] ?? '';
$item['ldap_location_override'] = $results[$i]['ldap_location_override'] ?? '';
$item['location_id'] = $results[$i]['location_id'] ?? '';
$item['telephone'] = $results[$i][$ldap_result_phone][0] ?? '';
$item['jobtitle'] = $results[$i][$ldap_result_jobtitle][0] ?? '';
$item['country'] = $results[$i][$ldap_result_country][0] ?? '';
$item['department'] = $results[$i][$ldap_result_dept][0] ?? '';
$item['manager'] = $results[$i][$ldap_result_manager][0] ?? '';
$item['location'] = $results[$i][$ldap_result_location][0] ?? '';
$location = Location::firstOrCreate([
'name' => $item['location'],
]);
$department = Department::firstOrCreate([
'name' => $item['department'],
]);
@@ -199,7 +227,7 @@ class LdapSync extends Command
// Creating a new user.
$user = new User;
$user->password = $pass;
$user->activated = 0;
$user->activated = 1; // newly created users can log in by default, unless AD's UAC is in use, or an active flag is set (below)
$item['createorupdate'] = 'created';
}
@@ -212,21 +240,64 @@ class LdapSync extends Command
$user->jobtitle = $item['jobtitle'];
$user->country = $item['country'];
$user->department_id = $department->id;
$user->location_id = $location->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();
if ( $ldap_manager && isset($ldap_manager->id) ) {
$user->manager_id = $ldap_manager->id;
// Check Cache first
if (isset($manager_cache[$item['manager']])) {
// found in cache; use that and avoid extra lookups
$user->manager_id = $manager_cache[$item['manager']];
} else {
// Get the LDAP Manager
try {
$ldap_manager = Ldap::findLdapUsers($item['manager'], -1, $this->option('filter'));
} catch (\Exception $e) {
\Log::warning("Manager lookup caused an exception: " . $e->getMessage() . ". Falling back to direct username lookup");
// Hail-mary for Okta manager 'shortnames' - will only work if
// Okta configuration is using full email-address-style usernames
$ldap_manager = [
"count" => 1,
0 => [
$ldap_result_username => [$item['manager']]
]
];
}
if ($ldap_manager["count"] > 0) {
// Get the Manager's username
// PHP LDAP returns every LDAP attribute as an array, and 90% of the time it's an array of just one item. But, hey, it's an array.
$ldapManagerUsername = $ldap_manager[0][$ldap_result_username][0];
// Get User from Manager username.
$ldap_manager = User::where('username', $ldapManagerUsername)->first();
if ($ldap_manager && isset($ldap_manager->id)) {
// Link user to manager id.
$user->manager_id = $ldap_manager->id;
}
}
$manager_cache[$item['manager']] = $ldap_manager && isset($ldap_manager->id) ? $ldap_manager->id : null; // Store results in cache, even if 'failed'
}
}
// 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
if ( !empty($ldap_result_active_flag)) { // IF we have an 'active' flag set....
// ....then *most* things that are truthy will activate the user. Anything falsey will deactivate them.
// (Specifically, we don't handle a value of '0.0' correctly)
$raw_value = @$results[$i][$ldap_result_active_flag][0];
$filter_var = filter_var($raw_value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
$boolean_cast = (bool)$raw_value;
$user->activated = $filter_var ?? $boolean_cast; // if filter_var() was true or false, use that. If it's null, use the $boolean_cast
} elseif (array_key_exists('useraccountcontrol', $results[$i]) ) {
// ....otherwise, (ie if no 'active' LDAP flag is defined), IF the UAC setting exists,
// ....then use the UAC setting on the account to determine can-log-in vs. cannot-log-in
/* The following is _probably_ the correct logic, but we can't use it because
some users may have been dependent upon the previous behavior, and this
could cause additional access to be available to users they don't want
to allow to log in.
@@ -243,25 +314,25 @@ class LdapSync extends Command
$user->activated = 0;
} */
$enabled_accounts = [
'512', // 0x200 NORMAL_ACCOUNT
'544', // 0x220 NORMAL_ACCOUNT, PASSWD_NOTREQD
'66048', // 0x10200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD
'66080', // 0x10220 NORMAL_ACCOUNT, PASSWD_NOTREQD, DONT_EXPIRE_PASSWORD
'262656', // 0x40200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED
'262688', // 0x40220 NORMAL_ACCOUNT, PASSWD_NOTREQD, SMARTCARD_REQUIRED
'328192', // 0x50200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'328224', // 0x50220 NORMAL_ACCOUNT, PASSWD_NOT_REQD, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'4194816',// 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH
'512', // 0x200 NORMAL_ACCOUNT
'544', // 0x220 NORMAL_ACCOUNT, PASSWD_NOTREQD
'66048', // 0x10200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD
'66080', // 0x10220 NORMAL_ACCOUNT, PASSWD_NOTREQD, DONT_EXPIRE_PASSWORD
'262656', // 0x40200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED
'262688', // 0x40220 NORMAL_ACCOUNT, PASSWD_NOTREQD, SMARTCARD_REQUIRED
'328192', // 0x50200 NORMAL_ACCOUNT, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'328224', // 0x50220 NORMAL_ACCOUNT, PASSWD_NOT_REQD, SMARTCARD_REQUIRED, DONT_EXPIRE_PASSWORD
'4194816',// 0x400200 NORMAL_ACCOUNT, DONT_REQ_PREAUTH
'4260352', // 0x410200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, DONT_REQ_PREAUTH
'1049088', // 0x100200 NORMAL_ACCOUNT, NOT_DELEGATED
'1114624', // 0x110200 NORMAL_ACCOUNT, DONT_EXPIRE_PASSWORD, NOT_DELEGATED,
];
$user->activated = (in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts)) ? 1 : 0;
}
// If we're not using AD, and there isn't an activated flag set, activate all users
elseif (empty($ldap_result_active_flag)) {
$user->activated = 1;
}
} /* implied 'else' here - leave the $user->activated flag alone. Newly-created accounts will be active.
already-existing accounts will be however the administrator has set them */
if ($item['ldap_location_override'] == true) {
$user->location_id = $item['location_id'];
@@ -280,6 +351,10 @@ class LdapSync extends Command
if ($user->save()) {
$item['note'] = $item['createorupdate'];
$item['status'] = 'success';
if ( $item['createorupdate'] === 'created' && $ldap_default_group) {
$user->groups()->attach($ldap_default_group);
}
} else {
foreach ($user->getErrors()->getMessages() as $key => $err) {
$errors .= $err[0];
@@ -289,7 +364,6 @@ class LdapSync extends Command
}
array_push($summary, $item);
}
}
if ($this->option('summary')) {
+62 -48
View File
@@ -27,6 +27,19 @@ function ip_in_range( $ip, $range ) {
}
// NOTE - this function was shamelessly stolen from this gist: https://gist.github.com/tott/7684443
/**
* Ensure LDAP filters are parentheses-wrapped
*/
function parenthesized_filter($filter)
{
if(substr($filter,0,1) == "(" ) {
return $filter;
} else {
return "(".$filter.")";
}
}
class LdapTroubleshooter extends Command
{
/**
@@ -70,6 +83,47 @@ class LdapTroubleshooter extends Command
}
}
/**
* Clean the results from ldap_get_entries into something useful
* @param array $array
* @return array
*/
public function ldap_results_cleaner ($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;
}
/**
* Execute the console command.
*
@@ -102,16 +156,12 @@ class LdapTroubleshooter extends Command
$output[] = "LDAPTLS_KEY=storage/ldap_client_tls.key";
}
$output[] = "ldapsearch";
$output[] = $settings->ldap_server;
$output[] = "-H ".$settings->ldap_server;
$output[] = "-x";
$output[] = "-b ".escapeshellarg($settings->ldap_basedn);
$output[] = "-D ".escapeshellarg($settings->ldap_uname);
$output[] = "-w ".escapeshellarg(\Crypt::Decrypt($settings->ldap_pword));
if(substr($settings->ldap_filter,0,1) == "(" ) {
$output[] = escapeshellarg($settings->ldap_filter);
} else {
$output[] = escapeshellarg("(".$settings->ldap_filter.")");
}
$output[] = escapeshellarg(parenthesized_filter($settings->ldap_filter));
if($settings->ldap_tls) {
$this->line("# adding STARTTLS option");
$output[] = "-Z";
@@ -290,45 +340,8 @@ class LdapTroubleshooter extends Command
}
$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))) {
if($this->test_informational_bind($ldap_url[0],$ldap_url[1],$ldap_url[2],$settings->ldap_uname,Crypt::decrypt($settings->ldap_pword),$settings)) {
$this->info("Success getting informational bind!");
} else {
$this->error("Unable to get information from bind.");
@@ -422,9 +435,9 @@ class LdapTroubleshooter extends Command
});
}
public function test_informational_bind($ldap_url, $check_cert, $start_tls, $username, $password)
public function test_informational_bind($ldap_url, $check_cert, $start_tls, $username, $password,$settings)
{
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls, $username, $password) {
return $this->timed_boolean_execute(function () use ($ldap_url, $check_cert, $start_tls, $username, $password, $settings) {
try { // TODO - copypasta'ed from test_authed_bind
$conn = $this->connect_to_ldap($ldap_url, $check_cert, $start_tls);
$bind_results = ldap_bind($conn, $username, $password);
@@ -435,12 +448,13 @@ class LdapTroubleshooter extends Command
$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);
$cleaned_results = $this->ldap_results_cleaner($results);
$this->line(print_r($cleaned_results,true));
//okay, great - now how do we display those results? I have no idea.
// I don't see why this throws an Exception for Google LDAP, but I guess we ought to try and catch it?
$this->comment("I guess we're trying to do the ldap search here, but sometimes it takes too long?");
$search_results = ldap_search($conn, $settings->base_dn, $settings->filter);
$this->debugout("Base DN is: ".$settings->ldap_basedn." and filter is: ".parenthesized_filter($settings->ldap_filter));
$search_results = ldap_search($conn, $settings->ldap_basedn, parenthesized_filter($settings->ldap_filter));
$this->info("Printing first 10 results: ");
for($i=0;$i<10;$i++) {
$this->info($search_results[$i]);
@@ -0,0 +1,52 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
class NormalizeUserNames extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:normalize-names';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Normalizes weirdly formatted names as first-letter upercased';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$users = User::get();
$this->info($users->count() . ' users');
foreach ($users as $user) {
$user->first_name = ucwords(strtolower($user->first_name));
$user->last_name = ucwords(strtolower($user->last_name));
$user->email = strtolower($user->email);
$user->save();
}
}
}
@@ -71,22 +71,31 @@ class ReEncodeCustomFieldNames extends Command
*/
$last_part = substr(strrchr($asset_column, '_snipeit_'), 1);
$custom_field_columns[$last_part] = $asset_column;
}
}
foreach ($fields as $field) {
$this->info($field->name.' ('.$field->id.') column should be '.$field->convertUnicodeDbSlug().'');
$this->info($field->name.' ('.$field->id.') column should be '.$field->convertUnicodeDbSlug());
/** The assets table has the column it should have, all is well */
if (\Schema::hasColumn('assets', $field->convertUnicodeDbSlug())) {
$this->info('-- ✓ This field exists - all good');
if ($field->db_column == $field->convertUnicodeDbSlug() && \Schema::hasColumn('assets', $field->convertUnicodeDbSlug())) {
$this->info('-- ✓ This field exists on the assets table and the value for db_column matches in the custom_fields table.');
/**
* There is a mismatch between the fieldname on the assets table and
* what $field->convertUnicodeDbSlug() is *now* expecting.
*/
} else {
$this->warn('-- X Field mismatch: updating... ');
if ($field->db_column != $field->convertUnicodeDbSlug()) {
$this->error('-- ✘ Field mismatch: '.$field->name.' value should be '.$field->convertUnicodeDbSlug().' but is '.$field->db_column.' in the custom_fields table');
} else {
$this->error('-- ✘ Field mismatch: '.$field->name.' column should be '.$field->convertUnicodeDbSlug().' but is '.$custom_field_columns[$field->id].' on the assets table.');
}
/** Make sure the custom_field_columns array has the ID */
if (array_key_exists($field->id, $custom_field_columns)) {
@@ -95,13 +104,19 @@ class ReEncodeCustomFieldNames extends Command
* Update the asset schema to the corrected fieldname that will be recognized by the
* system elsewhere that we use $field->convertUnicodeDbSlug()
*/
$this->info('-- ✓ Updating field from '.$field->db_column.' to '.$field->convertUnicodeDbSlug().' in the assets table');
\Schema::table('assets', function ($table) use ($custom_field_columns, $field) {
$table->renameColumn($custom_field_columns[$field->id], $field->convertUnicodeDbSlug());
});
$this->warn('-- ✓ Field updated from '.$custom_field_columns[$field->id].' to '.$field->convertUnicodeDbSlug());
$this->info('-- ✓ Updating field from '.$field->db_column.' to '.$field->convertUnicodeDbSlug().' in the custom fields table');
$field->db_column = $field->convertUnicodeDbSlug();
$field->save();
} else {
$this->warn('-- X WARNING: There is no field on the assets table ending in '.$field->id.'. This may require more in-depth investigation and may mean the schema was altered manually.');
$this->warn('-- WARNING: There is no field on the assets table ending in '.$field->id.'. This may require more in-depth investigation and may mean the schema was altered manually.');
}
}
+2 -2
View File
@@ -149,7 +149,7 @@ class RestoreFromBackup extends Command
$boring_files[] = $raw_path;
continue;
}
if (@pathinfo($raw_path)['extension'] == 'sql') {
if (@pathinfo($raw_path, PATHINFO_EXTENSION) == 'sql') {
\Log::debug("Found a sql file!");
$sqlfiles[] = $raw_path;
$sqlfile_indices[] = $i;
@@ -214,7 +214,7 @@ class RestoreFromBackup extends Command
$env_vars['MYSQL_PWD'] = config('database.connections.mysql.password');
// TODO notes: we are stealing the dump_binary_path (which *probably* also has your copy of the mysql binary in it. But it might not, so we might need to extend this)
// we unilaterally prepend a slash to the `mysql` command. This might mean your path could look like /blah/blah/blah//mysql - which should be fine. But maybe in some environments it isn't?
$mysql_binary = config('database.connections.mysql.dump.dump_binary_path').'/mysql';
$mysql_binary = config('database.connections.mysql.dump.dump_binary_path').\DIRECTORY_SEPARATOR.'mysql'.(\DIRECTORY_SEPARATOR == '\\' ? ".exe" : "");
if( ! file_exists($mysql_binary) ) {
return $this->error("mysql tool at: '$mysql_binary' does not exist, cannot restore. Please edit DB_DUMP_PATH in your .env to point to a directory that contains the mysqldump and mysql binary");
}
+26 -20
View File
@@ -39,33 +39,39 @@ class SyncAssetCounters extends Command
public function handle()
{
$start = microtime(true);
// We need the whole count of all assets in order to set up the progress bar
$assets_count = Asset::withTrashed()->count();
$bar = $this->output->createProgressBar($assets_count);
$assets = Asset::withCount('checkins as checkins_count', 'checkouts as checkouts_count', 'userRequests as user_requests_count')
->withTrashed()->get();
->withTrashed()->chunk(100, function ($assets) use ($bar) {
if ($assets) {
if ($assets->count() > 0) {
$bar = $this->output->createProgressBar($assets->count());
if ($assets->count() > 0) {
foreach ($assets as $asset) {
$asset->checkin_counter = (int) $asset->checkins_count;
$asset->checkout_counter = (int) $asset->checkouts_count;
$asset->requests_counter = (int) $asset->user_requests_count;
$asset->unsetEventDispatcher();
$asset->save();
$output['info'][] = 'Asset: '.$asset->id.' has '.$asset->checkin_counter.' checkins, '.$asset->checkout_counter.' checkouts, and '.$asset->requests_counter.' requests';
$bar->advance();
}
$bar->finish();
foreach ($assets as $asset) {
foreach ($output['info'] as $key => $output_text) {
$this->info($output_text);
}
$asset->checkin_counter = (int) $asset->checkins_count;
$asset->checkout_counter = (int) $asset->checkouts_count;
$asset->requests_counter = (int) $asset->user_requests_count;
$asset->unsetEventDispatcher();
$asset->save();
$bar->advance();
\Log::debug('Asset: '.$asset->id.' has '.$asset->checkin_counter.' checkins, '.$asset->checkout_counter.' checkouts, and '.$asset->requests_counter.' requests');
}
$time_elapsed_secs = microtime(true) - $start;
$this->info('Sync executed in '.$time_elapsed_secs.' seconds');
} else {
$this->info('No assets to sync');
}
}
});
$bar->finish();
$time_elapsed_secs = microtime(true) - $start;
$this->info("\nSync of ".$assets_count.' assets executed in '.$time_elapsed_secs.' seconds');
}
}
+14 -3
View File
@@ -11,7 +11,7 @@ class SystemBackup extends Command
*
* @var string
*/
protected $name = 'snipeit:backup';
protected $signature = 'snipeit:backup {--filename=}';
/**
* The console command description.
@@ -37,7 +37,18 @@ class SystemBackup extends Command
*/
public function handle()
{
//
$this->call('backup:run');
if ($this->option('filename')) {
$filename = $this->option('filename');
// Make sure the filename ends in .zip
if (!ends_with($filename, '.zip')) {
$filename = $filename.'.zip';
}
$this->call('backup:run', ['--filename' => $filename]);
} else {
$this->call('backup:run');
}
}
}
+1
View File
@@ -24,6 +24,7 @@ class Kernel extends ConsoleKernel
$schedule->command('snipeit:backup')->weekly();
$schedule->command('backup:clean')->daily();
$schedule->command('snipeit:upcoming-audits')->daily();
$schedule->command('auth:clear-resets')->everyFifteenMinutes();
}
/**
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace App\Events;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use App\Models\User;
class UserMerged
{
use Dispatchable, SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct(User $from_user, User $to_user, User $admin)
{
$this->merged_from = $from_user;
$this->merged_to = $to_user;
$this->admin = $admin;
}
}
+35 -7
View File
@@ -6,10 +6,11 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use App\Helpers\Helper;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\AuthenticationException;
use ArieTimmerman\Laravel\SCIMServer\Exceptions\SCIMException;
use Log;
use Throwable;
use JsonException;
use Carbon\Exceptions\InvalidFormatException;
class Handler extends ExceptionHandler
{
@@ -28,6 +29,8 @@ class Handler extends ExceptionHandler
\Intervention\Image\Exception\NotSupportedException::class,
\League\OAuth2\Server\Exception\OAuthServerException::class,
JsonException::class,
SCIMException::class, //these generally don't need to be reported
InvalidFormatException::class,
];
/**
@@ -41,7 +44,9 @@ class Handler extends ExceptionHandler
public function report(Throwable $exception)
{
if ($this->shouldReport($exception)) {
\Log::error($exception);
if (class_exists(\Log::class)) {
\Log::error($exception);
}
return parent::report($exception);
}
}
@@ -51,7 +56,7 @@ class Handler extends ExceptionHandler
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response
*/
public function render($request, Throwable $e)
{
@@ -65,18 +70,39 @@ class Handler extends ExceptionHandler
// Invalid JSON exception
// TODO: don't understand why we have to do this when we have the invalidJson() method, below, but, well, whatever
if ($e instanceof JsonException) {
return response()->json(Helper::formatStandardApiResponse('error', null, 'invalid JSON'), 422);
return response()->json(Helper::formatStandardApiResponse('error', null, 'Invalid JSON'), 422);
}
// Handle SCIM exceptions
if ($e instanceof SCIMException) {
try {
$e->report(); // logs as 'debug', so shouldn't get too noisy
} catch(\Exception $reportException) {
//do nothing
}
return $e->render($request); // ALL SCIMExceptions have the 'render()' method
}
// Handle Ajax requests that fail because the model doesn't exist
// Handle standard requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return redirect()->back()->withInput()->with('error', trans('validation.date', ['attribute' => 'date']));
}
// Handle API requests that fail
if ($request->ajax() || $request->wantsJson()) {
// Handle API requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
if ($e instanceof InvalidFormatException) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), 200);
}
// Handle API requests that fail because the model doesn't exist
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
$className = last(explode('\\', $e->getModel()));
return response()->json(Helper::formatStandardApiResponse('error', null, $className . ' not found'), 200);
}
// Handle API requests that fail because of an HTTP status code and return a useful error message
if ($this->isHttpException($e)) {
$statusCode = $e->getStatusCode();
@@ -96,6 +122,8 @@ class Handler extends ExceptionHandler
}
if ($this->isHttpException($e) && (isset($statusCode)) && ($statusCode == '404' )) {
return response()->view('layouts/basic', [
'content' => view('errors/404')
@@ -111,8 +139,8 @@ class Handler extends ExceptionHandler
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
+153 -23
View File
@@ -12,6 +12,7 @@ use App\Models\Statuslabel;
use Crypt;
use Illuminate\Contracts\Encryption\DecryptException;
use Image;
use Carbon\Carbon;
class Helper
{
@@ -22,12 +23,13 @@ class Helper
* @since [v2.0]
* @return string
*/
public static function parseEscapedMarkedown($str)
public static function parseEscapedMarkedown($str = null)
{
$Parsedown = new \Parsedown();
$Parsedown->setSafeMode(true);
if ($str) {
return $Parsedown->text(e($str));
return $Parsedown->text($str);
}
}
@@ -332,7 +334,11 @@ class Helper
'#92896B',
];
$total_colors = count($colors);
if ($index >= $total_colors) {
$index = $index - $total_colors;
}
return $colors[$index];
}
@@ -526,20 +532,23 @@ class Helper
* @since [v2.5]
* @return array
*/
public static function categoryTypeList()
public static function categoryTypeList($selection=null)
{
$category_types = [
'' => '',
'accessory' => 'Accessory',
'asset' => 'Asset',
'consumable' => 'Consumable',
'component' => 'Component',
'license' => 'License',
'accessory' => trans('general.accessory'),
'asset' => trans('general.asset'),
'consumable' => trans('general.consumable'),
'component' => trans('general.component'),
'license' => trans('general.license'),
];
if($selection != null){
return $category_types[$selection];
}
else
return $category_types;
}
/**
* Get the list of custom fields in an array to make a dropdown menu
*
@@ -623,7 +632,7 @@ class Helper
{
$consumables = Consumable::withCount('consumableAssignments as consumable_assignments_count')->whereNotNull('min_amt')->get();
$accessories = Accessory::withCount('users as users_count')->whereNotNull('min_amt')->get();
$components = Component::withCount('assets as assets_count')->whereNotNull('min_amt')->get();
$components = Component::whereNotNull('min_amt')->get();
$avail_consumables = 0;
$items_array = [];
@@ -668,7 +677,7 @@ class Helper
}
foreach ($components as $component) {
$avail = $component->qty - $component->assets_count;
$avail = $component->numRemaining();
if ($avail < ($component->min_amt) + \App\Models\Setting::getSettings()->alert_threshold) {
if ($component->qty > 0) {
$percent = number_format((($avail / $component->qty) * 100), 0);
@@ -841,6 +850,16 @@ class Helper
return preg_replace('/\s+/u', '_', trim($string));
}
/**
* Return an array (or null) of the the raw and formatted date object for easy use in
* the API and the bootstrap table listings.
*
* @param $date
* @param $type
* @param $array
* @return array|string|null
*/
public static function getFormattedDateObject($date, $type = 'datetime', $array = true)
{
if ($date == '') {
@@ -848,21 +867,42 @@ class Helper
}
$settings = Setting::getSettings();
$tmp_date = new \Carbon($date);
if ($type == 'datetime') {
$dt['datetime'] = $tmp_date->format('Y-m-d H:i:s');
$dt['formatted'] = $tmp_date->format($settings->date_display_format.' '.$settings->time_display_format);
} else {
$dt['date'] = $tmp_date->format('Y-m-d');
$dt['formatted'] = $tmp_date->format($settings->date_display_format);
/**
* Wrap this in a try/catch so that if Carbon crashes, for example if the $date value
* isn't actually valid, we don't crash out completely.
*
* While this *shouldn't* typically happen since we validate dates before entering them
* into the database (and we use date/datetime fields for native fields in the system),
* it is a possible scenario that a custom field could be created as an "ANY" field, data gets
* added, and then the custom field format gets edited later. If someone put bad data in the
* database before then - or if they manually edited the field's value - it will crash.
*
*/
try {
$tmp_date = new \Carbon($date);
if ($type == 'datetime') {
$dt['datetime'] = $tmp_date->format('Y-m-d H:i:s');
$dt['formatted'] = $tmp_date->format($settings->date_display_format.' '.$settings->time_display_format);
} else {
$dt['date'] = $tmp_date->format('Y-m-d');
$dt['formatted'] = $tmp_date->format($settings->date_display_format);
}
if ($array == 'true') {
return $dt;
}
return $dt['formatted'];
} catch (\Exception $e) {
\Log::warning($e);
return $date.' (Invalid '.$type.' value.)';
}
if ($array == 'true') {
return $dt;
}
return $dt['formatted'];
}
// Nicked from Drupal :)
@@ -1059,6 +1099,15 @@ class Helper
return $file_name;
}
/**
* Universal helper to show file size in human-readable formats
*
* @author A. Gianotto <snipe@snipe.net>
* @since 5.0
*
* @return string[]
*/
public static function formatFilesizeUnits($bytes)
{
if ($bytes >= 1073741824)
@@ -1088,10 +1137,91 @@ class Helper
return $bytes;
}
/**
* This is weird but used by the side nav to determine which URL to point the user to
*
* @author A. Gianotto <snipe@snipe.net>
* @since 5.0
*
* @return string[]
*/
public static function SettingUrls(){
$settings=['#','fields.index', 'statuslabels.index', 'models.index', 'categories.index', 'manufacturers.index', 'suppliers.index', 'departments.index', 'locations.index', 'companies.index', 'depreciations.index'];
return $settings;
}
/**
* Generic helper (largely used by livewire right now) that returns the font-awesome icon
* for the object type.
*
* @author A. Gianotto <snipe@snipe.net>
* @since 6.1.0
*
* @return string
*/
public static function iconTypeByItem($item) {
switch ($item) {
case 'asset':
return 'fas fa-barcode';
break;
case 'accessory':
return 'fas fa-keyboard';
break;
case 'component':
return 'fas fa-hdd';
break;
case 'consumable':
return 'fas fa-tint';
break;
case 'license':
return 'far fa-save';
break;
case 'location':
return 'fas fa-map-marker-alt';
break;
case 'user':
return 'fas fa-user';
break;
}
}
/*
* This is a shorter way to see if the app is in demo mode.
*
* This makes it cleanly available in blades and in controllers, e.g.
*
* Blade:
* {{ Helper::isDemoMode() ? ' disabled' : ''}} for form blades where we need to disable a form
*
* Controller:
* if (Helper::isDemoMode()) {
* // don't allow the thing
* }
* @todo - use this everywhere else in the app where we have very long if/else config('app.lock_passwords') stuff
*/
public static function isDemoMode() {
if (config('app.lock_passwords') === true) {
return true;
\Log::debug('app locked!');
}
return false;
}
/*
* I know it's gauche to return a shitty HTML string, but this is just a helper and since it will be the same every single time,
* it seemed pretty safe to do here. Don't you judge me.
*/
public static function showDemoModeFieldWarning() {
if (Helper::isDemoMode()) {
return "<p class=\"text-warning\"><i class=\"fas fa-lock\"></i>" . trans('general.feature_disabled') . "</p>";
}
}
}
@@ -9,6 +9,7 @@ use App\Models\Accessory;
use App\Models\Company;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
use Redirect;
/** This controller handles all actions related to Accessories for
@@ -62,6 +63,7 @@ class AccessoriesController extends Controller
public function store(ImageUploadRequest $request)
{
$this->authorize(Accessory::class);
// create a new model instance
$accessory = new Accessory();
@@ -75,13 +77,12 @@ class AccessoriesController extends Controller
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->user_id = Auth::user()->id;
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');
$accessory = $request->handleImages($accessory);
// Was the accessory created?
@@ -114,6 +115,33 @@ class AccessoriesController extends Controller
}
/**
* Returns a view that presents a form to clone an accessory.
*
* @author [J. Vinsmoke]
* @param int $accessoryId
* @since [v6.0]
* @return View
*/
public function getClone($accessoryId = null)
{
$this->authorize('create', Accesory::class);
// Check if the asset exists
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
// Redirect to the asset management page
return redirect()->route('accessory.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
$accessory = clone $accessory_to_clone;
$accessory->id = null;
$accessory->location_id = null;
return view('accessories/edit')
->with('item', $accessory);
}
/**
* Save edited Accessory from form post
@@ -126,34 +154,47 @@ class AccessoriesController extends Controller
*/
public function update(ImageUploadRequest $request, $accessoryId = null)
{
if (is_null($accessory = Accessory::find($accessoryId))) {
if ($accessory = Accessory::withCount('users as users_count')->find($accessoryId)) {
$this->authorize($accessory);
$validator = Validator::make($request->all(), [
"qty" => "required|numeric|min:$accessory->users_count"
]);
if ($validator->fails()) {
return redirect()->back()
->withErrors($validator)
->withInput();
}
// Update the accessory data
$accessory->name = request('name');
$accessory->location_id = request('location_id');
$accessory->min_amt = request('min_amt');
$accessory->category_id = request('category_id');
$accessory->company_id = Company::getIdForCurrentUser(request('company_id'));
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->order_number = request('order_number');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = request('purchase_cost');
$accessory->qty = request('qty');
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');
$accessory = $request->handleImages($accessory);
// Was the accessory updated?
if ($accessory->save()) {
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.update.success'));
}
} else {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.does_not_exist'));
}
$this->authorize($accessory);
// Update the accessory data
$accessory->name = request('name');
$accessory->location_id = request('location_id');
$accessory->min_amt = request('min_amt');
$accessory->category_id = request('category_id');
$accessory->company_id = Company::getIdForCurrentUser(request('company_id'));
$accessory->manufacturer_id = request('manufacturer_id');
$accessory->order_number = request('order_number');
$accessory->model_number = request('model_number');
$accessory->purchase_date = request('purchase_date');
$accessory->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$accessory->qty = request('qty');
$accessory->supplier_id = request('supplier_id');
$accessory->notes = request('notes');
$accessory = $request->handleImages($accessory);
// Was the accessory updated?
if ($accessory->save()) {
return redirect()->route('accessories.index')->with('success', trans('admin/accessories/message.update.success'));
}
return redirect()->back()->withInput()->withErrors($accessory->getErrors());
}
@@ -205,7 +246,7 @@ class AccessoriesController extends Controller
*/
public function show($accessoryID = null)
{
$accessory = Accessory::find($accessoryID);
$accessory = Accessory::withCount('users as users_count')->find($accessoryID);
$this->authorize('view', $accessory);
if (isset($accessory->id)) {
return view('accessories/view', compact('accessory'));
@@ -0,0 +1,186 @@
<?php
namespace App\Http\Controllers\Accessories;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
use App\Models\Accessory;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use Symfony\Accessory\HttpFoundation\JsonResponse;
use enshrined\svgSanitize\Sanitizer;
class AccessoriesFilesController extends Controller
{
/**
* Validates and stores files associated with a accessory.
*
* @todo Switch to using the AssetFileRequest form request validator.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param AssetFileRequest $request
* @param int $accessoryId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(AssetFileRequest $request, $accessoryId = null)
{
if (config('app.lock_passwords')) {
return redirect()->route('accessories.show', ['accessory'=>$accessoryId])->with('error', trans('general.feature_disabled'));
}
$accessory = Accessory::find($accessoryId);
if (isset($accessory->id)) {
$this->authorize('accessories.files', $accessory);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/accessories')) {
Storage::makeDirectory('private_uploads/accessories', 775);
}
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'accessory-'.$accessory->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension == 'svg') {
\Log::debug('This is an SVG');
\Log::debug($file_name);
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/accessories/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/accessories/'.$file_name, file_get_contents($file));
}
//Log the upload to the log
$accessory->logUpload($file_name, e($request->input('notes')));
}
return redirect()->route('accessories.show', $accessory->id)->with('success', trans('general.file_upload_success'));
}
return redirect()->route('accessories.show', $accessory->id)->with('error', trans('general.no_files_uploaded'));
}
// Prepare the error message
return redirect()->route('accessories.index')
->with('error', trans('general.file_does_not_exist'));
}
/**
* Deletes the selected accessory file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param int $accessoryId
* @param int $fileId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($accessoryId = null, $fileId = null)
{
$accessory = Accessory::find($accessoryId);
// the asset is valid
if (isset($accessory->id)) {
$this->authorize('update', $accessory);
$log = Actionlog::find($fileId);
// Remove the file if one exists
if (Storage::exists('accessories/'.$log->filename)) {
try {
Storage::delete('accessories/'.$log->filename);
} catch (\Exception $e) {
\Log::debug($e);
}
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the licence management page
return redirect()->route('accessories.index')->with('error', trans('general.file_does_not_exist'));
}
/**
* Allows the selected file to be viewed.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.4]
* @param int $accessoryId
* @param int $fileId
* @return \Symfony\Accessory\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($accessoryId = null, $fileId = null, $download = true)
{
\Log::debug('Private filesystem is: '.config('filesystems.default'));
$accessory = Accessory::find($accessoryId);
// the accessory is valid
if (isset($accessory->id)) {
$this->authorize('view', $accessory);
$this->authorize('accessories.files', $accessory);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/accessories/'.$log->filename;
if (Storage::missing($file)) {
\Log::debug('FILE DOES NOT EXISTS for '.$file);
\Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}
return redirect()->route('accessories.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));
}
}
@@ -25,11 +25,16 @@ class AccessoryCheckoutController extends Controller
public function create($accessoryId)
{
// Check if the accessory exists
if (is_null($accessory = Accessory::find($accessoryId))) {
if (is_null($accessory = Accessory::withCount('users as users_count')->find($accessoryId))) {
// Redirect to the accessory management page with error
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.not_found'));
}
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0){
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
if ($accessory->category) {
$this->authorize('checkout', $accessory);
@@ -55,17 +60,23 @@ class AccessoryCheckoutController extends Controller
public function store(Request $request, $accessoryId)
{
// Check if the accessory exists
if (is_null($accessory = Accessory::find($accessoryId))) {
if (is_null($accessory = Accessory::withCount('users as users_count')->find($accessoryId))) {
// Redirect to the accessory management page with error
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.user_not_found'));
}
$this->authorize('checkout', $accessory);
if (! $user = User::find($request->input('assigned_to'))) {
return redirect()->route('checkout/accessory', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist'));
if (!$user = User::find($request->input('assigned_to'))) {
return redirect()->route('accessories.checkout.show', $accessory->id)->with('error', trans('admin/accessories/message.checkout.user_does_not_exist'));
}
// Make sure there is at least one available to checkout
if ($accessory->numRemaining() <= 0){
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.checkout.unavailable'));
}
// Update the accessory data
$accessory->assigned_to = e($request->input('assigned_to'));
@@ -12,9 +12,15 @@ use App\Models\Asset;
use App\Models\CheckoutAcceptance;
use App\Models\Company;
use App\Models\Contracts\Acceptable;
use App\Models\Setting;
use App\Models\User;
use App\Models\AssetModel;
use App\Models\Accessory;
use App\Models\License;
use App\Models\Component;
use App\Models\Consumable;
use App\Notifications\AcceptanceAssetAcceptedNotification;
use App\Notifications\AcceptanceAssetDeclinedNotification;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@@ -23,6 +29,7 @@ use Illuminate\Support\Str;
use App\Http\Controllers\SettingsController;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
use phpDocumentor\Reflection\Types\Compound;
class AcceptanceController extends Controller
{
@@ -106,12 +113,7 @@ class AcceptanceController extends Controller
Storage::makeDirectory('private_uploads/signatures', 775);
}
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
$display_model = '';
@@ -119,50 +121,114 @@ class AcceptanceController extends Controller
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
$sig_filename='';
if ($request->input('asset_acceptance') == 'accepted') {
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-'.Str::uuid().'-'.date('Y-m-d-his').'.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/'.$sig_filename, (string) $decoded_image);
/**
* Check for the eula-pdfs directory
*/
if (! Storage::exists('private_uploads/eula-pdfs')) {
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
}
if (Setting::getSettings()->require_accept_signature == '1') {
// Check if the signature directory exists, if not create it
if (!Storage::exists('private_uploads/signatures')) {
Storage::makeDirectory('private_uploads/signatures', 775);
}
// The item was accepted, check for a signature
if ($request->filled('signature_output')) {
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
$data_uri = $request->input('signature_output');
$encoded_image = explode(',', $data_uri);
$decoded_image = base64_decode($encoded_image[1]);
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
// No image data is present, kick them back.
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
} else {
return redirect()->back()->with('error', trans('general.shitty_browser'));
}
}
// this is horrible
if ($acceptance->checkoutable_type == 'App\Models\Asset') {
$pdf_view_route ='account.accept.accept-asset-eula';
$asset_model = AssetModel::find($item->model_id);
$display_model = $asset_model->name;
$assigned_to = User::find($item->assigned_to)->present()->fullName;
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$pdf_view_route ='account.accept.accept-asset-eula';
$asset_model = AssetModel::find($item->model_id);
if (!$asset_model) {
return redirect()->back()->with('error', trans('admin/models/message.does_not_exist'));
}
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
} elseif ($acceptance->checkoutable_type== 'App\Models\Accessory') {
$pdf_view_route ='account.accept.accept-accessory-eula';
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($item->assignedTo);
case 'App\Models\Accessory':
$pdf_view_route ='account.accept.accept-accessory-eula';
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
$pdf_view_route ='account.accept.accept-license-eula';
$license = License::find($item->license_id);
$display_model = $license->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Component':
$pdf_view_route ='account.accept.accept-component-eula';
$component = Component::find($item->id);
$display_model = $component->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Consumable':
$pdf_view_route ='account.accept.accept-consumable-eula';
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
}
// if ($acceptance->checkoutable_type == 'App\Models\Asset') {
// $pdf_view_route ='account.accept.accept-asset-eula';
// $asset_model = AssetModel::find($item->model_id);
// $display_model = $asset_model->name;
// $assigned_to = User::find($item->assigned_to)->present()->fullName;
//
// } elseif ($acceptance->checkoutable_type== 'App\Models\Accessory') {
// $pdf_view_route ='account.accept.accept-accessory-eula';
// $accessory = Accessory::find($item->id);
// $display_model = $accessory->name;
// $assigned_to = User::find($item->assignedTo);
//
// }
/**
* Gather the data for the PDF. We fire this whether there is a signature required or not,
* since we want the moment-in-time proof of what the EULA was when they accepted it.
*/
$branding_settings = SettingsController::getPDFBranding();
if (is_null($branding_settings->logo)){
$path_logo = "";
} else {
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
}
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_serial' => $item->serial,
'eula' => $item->getEula(),
'check_out_date' => Carbon::parse($acceptance->created_at)->format($branding_settings->date_display_format),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format($branding_settings->date_display_format),
'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d'),
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d'),
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
'logo' => public_path() . '/uploads/' . $branding_settings->logo,
'logo' => $path_logo,
'date_settings' => $branding_settings->date_display_format,
];
@@ -173,12 +239,55 @@ class AcceptanceController extends Controller
}
$acceptance->accept($sig_filename, $item->getEula(), $pdf_filename);
$acceptance->notify(new AcceptanceAssetAcceptedNotification($data));
event(new CheckoutAccepted($acceptance));
$return_msg = trans('admin/users/message.accepted');
} else {
// Format the data to send the declined notification
$branding_settings = SettingsController::getPDFBranding();
// This is the most horriblest
switch($acceptance->checkoutable_type){
case 'App\Models\Asset':
$asset_model = AssetModel::find($item->model_id);
$display_model = $asset_model->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Accessory':
$accessory = Accessory::find($item->id);
$display_model = $accessory->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\LicenseSeat':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Component':
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
case 'App\Models\Consumable':
$consumable = Consumable::find($item->id);
$display_model = $consumable->name;
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
break;
}
$data = [
'item_tag' => $item->asset_tag,
'item_model' => $display_model,
'item_serial' => $item->serial,
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
'assigned_to' => $assigned_to,
'company_name' => $branding_settings->site_name,
'date_settings' => $branding_settings->date_display_format,
];
$acceptance->decline($sig_filename);
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
event(new CheckoutDeclined($acceptance));
$return_msg = trans('admin/users/message.declined');
}
@@ -187,4 +296,4 @@ class AcceptanceController extends Controller
return redirect()->to('account/accept')->with('success', $return_msg);
}
}
}
@@ -26,9 +26,11 @@ class AccessoriesController extends Controller
*/
public function index(Request $request)
{
$this->authorize('view', Accessory::class);
$allowed_columns = ['id', 'name', 'model_number', 'eol', 'notes', 'created_at', 'min_amt', 'company_id'];
if ($request->user()->cannot('reports.view')) {
$this->authorize('view', Accessory::class);
}
// This array is what determines which fields should be allowed to be sorted on ON the table itself, no relations
// Relations will be handled in query scopes a little further down.
$allowed_columns =
@@ -42,10 +44,13 @@ class AccessoriesController extends Controller
'min_amt',
'company_id',
'notes',
'users_count',
'qty',
];
$accessories = Accessory::select('accessories.*')->with('category', 'company', 'manufacturer', 'users', 'location', 'supplier');
$accessories = Accessory::select('accessories.*')->with('category', 'company', 'manufacturer', 'users', 'location', 'supplier')
->withCount('users as users_count');
if ($request->filled('search')) {
$accessories = $accessories->TextSearch($request->input('search'));
@@ -75,12 +80,9 @@ class AccessoriesController extends Controller
$accessories->where('notes','=',$request->input('notes'));
}
// 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 = (($accessories) && ($request->get('offset') > $accessories->count())) ? $accessories->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $accessories->count()) ? $accessories->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort_override = $request->input('sort');
@@ -148,7 +150,7 @@ class AccessoriesController extends Controller
public function show($id)
{
$this->authorize('view', Accessory::class);
$accessory = Accessory::findOrFail($id);
$accessory = Accessory::withCount('users as users_count')->findOrFail($id);
return (new AccessoriesTransformer)->transformAccessory($accessory);
}
@@ -35,7 +35,8 @@ class AssetMaintenancesController extends Controller
public function index(Request $request)
{
$this->authorize('view', Asset::class);
$maintenances = AssetMaintenance::with('asset', 'asset.model', 'asset.location', 'supplier', 'asset.company', 'admin');
$maintenances = AssetMaintenance::select('asset_maintenances.*')->with('asset', 'asset.model', 'asset.location', 'asset.defaultLoc', 'supplier', 'asset.company', 'admin');
if ($request->filled('search')) {
$maintenances = $maintenances->TextSearch($request->input('search'));
@@ -45,12 +46,18 @@ class AssetMaintenancesController extends Controller
$maintenances->where('asset_id', '=', $request->input('asset_id'));
}
// 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 = (($maintenances) && ($request->get('offset') > $maintenances->count())) ? $maintenances->count() : $request->get('offset', 0);
if ($request->filled('supplier_id')) {
$maintenances->where('supplier_id', '=', $request->input('supplier_id'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('asset_maintenance_type')) {
$maintenances->where('asset_maintenance_type', '=', $request->input('asset_maintenance_type'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $maintenances->count()) ? $maintenances->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$allowed_columns = [
'id',
@@ -64,6 +71,8 @@ class AssetMaintenancesController extends Controller
'asset_tag',
'asset_name',
'user_id',
'supplier',
'is_warranty',
];
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
@@ -72,6 +81,9 @@ class AssetMaintenancesController extends Controller
case 'user_id':
$maintenances = $maintenances->OrderAdmin($order);
break;
case 'supplier':
$maintenances = $maintenances->OrderBySupplier($order);
break;
case 'asset_tag':
$maintenances = $maintenances->OrderByTag($order);
break;
@@ -107,7 +119,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(e($request->input('asset_id')));
@@ -164,7 +176,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = e($request->input('supplier_id'));
$assetMaintenance->is_warranty = e($request->input('is_warranty'));
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = e($request->input('notes'));
$asset = Asset::find(request('asset_id'));
@@ -63,23 +63,24 @@ class AssetModelsController extends Controller
'models.deleted_at',
'models.updated_at',
])
->with('category', 'depreciation', 'manufacturer', 'fieldset')
->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues')
->withCount('assets as assets_count');
if ($request->input('status')=='deleted') {
$assetmodels->onlyTrashed();
}
if ($request->filled('category_id')) {
$assetmodels = $assetmodels->where('models.category_id', '=', $request->input('category_id'));
}
if ($request->filled('search')) {
$assetmodels->TextSearch($request->input('search'));
}
// 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 = (($assetmodels) && ($request->get('offset') > $assetmodels->count())) ? $assetmodels->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $assetmodels->count()) ? $assetmodels->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'models.created_at';
+185 -124
View File
@@ -100,6 +100,8 @@ class AssetsController extends Controller
'checkout_counter',
'checkin_counter',
'requests_counter',
'byod',
'asset_eol_date',
];
$filter = [];
@@ -113,22 +115,22 @@ class AssetsController extends Controller
$allowed_columns[] = $field->db_column_name();
}
$assets = Company::scopeCompanyables(Asset::select('assets.*'), 'company_id', 'assets')
$assets = Asset::select('assets.*')
->with('location', 'assetstatus', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset','supplier'); //it might be tempting to add 'assetlog' here, but don't. It blows up update-heavy users.
if ($filter_non_deprecable_assets) {
$non_deprecable_models = AssetModel::select('id')->whereNotNull('depreciation_id')->get();
$assets->InModelList($non_deprecable_models->toArray());
}
// These are used by the API to query against specific ID numbers.
// They are also used by the individual searches on detail pages like
// locations, etc.
// Search custom fields by column name
foreach ($all_custom_fields as $field) {
if ($request->filled($field->db_column_name())) {
@@ -136,64 +138,12 @@ class AssetsController extends Controller
}
}
if ($request->filled('status_id')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
if ((! is_null($filter)) && (count($filter)) > 0) {
$assets->ByFilter($filter);
} elseif ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
}
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
$assets->InModelList([$request->input('model_id')]);
}
if ($request->filled('category_id')) {
$assets->InCategory($request->input('category_id'));
}
if ($request->filled('location_id')) {
$assets->where('assets.location_id', '=', $request->input('location_id'));
}
if ($request->filled('rtd_location_id')) {
$assets->where('assets.rtd_location_id', '=', $request->input('rtd_location_id'));
}
if ($request->filled('supplier_id')) {
$assets->where('assets.supplier_id', '=', $request->input('supplier_id'));
}
if (($request->filled('assigned_to')) && ($request->filled('assigned_type'))) {
$assets->where('assets.assigned_to', '=', $request->input('assigned_to'))
->where('assets.assigned_type', '=', $request->input('assigned_type'));
}
if ($request->filled('company_id')) {
$assets->where('assets.company_id', '=', $request->input('company_id'));
}
if ($request->filled('manufacturer_id')) {
$assets->ByManufacturer($request->input('manufacturer_id'));
}
if ($request->filled('depreciation_id')) {
$assets->ByDepreciationId($request->input('depreciation_id'));
}
$request->filled('order_number') ? $assets = $assets->where('assets.order_number', '=', e($request->get('order_number'))) : '';
// 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 = (($assets) && ($request->get('offset') > $assets->count())) ? $assets->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
// This is used by the audit reporting routes
if (Gate::allows('audit', Asset::class)) {
switch ($audit) {
@@ -207,7 +157,6 @@ class AssetsController extends Controller
}
// This is used by the sidenav, mostly
// We switched from using query scopes here because of a Laravel bug
@@ -257,7 +206,12 @@ class AssetsController extends Controller
break;
case 'Deployed':
// more sad, horrible workarounds for laravel bugs when doing full text searches
$assets->where('assets.assigned_to', '>', '0');
$assets->whereNotNull('assets.assigned_to');
break;
case 'byod':
// This is kind of redundant, since we already check for byod=1 above, but this keeps the
// sidebar nav links a little less chaotic
$assets->where('assets.byod', '=', '1');
break;
default:
@@ -278,12 +232,71 @@ class AssetsController extends Controller
}
if ((! is_null($filter)) && (count($filter)) > 0) {
$assets->ByFilter($filter);
} elseif ($request->filled('search')) {
$assets->TextSearch($request->input('search'));
// Leave these under the TextSearch scope, else the fuzziness will override the specific ID (status ID, etc) requested
if ($request->filled('status_id')) {
$assets->where('assets.status_id', '=', $request->input('status_id'));
}
if ($request->filled('asset_tag')) {
$assets->where('assets.asset_tag', '=', $request->input('asset_tag'));
}
if ($request->filled('serial')) {
$assets->where('assets.serial', '=', $request->input('serial'));
}
if ($request->input('requestable') == 'true') {
$assets->where('assets.requestable', '=', '1');
}
if ($request->filled('model_id')) {
$assets->InModelList([$request->input('model_id')]);
}
if ($request->filled('category_id')) {
$assets->InCategory($request->input('category_id'));
}
if ($request->filled('location_id')) {
$assets->where('assets.location_id', '=', $request->input('location_id'));
}
if ($request->filled('rtd_location_id')) {
$assets->where('assets.rtd_location_id', '=', $request->input('rtd_location_id'));
}
if ($request->filled('supplier_id')) {
$assets->where('assets.supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('asset_eol_date')) {
$assets->where('assets.asset_eol_date', '=', $request->input('asset_eol_date'));
}
if (($request->filled('assigned_to')) && ($request->filled('assigned_type'))) {
$assets->where('assets.assigned_to', '=', $request->input('assigned_to'))
->where('assets.assigned_type', '=', $request->input('assigned_type'));
}
if ($request->filled('company_id')) {
$assets->where('assets.company_id', '=', $request->input('company_id'));
}
if ($request->filled('manufacturer_id')) {
$assets->ByManufacturer($request->input('manufacturer_id'));
}
if ($request->filled('depreciation_id')) {
$assets->ByDepreciationId($request->input('depreciation_id'));
}
if ($request->filled('byod')) {
$assets->where('assets.byod', '=', $request->input('byod'));
}
if ($request->filled('order_number')) {
$assets->where('assets.order_number', '=', $request->get('order_number'));
}
// This is kinda gross, but we need to do this because the Bootstrap Tables
// API passes custom field ordering as custom_fields.fieldname, and we have to strip
@@ -294,7 +307,8 @@ class AssetsController extends Controller
// in the allowed_columns array)
$column_sort = in_array($sort_override, $allowed_columns) ? $sort_override : 'assets.created_at';
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
switch ($sort_override) {
case 'model':
$assets->OrderModels($order);
@@ -331,6 +345,10 @@ class AssetsController extends Controller
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $assets->count()) ? $assets->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$total = $assets->count();
$assets = $assets->skip($offset)->take($limit)->get();
@@ -357,19 +375,38 @@ class AssetsController extends Controller
/**
* Returns JSON with information about an asset (by tag) for detail view.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param string $tag
* @since [v4.2.1]
* @return JsonResponse
* @author [A. Gianotto] [<snipe@snipe.net>]
* @return \Illuminate\Http\JsonResponse
*/
public function showByTag(Request $request, $tag)
{
if ($asset = Asset::with('assetstatus')->with('assignedTo')->where('asset_tag', $tag)->first()) {
$this->authorize('view', $asset);
$this->authorize('index', Asset::class);
$assets = Asset::where('asset_tag', $tag)->with('assetstatus')->with('assignedTo');
return (new AssetsTransformer)->transformAsset($asset, $request);
// Check if they've passed ?deleted=true
if ($request->input('deleted', 'false') == 'true') {
$assets = $assets->withTrashed();
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
if (($assets = $assets->get()) && ($assets->count()) > 0) {
// If there is exactly one result and the deleted parameter is not passed, we should pull the first (and only)
// asset from the returned collection, since transformAsset() expects an Asset object, NOT a collection
if (($assets->count() == 1) && ($request->input('deleted') != 'true')) {
return (new AssetsTransformer)->transformAsset($assets->first());
// If there is more than one result OR if the endpoint is requesting deleted items (even if there is only one
// match, return the normal collection transformed.
} else {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
}
// If there are 0 results, return the "no such asset" response
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
@@ -379,29 +416,25 @@ class AssetsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param string $serial
* @since [v4.2.1]
* @return JsonResponse
* @return \Illuminate\Http\JsonResponse
*/
public function showBySerial(Request $request, $serial)
{
$this->authorize('index', Asset::class);
if ($assets = Asset::with('assetstatus')->with('assignedTo')
->withTrashed()->where('serial', $serial)->get()) {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
$assets = Asset::where('serial', $serial)->with('assetstatus')->with('assignedTo');
$assets = Asset::with('assetstatus')->with('assignedTo');
if ($request->input('deleted', 'false') === 'true') {
// Check if they've passed ?deleted=true
if ($request->input('deleted', 'false') == 'true') {
$assets = $assets->withTrashed();
}
$assets = $assets->where('serial', $serial)->get();
if ($assets) {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
} else {
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
if (($assets = $assets->get()) && ($assets->count()) > 0) {
return (new AssetsTransformer)->transformAssets($assets, $assets->count());
}
// If there are 0 results, return the "no such asset" response
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
/**
@@ -428,7 +461,7 @@ class AssetsController extends Controller
{
$this->authorize('view', Asset::class);
$this->authorize('view', License::class);
$asset = Asset::where('id', $id)->withTrashed()->first();
$asset = Asset::where('id', $id)->withTrashed()->firstorfail();
$licenses = $asset->licenses()->get();
return (new LicensesTransformer())->transformLicenses($licenses, $licenses->count());
@@ -446,7 +479,7 @@ class AssetsController extends Controller
public function selectlist(Request $request)
{
$assets = Company::scopeCompanyables(Asset::select([
$assets = Asset::select([
'assets.id',
'assets.name',
'assets.asset_tag',
@@ -454,7 +487,7 @@ class AssetsController extends Controller
'assets.assigned_to',
'assets.assigned_type',
'assets.status_id',
])->with('model', 'assetstatus', 'assignedTo')->NotArchived(), 'company_id', 'assets');
])->with('model', 'assetstatus', 'assignedTo')->NotArchived();
if ($request->filled('assetStatusType') && $request->input('assetStatusType') === 'RTD') {
$assets = $assets->RTD();
@@ -519,7 +552,8 @@ class AssetsController extends Controller
$asset->depreciate = '0';
$asset->status_id = $request->get('status_id', 0);
$asset->warranty_months = $request->get('warranty_months', null);
$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_cost = $request->get('purchase_cost');
$asset->asset_eol_date = $request->get('asset_eol_date', $asset->present()->eol_date());
$asset->purchase_date = $request->get('purchase_date', null);
$asset->assigned_to = $request->get('assigned_to', null);
$asset->supplier_id = $request->get('supplier_id');
@@ -527,6 +561,7 @@ class AssetsController extends Controller
$asset->rtd_location_id = $request->get('rtd_location_id', null);
$asset->location_id = $request->get('rtd_location_id', null);
/**
* this is here just legacy reasons. Api\AssetController
* used image_source once to allow encoded image uploads.
@@ -540,15 +575,16 @@ class AssetsController extends Controller
// Update custom fields in the database.
// Validation for these fields is handled through the AssetRequest form request
$model = AssetModel::find($request->get('model_id'));
if (($model) && ($model->fieldset)) {
foreach ($model->fieldset->fields as $field) {
// Set the field value based on what was sent in the request
$field_val = $request->input($field->convertUnicodeDbSlug(), null);
$field_val = $request->input($field->db_column, null);
// If input value is null, use custom field's default value
if ($field_val == null) {
\Log::debug('Field value for '.$field->convertUnicodeDbSlug().' is null');
\Log::debug('Field value for '.$field->db_column.' is null');
$field_val = $field->defaultValue($request->get('model_id'));
\Log::debug('Use the default fieldset value of '.$field->defaultValue($request->get('model_id')));
}
@@ -563,13 +599,13 @@ class AssetsController extends Controller
if (($field_val == null) && ($request->has('model_id') != '')) {
$field_val = \Crypt::encrypt($field->defaultValue($request->get('model_id')));
} else {
$field_val = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
$field_val = \Crypt::encrypt($request->input($field->db_column));
}
}
}
$asset->{$field->convertUnicodeDbSlug()} = $field_val;
$asset->{$field->db_column} = $field_val;
}
}
@@ -634,13 +670,13 @@ class AssetsController extends Controller
// Update custom fields
if (($model = AssetModel::find($asset->model_id)) && (isset($model->fieldset))) {
foreach ($model->fieldset->fields as $field) {
if ($request->has($field->convertUnicodeDbSlug())) {
if ($request->has($field->db_column)) {
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
}
} else {
$asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug());
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
@@ -714,30 +750,53 @@ class AssetsController extends Controller
* @since [v5.1.18]
* @return JsonResponse
*/
public function restore($assetId = null)
public function restore(Request $request, $assetId = null)
{
// Get asset information
$asset = Asset::withTrashed()->find($assetId);
$this->authorize('delete', $asset);
if (isset($asset->id)) {
// Restore the asset
Asset::withTrashed()->where('id', $assetId)->restore();
$logaction = new Actionlog();
$logaction->item_type = Asset::class;
$logaction->item_id = $asset->id;
$logaction->created_at = date("Y-m-d H:i:s");
$logaction->user_id = Auth::user()->id;
$logaction->logaction('restored');
if ($asset->deleted_at=='') {
$message = 'Asset was not deleted. No data was changed.';
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/hardware/message.restore.success')));
} else {
$message = trans('admin/hardware/message.restore.success');
// Restore the asset
Asset::withTrashed()->where('id', $assetId)->restore();
$logaction = new Actionlog();
$logaction->item_type = Asset::class;
$logaction->item_id = $asset->id;
$logaction->created_at = date("Y-m-d H:i:s");
$logaction->user_id = Auth::user()->id;
$logaction->logaction('restored');
}
return response()->json(Helper::formatStandardApiResponse('success', (new AssetsTransformer)->transformAsset($asset, $request), $message));
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
}
/**
* Checkout an asset by its tag.
*
* @author [N. Butler]
* @param string $tag
* @since [v6.0.5]
* @return JsonResponse
*/
public function checkoutByTag(AssetCheckoutRequest $request, $tag)
{
if ($asset = Asset::where('asset_tag', $tag)->first()) {
return $this->checkout($request, $asset->id);
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Asset not found'), 200);
}
/**
* Checkout an asset
@@ -774,7 +833,6 @@ class AssetsController extends Controller
} elseif (request('checkout_to_type') == 'asset') {
$target = Asset::where('id', '!=', $asset_id)->find(request('assigned_asset'));
$asset->location_id = $target->rtd_location_id;
// Override with the asset's location_id if it has one
$asset->location_id = (($target) && (isset($target->location_id))) ? $target->location_id : '';
$error_payload['target_id'] = $request->input('assigned_asset');
@@ -802,7 +860,8 @@ class AssetsController extends Controller
$checkout_at = request('checkout_at', date('Y-m-d H:i:s'));
$expected_checkin = request('expected_checkin', null);
$note = request('note', null);
$asset_name = request('name', null);
// Using `->has` preserves the asset name if the name parameter was not included in request.
$asset_name = request()->has('name') ? request('name') : $asset->name;
// Set the location ID to the RTD location id if there is one
// Wait, why are we doing this? This overrides the stuff we set further up, which makes no sense.
@@ -849,7 +908,7 @@ class AssetsController extends Controller
$asset->assignedTo()->disassociate($asset);
$asset->accepted = null;
if ($request->filled('name')) {
if ($request->has('name')) {
$asset->name = $request->input('name');
}
@@ -862,11 +921,9 @@ class AssetsController extends Controller
if ($request->has('status_id')) {
$asset->status_id = $request->input('status_id');
}
$checkin_at = $request->filled('checkin_at') ? $request->input('checkin_at').' '. date('H:i:s') : date('Y-m-d H:i:s');
$checkin_at = null;
if ($request->filled('checkin_at')) {
$checkin_at = $request->input('checkin_at');
}
if ($asset->save()) {
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at));
@@ -884,18 +941,21 @@ class AssetsController extends Controller
* @since [v6.0]
* @return JsonResponse
*/
public function checkinByTag(Request $request)
public function checkinByTag(Request $request, $tag = null)
{
$this->authorize('checkin', Asset::class);
$asset = Asset::where('asset_tag', $request->input('asset_tag'))->first();
if(null == $tag && null !== ($request->input('asset_tag'))) {
$tag = $request->input('asset_tag');
}
$asset = Asset::where('asset_tag', $tag)->first();
if($asset) {
if ($asset) {
return $this->checkin($request, $asset->id);
}
return response()->json(Helper::formatStandardApiResponse('error', [
'asset'=> e($request->input('asset_tag'))
], 'Asset with tag '.e($request->input('asset_tag')).' not found'));
'asset'=> e($tag)
], 'Asset with tag '.e($tag).' not found'));
}
@@ -972,9 +1032,10 @@ class AssetsController extends Controller
{
$this->authorize('viewRequestable', Asset::class);
$assets = Company::scopeCompanyables(Asset::select('assets.*'), 'company_id', 'assets')
$assets = Asset::select('assets.*')
->with('location', 'assetstatus', 'assetlog', 'company', 'defaultLoc','assignedTo',
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier')->requestableAssets();
'model.category', 'model.manufacturer', 'model.fieldset', 'supplier')
->requestableAssets();
$offset = request('offset', 0);
$limit = $request->input('limit', 50);
@@ -10,6 +10,7 @@ use App\Models\Category;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class CategoriesController extends Controller
{
@@ -23,21 +24,76 @@ class CategoriesController extends Controller
public function index(Request $request)
{
$this->authorize('view', Category::class);
$allowed_columns = ['id', 'name', 'category_type', 'category_type', 'use_default_eula', 'eula_text', 'require_acceptance', 'checkin_email', 'assets_count', 'accessories_count', 'consumables_count', 'components_count', 'licenses_count', 'image'];
$allowed_columns = [
'id',
'name',
'category_type',
'category_type',
'use_default_eula',
'eula_text',
'require_acceptance',
'checkin_email',
'assets_count',
'accessories_count',
'consumables_count',
'components_count',
'licenses_count',
'image',
];
$categories = Category::select(['id', 'created_at', 'updated_at', 'name', 'category_type', 'use_default_eula', 'eula_text', 'require_acceptance', 'checkin_email', 'image'])
->withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count');
$categories = Category::select([
'id',
'created_at',
'updated_at',
'name', 'category_type',
'use_default_eula',
'eula_text',
'require_acceptance',
'checkin_email',
'image'
])->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count');
/*
* This checks to see if we should override the Admin Setting to show archived assets in list.
* We don't currently use it within the Snipe-IT GUI, but will be useful for API integrations where they
* may actually need to fetch assets that are archived.
*
* @see \App\Models\Category::showableAssets()
*/
if ($request->input('archived')=='true') {
$categories = $categories->withCount('assets as assets_count');
} else {
$categories = $categories->withCount('showableAssets as assets_count');
}
if ($request->filled('search')) {
$categories = $categories->TextSearch($request->input('search'));
}
// 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 = (($categories) && ($request->get('offset') > $categories->count())) ? $categories->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$categories->where('name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('category_type')) {
$categories->where('category_type', '=', $request->input('category_type'));
}
if ($request->filled('use_default_eula')) {
$categories->where('use_default_eula', '=', $request->input('use_default_eula'));
}
if ($request->filled('require_acceptance')) {
$categories->where('require_acceptance', '=', $request->input('require_acceptance'));
}
if ($request->filled('checkin_email')) {
$categories->where('checkin_email', '=', $request->input('checkin_email'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $categories->count()) ? $categories->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'assets_count';
@@ -85,7 +141,7 @@ class CategoriesController extends Controller
public function show($id)
{
$this->authorize('view', Category::class);
$category = Category::findOrFail($id);
$category = Category::withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count')->findOrFail($id);
return (new CategoriesTransformer)->transformCategory($category);
}
@@ -104,8 +160,14 @@ class CategoriesController extends Controller
{
$this->authorize('update', Category::class);
$category = Category::findOrFail($id);
// Don't allow the user to change the category_type once it's been created
if (($request->filled('category_type')) && ($category->category_type != $request->input('category_type'))) {
return response()->json(
Helper::formatStandardApiResponse('error', null, trans('admin/categories/message.update.cannot_change_category_type'))
);
}
$category->fill($request->all());
$category->category_type = strtolower($request->input('category_type'));
$category = $request->handleImages($category);
if ($category->save()) {
@@ -126,7 +188,7 @@ class CategoriesController extends Controller
public function destroy($id)
{
$this->authorize('delete', Category::class);
$category = Category::findOrFail($id);
$category = Category::withCount('assets as assets_count', 'accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count')->findOrFail($id);
if (! $category->isDeletable()) {
return response()->json(
@@ -43,12 +43,15 @@ class CompaniesController extends Controller
$companies->TextSearch($request->input('search'));
}
// 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 = (($companies) && ($request->get('offset') > $companies->count())) ? $companies->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$companies->where('name', '=', $request->input('name'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $companies->count()) ? $companies->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -12,6 +12,7 @@ use App\Http\Requests\ImageUploadRequest;
use App\Events\CheckoutableCheckedIn;
use App\Events\ComponentCheckedIn;
use App\Models\Asset;
use Illuminate\Support\Facades\Validator;
class ComponentsController extends Controller
{
@@ -43,14 +44,17 @@ class ComponentsController extends Controller
'notes',
];
$components = Company::scopeCompanyables(Component::select('components.*')
->with('company', 'location', 'category', 'assets'));
$components = Component::select('components.*')
->with('company', 'location', 'category', 'assets', 'supplier');
if ($request->filled('search')) {
$components = $components->TextSearch($request->input('search'));
}
if ($request->filled('name')) {
$components->where('name', '=', $request->input('name'));
}
if ($request->filled('company_id')) {
$components->where('company_id', '=', $request->input('company_id'));
}
@@ -59,6 +63,10 @@ class ComponentsController extends Controller
$components->where('category_id', '=', $request->input('category_id'));
}
if ($request->filled('supplier_id')) {
$components->where('supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('location_id')) {
$components->where('location_id', '=', $request->input('location_id'));
}
@@ -67,14 +75,10 @@ class ComponentsController extends Controller
$components->where('notes','=',$request->input('notes'));
}
// 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 = (($components) && ($request->get('offset') > $components->count())) ? $components->count() : $request->get('offset', 0);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $components->count()) ? $components->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort_override = $request->input('sort');
$column_sort = in_array($sort_override, $allowed_columns) ? $sort_override : 'created_at';
@@ -89,6 +93,9 @@ class ComponentsController extends Controller
case 'company':
$components = $components->OrderCompany($order);
break;
case 'supplier':
$components = $components->OrderSupplier($order);
break;
default:
$components = $components->orderBy($column_sort, $order);
break;
@@ -221,20 +228,30 @@ class ComponentsController extends Controller
public function checkout(Request $request, $componentId)
{
// Check if the component exists
if (is_null($component = Component::find($componentId))) {
if (!$component = Component::find($componentId)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.does_not_exist')));
}
$this->authorize('checkout', $component);
$validator = Validator::make($request->all(), [
'asset_id' => 'required|exists:assets,id',
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
]);
if ($validator->fails()) {
return response()->json(Helper::formatStandardApiResponse('error', $validator->errors()));
}
// Make sure there is at least one available to checkout
if ($component->numRemaining() <= $request->get('assigned_qty')) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.checkout.unavailable', ['remaining' => $component->numRemaining(), 'requested' => $request->get('assigned_qty')])));
}
if ($component->numRemaining() >= $request->get('assigned_qty')) {
if (!$asset = Asset::find($request->input('assigned_to'))) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')));
}
// Update the accessory data
$asset = Asset::find($request->input('assigned_to'));
$component->assigned_to = $request->input('assigned_to');
$component->assets()->attach($component->id, [
@@ -242,7 +259,8 @@ class ComponentsController extends Controller
'created_at' => \Carbon::now(),
'assigned_qty' => $request->get('assigned_qty', 1),
'user_id' => \Auth::id(),
'asset_id' => $request->get('assigned_to')
'asset_id' => $request->get('assigned_to'),
'note' => $request->get('note'),
]);
$component->logCheckout($request->input('note'), $asset);
@@ -250,7 +268,7 @@ class ComponentsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/components/message.checkout.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Not enough components remaining: '.$component->numRemaining().' remaining, '.$request->get('assigned_qty').' requested.'));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/components/message.checkout.unavailable', ['remaining' => $component->numRemaining(), 'requested' => $request->get('assigned_qty')])));
}
/**
@@ -45,16 +45,17 @@ class ConsumablesController extends Controller
'notes',
];
$consumables = Company::scopeCompanyables(
Consumable::select('consumables.*')
->with('company', 'location', 'category', 'users', 'manufacturer')
);
$consumables = Consumable::select('consumables.*')
->with('company', 'location', 'category', 'users', 'manufacturer');
if ($request->filled('search')) {
$consumables = $consumables->TextSearch(e($request->input('search')));
}
if ($request->filled('name')) {
$consumables->where('name', '=', $request->input('name'));
}
if ($request->filled('company_id')) {
$consumables->where('company_id', '=', $request->input('company_id'));
}
@@ -71,6 +72,10 @@ class ConsumablesController extends Controller
$consumables->where('manufacturer_id', '=', $request->input('manufacturer_id'));
}
if ($request->filled('supplier_id')) {
$consumables->where('supplier_id', '=', $request->input('supplier_id'));
}
if ($request->filled('location_id')) {
$consumables->where('location_id','=',$request->input('location_id'));
}
@@ -80,12 +85,9 @@ class ConsumablesController extends Controller
}
// 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 = (($consumables) && ($request->get('offset') > $consumables->count())) ? $consumables->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $consumables->count()) ? $consumables->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$allowed_columns = ['id', 'name', 'order_number', 'min_amt', 'purchase_date', 'purchase_cost', 'company', 'category', 'model_number', 'item_no', 'manufacturer', 'location', 'qty', 'image'];
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
@@ -107,6 +109,9 @@ class ConsumablesController extends Controller
case 'company':
$consumables = $consumables->OrderCompany($order);
break;
case 'supplier':
$components = $consumables->OrderSupplier($order);
break;
default:
$consumables = $consumables->orderBy($column_sort, $order);
break;
@@ -150,7 +155,7 @@ class ConsumablesController extends Controller
public function show($id)
{
$this->authorize('view', Consumable::class);
$consumable = Consumable::findOrFail($id);
$consumable = Consumable::with('users')->findOrFail($id);
return (new ConsumablesTransformer)->transformConsumable($consumable);
}
@@ -224,9 +229,11 @@ class ConsumablesController extends Controller
foreach ($consumable->consumableAssignments as $consumable_assignment) {
$rows[] = [
'avatar' => ($consumable_assignment->user) ? e($consumable_assignment->user->present()->gravatar) : '',
'name' => ($consumable_assignment->user) ? $consumable_assignment->user->present()->nameUrl() : 'Deleted User',
'created_at' => Helper::getFormattedDateObject($consumable_assignment->created_at, 'datetime'),
'admin' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : '',
'note' => ($consumable_assignment->note) ? e($consumable_assignment->note) : null,
'admin' => ($consumable_assignment->admin) ? $consumable_assignment->admin->present()->nameUrl() : null,
];
}
@@ -247,32 +254,39 @@ class ConsumablesController extends Controller
public function checkout(Request $request, $id)
{
// Check if the consumable exists
if (is_null($consumable = Consumable::find($id))) {
if (!$consumable = Consumable::with('users')->find($id)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/consumables/message.does_not_exist')));
}
$this->authorize('checkout', $consumable);
if ($consumable->qty > 0) {
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/consumables/message.checkout.unavailable')));
\Log::debug('No enough remaining');
}
// Check if the user exists
$assigned_to = $request->input('assigned_to');
if (is_null($user = User::find($assigned_to))) {
// Return error message
return response()->json(Helper::formatStandardApiResponse('error', null, 'No user found'));
}
// Check if the user exists - @TODO: this should probably be handled via validation, not here??
if (!$user = User::find($request->input('assigned_to'))) {
// Return error message
return response()->json(Helper::formatStandardApiResponse('error', null, 'No user found'));
\Log::debug('No valid user');
}
// Update the consumable data
$consumable->assigned_to = e($assigned_to);
// Update the consumable data
$consumable->assigned_to = $request->input('assigned_to');
$consumable->users()->attach($consumable->id, [
'consumable_id' => $consumable->id,
'user_id' => $user->id,
'assigned_to' => $assigned_to,
]);
$consumable->users()->attach($consumable->id,
[
'consumable_id' => $consumable->id,
'user_id' => $user->id,
'assigned_to' => $request->input('assigned_to'),
'note' => $request->input('note'),
]
);
// Log checkout event
$logaction = $consumable->logCheckout(e($request->input('note')), $user);
$logaction = $consumable->logCheckout($request->input('note'), $user);
$data['log_id'] = $logaction->id;
$data['eula'] = $consumable->getEula();
$data['first_name'] = $user->first_name;
@@ -282,9 +296,7 @@ class ConsumablesController extends Controller
$data['require_acceptance'] = $consumable->requireAcceptance();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/consumables/message.checkout.success')));
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'No consumables remaining'));
}
/**
@@ -96,7 +96,7 @@ class CustomFieldsController extends Controller
$data = $request->all();
$regex_format = null;
if (str_contains($data['format'], 'regex:')) {
if ((array_key_exists('format', $data)) && (str_contains($data['format'], 'regex:'))) {
$regex_format = $data['format'];
}
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
use App\Http\Transformers\CustomFieldsetsTransformer;
use App\Http\Transformers\CustomFieldsTransformer;
use App\Models\CustomFieldset;
use App\Models\CustomField;
use Illuminate\Http\Request;
use Redirect;
use View;
@@ -33,7 +34,7 @@ class CustomFieldsetsController extends Controller
*/
public function index()
{
$this->authorize('index', CustomFieldset::class);
$this->authorize('index', CustomField::class);
$fieldsets = CustomFieldset::withCount('fields as fields_count', 'models as models_count')->get();
return (new CustomFieldsetsTransformer)->transformCustomFieldsets($fieldsets, $fieldsets->count());
@@ -49,7 +50,7 @@ class CustomFieldsetsController extends Controller
*/
public function show($id)
{
$this->authorize('view', CustomFieldset::class);
$this->authorize('view', CustomField::class);
if ($fieldset = CustomFieldset::find($id)) {
return (new CustomFieldsetsTransformer)->transformCustomFieldset($fieldset);
}
@@ -68,7 +69,7 @@ class CustomFieldsetsController extends Controller
*/
public function update(Request $request, $id)
{
$this->authorize('update', CustomFieldset::class);
$this->authorize('update', CustomField::class);
$fieldset = CustomFieldset::findOrFail($id);
$fieldset->fill($request->all());
@@ -89,11 +90,23 @@ class CustomFieldsetsController extends Controller
*/
public function store(Request $request)
{
$this->authorize('create', CustomFieldset::class);
$this->authorize('create', CustomField::class);
$fieldset = new CustomFieldset;
$fieldset->fill($request->all());
if ($fieldset->save()) {
// Sync fieldset with auto_add_to_fieldsets
$fields = CustomField::select('id')->where('auto_add_to_fieldsets', '=', '1')->get();
if ($fields->count() > 0) {
foreach ($fields as $field) {
$field_ids[] = $field->id;
}
$fieldset->fields()->sync($field_ids);
}
return response()->json(Helper::formatStandardApiResponse('success', $fieldset, trans('admin/custom_fields/message.fieldset.create.success')));
}
@@ -109,7 +122,7 @@ class CustomFieldsetsController extends Controller
*/
public function destroy($id)
{
$this->authorize('delete', CustomFieldset::class);
$this->authorize('delete', CustomField::class);
$fieldset = CustomFieldset::findOrFail($id);
$modelsCount = $fieldset->models->count();
@@ -136,7 +149,7 @@ class CustomFieldsetsController extends Controller
*/
public function fields($id)
{
$this->authorize('view', CustomFieldset::class);
$this->authorize('view', CustomField::class);
$set = CustomFieldset::findOrFail($id);
$fields = $set->fields;
@@ -153,7 +166,7 @@ class CustomFieldsetsController extends Controller
*/
public function fieldsWithDefaultValues($fieldsetId, $modelId)
{
$this->authorize('view', CustomFieldset::class);
$this->authorize('view', CustomField::class);
$set = CustomFieldset::findOrFail($fieldsetId);
@@ -42,12 +42,25 @@ class DepartmentsController extends Controller
$departments = $departments->TextSearch($request->input('search'));
}
// 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 = (($departments) && ($request->get('offset') > $departments->count())) ? $departments->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$departments->where('name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('company_id')) {
$departments->where('company_id', '=', $request->input('company_id'));
}
if ($request->filled('manager_id')) {
$departments->where('manager_id', '=', $request->input('manager_id'));
}
if ($request->filled('location_id')) {
$departments->where('location_id', '=', $request->input('location_id'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $departments->count()) ? $departments->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -28,12 +28,9 @@ class DepreciationsController extends Controller
$depreciations = $depreciations->TextSearch($request->input('search'));
}
// 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 = (($depreciations) && ($request->get('offset') > $depreciations->count())) ? $depreciations->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $depreciations->count()) ? $depreciations->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
+19 -12
View File
@@ -8,6 +8,7 @@ use App\Http\Transformers\GroupsTransformer;
use App\Models\Group;
use Illuminate\Http\Request;
class GroupsController extends Controller
{
/**
@@ -19,6 +20,8 @@ class GroupsController extends Controller
*/
public function index(Request $request)
{
$this->authorize('superadmin');
$this->authorize('view', Group::class);
$allowed_columns = ['id', 'name', 'created_at', 'users_count'];
@@ -28,12 +31,13 @@ class GroupsController extends Controller
$groups = $groups->TextSearch($request->input('search'));
}
// 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 = (($groups) && ($request->get('offset') > $groups->count())) ? $groups->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$groups->where('name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $groups->count()) ? $groups->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -55,9 +59,11 @@ class GroupsController extends Controller
*/
public function store(Request $request)
{
$this->authorize('create', Group::class);
$this->authorize('superadmin');
$group = new Group;
$group->fill($request->all());
$group->name = $request->input('name');
$group->permissions = $request->input('permissions'); // Todo - some JSON validation stuff here
if ($group->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $group, trans('admin/groups/message.create.success')));
@@ -76,7 +82,7 @@ class GroupsController extends Controller
*/
public function show($id)
{
$this->authorize('view', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
return (new GroupsTransformer)->transformGroup($group);
@@ -93,9 +99,11 @@ class GroupsController extends Controller
*/
public function update(Request $request, $id)
{
$this->authorize('update', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
$group->fill($request->all());
$group->name = $request->input('name');
$group->permissions = $request->input('permissions'); // Todo - some JSON validation stuff here
if ($group->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $group, trans('admin/groups/message.update.success')));
@@ -114,9 +122,8 @@ class GroupsController extends Controller
*/
public function destroy($id)
{
$this->authorize('delete', Group::class);
$this->authorize('superadmin');
$group = Group::findOrFail($id);
$this->authorize('delete', $group);
$group->delete();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/groups/message.delete.success')));
+45 -11
View File
@@ -10,6 +10,7 @@ use App\Models\Asset;
use App\Models\Company;
use App\Models\Import;
use Artisan;
use Illuminate\Database\Eloquent\JsonEncodingException;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
@@ -35,7 +36,7 @@ class ImportController extends Controller
* Process and store a CSV upload file.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
* @return \Illuminate\Http\JsonResponse
*/
public function store()
{
@@ -56,7 +57,7 @@ class ImportController extends Controller
'text/tsv', ])) {
$results['error'] = 'File type must be CSV. Uploaded file is '.$file->getMimeType();
return response()->json(Helper::formatStandardApiResponse('error', null, $results['error']), 500);
return response()->json(Helper::formatStandardApiResponse('error', null, $results['error']), 422);
}
//TODO: is there a lighter way to do this?
@@ -64,7 +65,19 @@ class ImportController extends Controller
ini_set('auto_detect_line_endings', '1');
}
$reader = Reader::createFromFileObject($file->openFile('r')); //file pointer leak?
$import->header_row = $reader->fetchOne(0);
try {
$import->header_row = $reader->fetchOne(0);
} catch (JsonEncodingException $e) {
return response()->json(
Helper::formatStandardApiResponse(
'error',
null,
trans('admin/hardware/message.import.header_row_has_malformed_characters')
),
422
);
}
//duplicate headers check
$duplicate_headers = [];
@@ -82,11 +95,22 @@ class ImportController extends Controller
}
}
if (count($duplicate_headers) > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, implode('; ', $duplicate_headers)), 500); //should this be '4xx'?
return response()->json(Helper::formatStandardApiResponse('error', null, implode('; ', $duplicate_headers)),422);
}
// Grab the first row to display via ajax as the user picks fields
$import->first_row = $reader->fetchOne(1);
try {
// Grab the first row to display via ajax as the user picks fields
$import->first_row = $reader->fetchOne(1);
} catch (JsonEncodingException $e) {
return response()->json(
Helper::formatStandardApiResponse(
'error',
null,
trans('admin/hardware/message.import.content_row_has_malformed_characters')
),
422
);
}
$date = date('Y-m-d-his');
$fixed_filename = str_slug($file->getClientOriginalName());
@@ -102,18 +126,25 @@ class ImportController extends Controller
}
$file_name = date('Y-m-d-his').'-'.$fixed_filename;
$import->file_path = $file_name;
$import->filesize = null;
if (!file_exists($path.'/'.$file_name)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_not_found')), 500);
}
$import->filesize = filesize($path.'/'.$file_name);
$import->save();
$results[] = $import;
}
$results = (new ImportsTransformer)->transformImports($results);
return [
return response()->json([
'files' => $results,
];
]);
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.feature_disabled')), 500);
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.feature_disabled')), 422);
}
/**
@@ -127,9 +158,9 @@ class ImportController extends Controller
$this->authorize('import');
// Run a backup immediately before processing
if ($request->has('run-backup')) {
if ($request->get('run-backup')) {
\Log::debug('Backup manually requested via importer');
Artisan::call('backup:run');
Artisan::call('snipeit:backup', ['--filename' => 'pre-import-backup-'.date('Y-m-d-H:i:s')]);
} else {
\Log::debug('NO BACKUP requested via importer');
}
@@ -162,6 +193,9 @@ class ImportController extends Controller
case 'user':
$redirectTo = 'users.index';
break;
case 'location':
$redirectTo = 'locations.index';
break;
}
if ($errors) { //Failure
@@ -39,8 +39,10 @@ class LicenseSeatsController extends Controller
}
$total = $seats->count();
$offset = (($seats) && (request('offset') > $total)) ? 0 : request('offset', 0);
$limit = request('limit', 50);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $seats->count()) ? $seats->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$seats = $seats->skip($offset)->take($limit)->get();
@@ -116,16 +118,20 @@ class LicenseSeatsController extends Controller
return response()->json(Helper::formatStandardApiResponse('success', $licenseSeat, trans('admin/licenses/message.update.success')));
}
// the logging functions expect only one "target". if both asset and user are present in the request,
// we simply let assets take precedence over users...
if ($licenseSeat->isDirty('assigned_to')) {
$target = $is_checkin ? $oldUser : User::find($licenseSeat->assigned_to);
}
if ($licenseSeat->isDirty('asset_id')) {
$target = $is_checkin ? $oldAsset : Asset::find($licenseSeat->asset_id);
}
if (is_null($target)){
return response()->json(Helper::formatStandardApiResponse('error', null, 'Target not found'));
}
if ($licenseSeat->save()) {
// the logging functions expect only one "target". if both asset and user are present in the request,
// we simply let assets take precedence over users...
$changes = $licenseSeat->getChanges();
if (array_key_exists('assigned_to', $changes)) {
$target = $is_checkin ? $oldUser : User::find($changes['assigned_to']);
}
if (array_key_exists('asset_id', $changes)) {
$target = $is_checkin ? $oldAsset : Asset::find($changes['asset_id']);
}
if ($is_checkin) {
$licenseSeat->logCheckin($target, $request->input('note'));
@@ -26,8 +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 = 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'));
@@ -73,9 +73,6 @@ class LicensesController extends Controller
$licenses->where('depreciation_id', '=', $request->input('depreciation_id'));
}
if ($request->filled('supplier_id')) {
$licenses->where('supplier_id', '=', $request->input('supplier_id'));
}
if (($request->filled('maintained')) && ($request->input('maintained')=='true')) {
$licenses->where('maintained','=',1);
@@ -97,12 +94,9 @@ class LicensesController extends Controller
$licenses->onlyTrashed();
}
// 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 = (($licenses) && ($request->get('offset') > $licenses->count())) ? $licenses->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $licenses->count()) ? $licenses->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
@@ -27,7 +27,7 @@ class LocationsController extends Controller
$allowed_columns = [
'id', 'name', 'address', 'address2', 'city', 'state', 'country', 'zip', 'created_at',
'updated_at', 'manager_id', 'image',
'assigned_assets_count', 'users_count', 'assets_count', 'currency', 'ldap_ou', ];
'assigned_assets_count', 'users_count', 'assets_count','assigned_assets_count', 'assets_count', 'rtd_assets_count', 'currency', 'ldap_ou', ];
$locations = Location::with('parent', 'manager', 'children')->select([
'locations.id',
@@ -47,20 +47,46 @@ class LocationsController extends Controller
'locations.currency',
])->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('rtd_assets as rtd_assets_count')
->withCount('users as users_count');
if ($request->filled('search')) {
$locations = $locations->TextSearch($request->input('search'));
}
$offset = (($locations) && (request('offset') > $locations->count())) ? $locations->count() : request('offset', 0);
if ($request->filled('name')) {
$locations->where('locations.name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('address')) {
$locations->where('locations.address', '=', $request->input('address'));
}
if ($request->filled('address2')) {
$locations->where('locations.address2', '=', $request->input('address2'));
}
if ($request->filled('city')) {
$locations->where('locations.city', '=', $request->input('city'));
}
if ($request->filled('zip')) {
$locations->where('locations.zip', '=', $request->input('zip'));
}
if ($request->filled('country')) {
$locations->where('locations.country', '=', $request->input('country'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $locations->count()) ? $locations->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
switch ($request->input('sort')) {
case 'parent':
$locations->OrderParent($order);
@@ -133,7 +159,9 @@ class LocationsController extends Controller
])
->withCount('assignedAssets as assigned_assets_count')
->withCount('assets as assets_count')
->withCount('users as users_count')->findOrFail($id);
->withCount('rtd_assets as rtd_assets_count')
->withCount('users as users_count')
->findOrFail($id);
return (new LocationsTransformer)->transformLocation($location);
}
@@ -23,10 +23,10 @@ class ManufacturersController extends Controller
public function index(Request $request)
{
$this->authorize('view', Manufacturer::class);
$allowed_columns = ['id', 'name', 'url', 'support_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'assets_count', 'consumables_count', 'components_count', 'licenses_count'];
$allowed_columns = ['id', 'name', 'url', 'support_url', 'support_email', 'warranty_lookup_url', 'support_phone', 'created_at', 'updated_at', 'image', 'assets_count', 'consumables_count', 'components_count', 'licenses_count'];
$manufacturers = Manufacturer::select(
['id', 'name', 'url', 'support_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'deleted_at']
['id', 'name', 'url', 'support_url', 'warranty_lookup_url', 'support_email', 'support_phone', 'created_at', 'updated_at', 'image', 'deleted_at']
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('consumables as consumables_count')->withCount('accessories as accessories_count');
if ($request->input('deleted') == 'true') {
@@ -37,12 +37,33 @@ class ManufacturersController extends Controller
$manufacturers = $manufacturers->TextSearch($request->input('search'));
}
// 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 = (($manufacturers) && ($request->get('offset') > $manufacturers->count())) ? $manufacturers->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$manufacturers->where('name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('url')) {
$manufacturers->where('url', '=', $request->input('url'));
}
if ($request->filled('support_url')) {
$manufacturers->where('support_url', '=', $request->input('support_url'));
}
if ($request->filled('warranty_lookup_url')) {
$manufacturers->where('warranty_lookup_url', '=', $request->input('warranty_lookup_url'));
}
if ($request->filled('support_phone')) {
$manufacturers->where('support_phone', '=', $request->input('support_phone'));
}
if ($request->filled('support_email')) {
$manufacturers->where('support_email', '=', $request->input('support_email'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $manufacturers->count()) ? $manufacturers->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -29,8 +29,10 @@ class PredefinedKitsController extends Controller
$kits = $kits->TextSearch($request->input('search'));
}
$offset = $request->input('offset', 0);
$limit = $request->input('limit', 50);
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $kits->count()) ? $kits->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'desc' ? 'desc' : 'asc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'name';
$kits->orderBy($sort, $order);
+114 -1
View File
@@ -5,10 +5,37 @@ namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\CheckoutRequest;
use Auth;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Laravel\Passport\TokenRepository;
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
use Illuminate\Support\Facades\Gate;
use DB;
class ProfileController extends Controller
{
/**
* The token repository implementation.
*
* @var \Laravel\Passport\TokenRepository
*/
protected $tokenRepository;
/**
* Create a controller instance.
*
* @param \Laravel\Passport\TokenRepository $tokenRepository
* @param \Illuminate\Contracts\Validation\Factory $validation
* @return void
*/
public function __construct(TokenRepository $tokenRepository, ValidationFactory $validation)
{
$this->validation = $validation;
$this->tokenRepository = $tokenRepository;
}
/**
* Display a listing of requested assets.
*
@@ -42,4 +69,90 @@ class ProfileController extends Controller
return $results;
}
/**
* Delete an API token
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*
* @return \Illuminate\Http\Response
*/
public function createApiToken(Request $request) {
if (!Gate::allows('self.api')) {
abort(403);
}
$accessTokenName = $request->input('name', 'Auth Token');
if ($accessToken = Auth::user()->createToken($accessTokenName)->accessToken) {
// Get the ID so we can return that with the payload
$token = DB::table('oauth_access_tokens')->where('user_id', '=', Auth::user()->id)->where('name','=',$accessTokenName)->orderBy('created_at', 'desc')->first();
$accessTokenData['id'] = $token->id;
$accessTokenData['token'] = $accessToken;
$accessTokenData['name'] = $accessTokenName;
return response()->json(Helper::formatStandardApiResponse('success', $accessTokenData, 'Personal access token '.$accessTokenName.' created successfully'));
}
return response()->json(Helper::formatStandardApiResponse('error', null, 'Token could not be created.'));
}
/**
* Delete an API token
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*
* @return \Illuminate\Http\Response
*/
public function deleteApiToken($tokenId) {
if (!Gate::allows('self.api')) {
abort(403);
}
$token = $this->tokenRepository->findForUser(
$tokenId, Auth::user()->getAuthIdentifier()
);
if (is_null($token)) {
return new Response('', 404);
}
$token->revoke();
return new Response('', Response::HTTP_NO_CONTENT);
}
/**
* Show user's API tokens
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.5]
*
* @return \Illuminate\Http\Response
*/
public function showApiTokens(Request $request) {
if (!Gate::allows('self.api')) {
abort(403);
}
$tokens = $this->tokenRepository->forUser(Auth::user()->getAuthIdentifier());
$token_values = $tokens->load('client')->filter(function ($token) {
return $token->client->personal_access_client && ! $token->revoked;
})->values();
return response()->json(Helper::formatStandardApiResponse('success', $token_values, null));
}
}
@@ -20,7 +20,7 @@ class ReportsController extends Controller
{
$this->authorize('reports.view');
$actionlogs = Actionlog::with('item', 'user', 'target', 'location');
$actionlogs = Actionlog::with('item', 'user', 'admin', 'target', 'location');
if ($request->filled('search')) {
$actionlogs = $actionlogs->TextSearch(e($request->input('search')));
@@ -54,11 +54,15 @@ class ReportsController extends Controller
'note',
];
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $actionlogs->count()) ? $actionlogs->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
$order = ($request->input('order') == 'asc') ? 'asc' : 'desc';
$offset = request('offset', 0);
$limit = request('limit', 50);
$total = $actionlogs->count();
$actionlogs = $actionlogs->orderBy($sort, $order)->skip($offset)->take($limit)->get();
return response()->json((new ActionlogsTransformer)->transformActionlogs($actionlogs, $total), 200, ['Content-Type' => 'application/json;charset=utf8'], JSON_UNESCAPED_UNICODE);
+51 -41
View File
@@ -2,6 +2,9 @@
namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Helpers\StorageHelper;
use App\Http\Transformers\DatatablesTransformer;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Ldap;
@@ -140,47 +143,6 @@ class SettingsController extends Controller
}
public function slacktest(SlackSettingsRequest $request)
{
$validator = Validator::make($request->all(), [
'slack_endpoint' => 'url|required_with:slack_channel|starts_with:https://hooks.slack.com/|nullable',
'slack_channel' => 'required_with:slack_endpoint|starts_with:#|nullable',
]);
if ($validator->fails()) {
return response()->json(['message' => 'Validation failed', 'errors' => $validator->errors()], 422);
}
// If validation passes, continue to the curl request
$slack = new Client([
'base_url' => e($request->input('slack_endpoint')),
'defaults' => [
'exceptions' => false,
],
]);
$payload = json_encode(
[
'channel' => e($request->input('slack_channel')),
'text' => trans('general.slack_test_msg'),
'username' => e($request->input('slack_botname')),
'icon_emoji' => ':heart:',
]);
try {
$slack->post($request->input('slack_endpoint'), ['body' => $payload]);
return response()->json(['message' => 'Success'], 200);
} catch (\Exception $e) {
return response()->json(['message' => 'Please check the channel name and webhook endpoint URL ('.e($request->input('slack_endpoint')).'). Slack responded with: '.$e->getMessage()], 400);
}
//}
return response()->json(['message' => 'Something went wrong :( '], 400);
}
/**
* Test the email configuration
*
@@ -265,4 +227,52 @@ class SettingsController extends Controller
return (new LoginAttemptsTransformer)->transformLoginAttempts($login_attempt_results, $total);
}
public function listBackups() {
$settings = Setting::getSettings();
$path = 'app/backups';
$backup_files = Storage::files($path);
$files_raw = [];
$count = 0;
if (count($backup_files) > 0) {
for ($f = 0; $f < count($backup_files); $f++) {
// Skip dotfiles like .gitignore and .DS_STORE
if ((substr(basename($backup_files[$f]), 0, 1) != '.')) {
$file_timestamp = Storage::lastModified($backup_files[$f]);
$files_raw[] = [
'filename' => basename($backup_files[$f]),
'filesize' => Setting::fileSizeConvert(Storage::size($backup_files[$f])),
'modified_value' => $file_timestamp,
'modified_display' => date($settings->date_display_format.' '.$settings->time_display_format, $file_timestamp),
];
$count++;
}
}
}
$files = array_reverse($files_raw);
return (new DatatablesTransformer)->transformDatatables($files, $count);
}
public function downloadBackup($file) {
$path = 'app/backups';
if (Storage::exists($path.'/'.$file)) {
$headers = ['ContentType' => 'application/zip'];
return Storage::download($path.'/'.$file, $file, $headers);
} else {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('general.file_not_found')));
}
}
}
@@ -5,10 +5,13 @@ namespace App\Http\Controllers\Api;
use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Http\Transformers\AssetsTransformer;
use App\Http\Transformers\SelectlistTransformer;
use App\Http\Transformers\StatuslabelsTransformer;
use App\Models\Asset;
use App\Models\Statuslabel;
use Illuminate\Http\Request;
use App\Http\Transformers\PieChartTransformer;
use Illuminate\Support\Arr;
class StatuslabelsController extends Controller
{
@@ -30,6 +33,10 @@ class StatuslabelsController extends Controller
$statuslabels = $statuslabels->TextSearch($request->input('search'));
}
if ($request->filled('name')) {
$statuslabels->where('name', '=', $request->input('name'));
}
// if a status_type is passed, filter by that
if ($request->filled('status_type')) {
@@ -44,12 +51,9 @@ class StatuslabelsController extends Controller
}
}
// 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);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $statuslabels->count()) ? $statuslabels->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
@@ -184,43 +188,55 @@ class StatuslabelsController extends Controller
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @return \Illuminate\Http\Response
* @return array
*/
public function getAssetCountByStatuslabel()
{
$this->authorize('view', Statuslabel::class);
$statuslabels = Statuslabel::withCount('assets')->get();
$labels = [];
$points = [];
$default_color_count = 0;
$colors_array = [];
$total = Array();
foreach ($statuslabels as $statuslabel) {
if ($statuslabel->assets_count > 0) {
$labels[] = $statuslabel->name.' ('.number_format($statuslabel->assets_count).')';
$points[] = $statuslabel->assets_count;
if ($statuslabel->color != '') {
$colors_array[] = $statuslabel->color;
} else {
$colors_array[] = Helper::defaultChartColors($default_color_count);
}
$default_color_count++;
$total[$statuslabel->name]['label'] = $statuslabel->name;
$total[$statuslabel->name]['count'] = $statuslabel->assets_count;
if ($statuslabel->color != '') {
$total[$statuslabel->name]['color'] = $statuslabel->color;
}
}
$result = [
'labels' => $labels,
'datasets' => [[
'data' => $points,
'backgroundColor' => $colors_array,
'hoverBackgroundColor' => $colors_array,
]],
];
return (new PieChartTransformer())->transformPieChartDate($total);
return $result;
}
/**
* Show a count of assets by meta status type for pie chart
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.0.11]
* @return array
*/
public function getAssetCountByMetaStatus()
{
$this->authorize('view', Statuslabel::class);
$total['rtd']['label'] = trans('general.ready_to_deploy');
$total['rtd']['count'] = Asset::RTD()->count();
$total['deployed']['label'] = trans('general.deployed');
$total['deployed']['count'] = Asset::Deployed()->count();
$total['archived']['label'] = trans('general.archived');
$total['archived']['count'] = Asset::Archived()->count();
$total['pending']['label'] = trans('general.pending');
$total['pending']['count'] = Asset::Pending()->count();
$total['undeployable']['label'] = trans('general.undeployable');
$total['undeployable']['count'] = Asset::Undeployable()->count();
return (new PieChartTransformer())->transformPieChartDate($total);
}
/**
@@ -276,4 +292,45 @@ class StatuslabelsController extends Controller
return '0';
}
/**
* Gets a paginated collection for the select2 menus
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v6.1.1]
* @see \App\Http\Transformers\SelectlistTransformer
*/
public function selectlist(Request $request)
{
$this->authorize('view.selectlists');
$statuslabels = Statuslabel::orderBy('default_label', 'desc')->orderBy('name', 'asc')->orderBy('deployable', 'desc');
if ($request->filled('search')) {
$statuslabels = $statuslabels->where('name', 'LIKE', '%'.$request->get('search').'%');
}
if ($request->filled('deployable')) {
$statuslabels = $statuslabels->where('deployable', '=', '1');
}
if ($request->filled('pending')) {
$statuslabels = $statuslabels->where('pending', '=', '1');
}
if ($request->filled('archived')) {
$statuslabels = $statuslabels->where('archived', '=', '1');
}
$statuslabels = $statuslabels->orderBy('name', 'ASC')->paginate(50);
// Loop through and set some custom properties for the transformer to use.
// This lets us have more flexibility in special cases like assets, where
// they may not have a ->name value but we want to display something anyway
foreach ($statuslabels as $statuslabel) {
$statuslabels->use_text = $statuslabel->name;
}
return (new SelectlistTransformer)->transformSelectlist($statuslabels);
}
}
@@ -23,23 +23,79 @@ class SuppliersController extends Controller
public function index(Request $request)
{
$this->authorize('view', Supplier::class);
$allowed_columns = ['id', 'name', 'address', 'phone', 'contact', 'fax', 'email', 'image', 'assets_count', 'licenses_count', 'accessories_count', 'url'];
$allowed_columns = ['
id',
'name',
'address',
'phone',
'contact',
'fax',
'email',
'image',
'assets_count',
'licenses_count',
'accessories_count',
'components_count',
'consumables_count',
'url',
];
$suppliers = Supplier::select(
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'updated_at', 'deleted_at', 'image', 'notes']
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('accessories as accessories_count');
['id', 'name', 'address', 'address2', 'city', 'state', 'country', 'fax', 'phone', 'email', 'contact', 'created_at', 'updated_at', 'deleted_at', 'image', 'notes'])
->withCount('assets as assets_count')
->withCount('licenses as licenses_count')
->withCount('accessories as accessories_count')
->withCount('components as components_count')
->withCount('consumables as consumables_count');
if ($request->filled('search')) {
$suppliers = $suppliers->TextSearch($request->input('search'));
}
// 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 = (($suppliers) && ($request->get('offset') > $suppliers->count())) ? $suppliers->count() : $request->get('offset', 0);
if ($request->filled('name')) {
$suppliers->where('name', '=', $request->input('name'));
}
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
if ($request->filled('address')) {
$suppliers->where('address', '=', $request->input('address'));
}
if ($request->filled('address2')) {
$suppliers->where('address2', '=', $request->input('address2'));
}
if ($request->filled('city')) {
$suppliers->where('city', '=', $request->input('city'));
}
if ($request->filled('zip')) {
$suppliers->where('zip', '=', $request->input('zip'));
}
if ($request->filled('country')) {
$suppliers->where('country', '=', $request->input('country'));
}
if ($request->filled('fax')) {
$suppliers->where('fax', '=', $request->input('fax'));
}
if ($request->filled('email')) {
$suppliers->where('email', '=', $request->input('email'));
}
if ($request->filled('url')) {
$suppliers->where('url', '=', $request->input('url'));
}
if ($request->filled('notes')) {
$suppliers->where('notes', '=', $request->input('notes'));
}
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $suppliers->count()) ? $suppliers->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
+126 -20
View File
@@ -15,10 +15,12 @@ use App\Models\Asset;
use App\Models\Company;
use App\Models\License;
use App\Models\User;
use App\Notifications\CurrentInventory;
use Auth;
use Illuminate\Http\Request;
use App\Http\Requests\ImageUploadRequest;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
class UsersController extends Controller
{
@@ -36,6 +38,7 @@ class UsersController extends Controller
$users = User::select([
'users.activated',
'users.created_by',
'users.address',
'users.avatar',
'users.city',
@@ -65,8 +68,12 @@ class UsersController extends Controller
'users.zip',
'users.remote',
'users.ldap_import',
'users.start_date',
'users.end_date',
'users.vip',
'users.autoassign_licenses',
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables')
])->with('manager', 'groups', 'userloc', 'company', 'department', 'assets', 'licenses', 'accessories', 'consumables', 'createdBy',)
->withCount('assets as assets_count', 'licenses as licenses_count', 'accessories as accessories_count', 'consumables as consumables_count');
$users = Company::scopeCompanyables($users);
@@ -89,6 +96,10 @@ class UsersController extends Controller
$users = $users->where('users.location_id', '=', $request->input('location_id'));
}
if ($request->filled('created_by')) {
$users = $users->where('users.created_by', '=', $request->input('created_by'));
}
if ($request->filled('email')) {
$users = $users->where('users.email', '=', $request->input('email'));
}
@@ -141,6 +152,26 @@ class UsersController extends Controller
$users = $users->where('remote', '=', $request->input('remote'));
}
if ($request->filled('vip')) {
$users = $users->where('vip', '=', $request->input('vip'));
}
if ($request->filled('two_factor_enrolled')) {
$users = $users->where('two_factor_enrolled', '=', $request->input('two_factor_enrolled'));
}
if ($request->filled('two_factor_optin')) {
$users = $users->where('two_factor_optin', '=', $request->input('two_factor_optin'));
}
if ($request->filled('start_date')) {
$users = $users->where('users.start_date', '=', $request->input('start_date'));
}
if ($request->filled('end_date')) {
$users = $users->where('users.end_date', '=', $request->input('end_date'));
}
if ($request->filled('assets_count')) {
$users->has('assets', '=', $request->input('assets_count'));
}
@@ -157,19 +188,19 @@ class UsersController extends Controller
$users->has('accessories', '=', $request->input('accessories_count'));
}
if ($request->filled('autoassign_licenses')) {
$users->where('autoassign_licenses', '=', $request->input('autoassign_licenses'));
}
if ($request->filled('search')) {
$users = $users->TextSearch($request->input('search'));
}
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
$offset = (($users) && (request('offset') > $users->count())) ? 0 : request('offset', 0);
// 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 = (($users) && ($request->get('offset') > $users->count())) ? $users->count() : $request->get('offset', 0);
// Check to make sure the limit is not higher than the max allowed
((config('app.max_results') >= $request->input('limit')) && ($request->filled('limit'))) ? $limit = $request->input('limit') : $limit = config('app.max_results');
// Make sure the offset and limit are actually integers and do not exceed system limits
$offset = ($request->input('offset') > $users->count()) ? $users->count() : abs($request->input('offset'));
$limit = app('api_limit_value');
switch ($request->input('sort')) {
@@ -182,17 +213,58 @@ class UsersController extends Controller
case 'department':
$users = $users->OrderDepartment($order);
break;
case 'created_by':
$users = $users->OrderByCreatedBy($order);
break;
case 'company':
$users = $users->OrderCompany($order);
break;
case 'first_name':
$users->orderBy('first_name', $order);
$users->orderBy('last_name', $order);
break;
case 'last_name':
$users->orderBy('last_name', $order);
$users->orderBy('first_name', $order);
break;
default:
$allowed_columns =
[
'last_name', 'first_name', 'email', 'jobtitle', 'username', 'employee_num',
'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', 'remote',
'last_name',
'first_name',
'email',
'jobtitle',
'username',
'employee_num',
'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',
'two_factor_optin',
'two_factor_enrolled',
'remote',
'vip',
'start_date',
'end_date',
'autoassign_licenses',
];
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';
@@ -231,9 +303,11 @@ class UsersController extends Controller
$users = Company::scopeCompanyables($users);
if ($request->filled('search')) {
$users = $users->SimpleNameSearch($request->get('search'))
->orWhere('username', 'LIKE', '%'.$request->get('search').'%')
->orWhere('employee_num', 'LIKE', '%'.$request->get('search').'%');
$users = $users->where(function ($query) use ($request) {
$query->SimpleNameSearch($request->get('search'))
->orWhere('username', 'LIKE', '%'.$request->get('search').'%')
->orWhere('employee_num', 'LIKE', '%'.$request->get('search').'%');
});
}
$users = $users->orderBy('last_name', 'asc')->orderBy('first_name', 'asc');
@@ -288,7 +362,7 @@ class UsersController extends Controller
$user->permissions = $permissions_array;
}
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 20);
$tmp_pass = substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 40);
$user->password = bcrypt($request->get('password', $tmp_pass));
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');
@@ -394,6 +468,13 @@ class UsersController extends Controller
// Check if the request has groups passed and has a value
if ($request->filled('groups')) {
$validator = Validator::make($request->all(), [
'groups.*' => 'integer|exists:permission_groups,id',
]);
if ($validator->fails()){
return response()->json(Helper::formatStandardApiResponse('error', null, $user->getErrors()));
}
$user->groups()->sync($request->input('groups'));
// The groups field has been passed but it is null, so we should blank it out
} elseif ($request->has('groups')) {
@@ -471,6 +552,27 @@ class UsersController extends Controller
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
}
/**
* Notify a specific user via email with all of their assigned assets.
*
* @author [Lukas Fehling] [<lukas.fehling@adabay.rocks>]
* @since [v6.0.13]
* @param Request $request
* @param $id
* @return string JSON
*/
public function emailAssetList(Request $request, $id)
{
$user = User::findOrFail($id);
if (empty($user->email)) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.inventorynotification.error')));
}
$user->notify((new CurrentInventory($user)));
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success')));
}
/**
* Return JSON containing a list of consumables assigned to a user.
@@ -519,10 +621,14 @@ class UsersController extends Controller
{
$this->authorize('view', User::class);
$this->authorize('view', License::class);
$user = User::where('id', $id)->withTrashed()->first();
$licenses = $user->licenses()->get();
if ($user = User::where('id', $id)->withTrashed()->first()) {
$licenses = $user->licenses()->get();
return (new LicensesTransformer())->transformLicenses($licenses, $licenses->count());
}
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/users/message.user_not_found', compact('id'))));
return (new LicensesTransformer())->transformLicenses($licenses, $licenses->count());
}
/**
@@ -101,7 +101,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance = new AssetMaintenance();
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find($request->input('asset_id'));
@@ -211,7 +211,7 @@ class AssetMaintenancesController extends Controller
$assetMaintenance->supplier_id = $request->input('supplier_id');
$assetMaintenance->is_warranty = $request->input('is_warranty');
$assetMaintenance->cost = Helper::ParseCurrency($request->input('cost'));
$assetMaintenance->cost = $request->input('cost');
$assetMaintenance->notes = $request->input('notes');
$asset = Asset::find(request('asset_id'));
+39 -7
View File
@@ -8,6 +8,7 @@ use App\Models\AssetModel;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Validator;
use Redirect;
use Request;
use Storage;
@@ -81,8 +82,8 @@ class AssetModelsController extends Controller
$model->user_id = Auth::id();
$model->requestable = Request::has('requestable');
if ($request->input('custom_fieldset') != '') {
$model->fieldset_id = e($request->input('custom_fieldset'));
if ($request->input('fieldset_id') != '') {
$model->fieldset_id = e($request->input('fieldset_id'));
}
$model = $request->handleImages($model);
@@ -90,7 +91,9 @@ class AssetModelsController extends Controller
// Was it created?
if ($model->save()) {
if ($this->shouldAddDefaultValues($request->input())) {
$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'));
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
}
}
// Redirect to the new model page
@@ -157,13 +160,15 @@ class AssetModelsController extends Controller
$this->removeCustomFieldsDefaultValues($model);
if ($request->input('custom_fieldset') == '') {
if ($request->input('fieldset_id') == '') {
$model->fieldset_id = null;
} else {
$model->fieldset_id = $request->input('custom_fieldset');
$model->fieldset_id = $request->input('fieldset_id');
if ($this->shouldAddDefaultValues($request->input())) {
$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'));
if (!$this->assignCustomFieldsDefaultValues($model, $request->input('default_values'))){
return redirect()->back()->withInput()->with('error', trans('admin/custom_fields/message.fieldset_default_value.error'));
}
}
}
@@ -439,7 +444,7 @@ class AssetModelsController extends Controller
{
return ! empty($input['add_default_values'])
&& ! empty($input['default_values'])
&& ! empty($input['custom_fieldset']);
&& ! empty($input['fieldset_id']);
}
/**
@@ -451,6 +456,32 @@ class AssetModelsController extends Controller
*/
private function assignCustomFieldsDefaultValues(AssetModel $model, array $defaultValues)
{
$data = array();
foreach ($defaultValues as $customFieldId => $defaultValue) {
$customField = \App\Models\CustomField::find($customFieldId);
$data[$customField->db_column] = $defaultValue;
}
$fieldsets = $model->fieldset->validation_rules();
$rules = array();
foreach ($fieldsets as $fieldset => $validation){
// If the field is marked as required, eliminate the rule so it doesn't interfere with the default values
// (we are at model level, the rule still applies when creating a new asset using this model)
$index = array_search('required', $validation);
if ($index !== false){
$validation[$index] = 'nullable';
}
$rules[$fieldset] = $validation;
}
$validator = Validator::make($data, $rules);
if($validator->fails()){
return false;
}
foreach ($defaultValues as $customFieldId => $defaultValue) {
if(is_array($defaultValue)){
$model->defaultValues()->attach($customFieldId, ['default_value' => implode(', ', $defaultValue)]);
@@ -458,6 +489,7 @@ class AssetModelsController extends Controller
$model->defaultValues()->attach($customFieldId, ['default_value' => $defaultValue]);
}
}
return true;
}
/**
@@ -0,0 +1,155 @@
<?php
namespace App\Http\Controllers;
use App\Helpers\StorageHelper;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
use App\Models\AssetModel;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use enshrined\svgSanitize\Sanitizer;
class AssetModelsFilesController extends Controller
{
/**
* Upload a file to the server.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param AssetFileRequest $request
* @param int $modelId
* @return Redirect
* @since [v1.0]
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(AssetFileRequest $request, $modelId = null)
{
if (! $model = AssetModel::find($modelId)) {
return redirect()->route('models.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
$this->authorize('update', $model);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/assetmodels')) {
Storage::makeDirectory('private_uploads/assetmodels', 775);
}
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'model-'.$model->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension=='svg') {
\Log::debug('This is an SVG');
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/assetmodels/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/assetmodels/'.$file_name, file_get_contents($file));
}
$model->logUpload($file_name, e($request->get('notes')));
}
return redirect()->back()->with('success', trans('general.file_upload_success'));
}
return redirect()->back()->with('error', trans('admin/hardware/message.upload.nofiles'));
}
/**
* Check for permissions and display the file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
* @return View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($modelId = null, $fileId = null, $download = true)
{
$model = AssetModel::find($modelId);
// the asset is valid
if (isset($model->id)) {
$this->authorize('view', $model);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that model/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/assetmodels/'.$log->filename;
\Log::debug('Checking for '.$file);
if (! Storage::exists($file)) {
return response('File '.$file.' not found on server', 404)
->header('Content-Type', 'text/plain');
}
if ($download != 'true') {
if ($contents = file_get_contents(Storage::url($file))) {
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
// Prepare the error message
$error = trans('admin/hardware/message.does_not_exist', ['id' => $fileId]);
// Redirect to the hardware management page
return redirect()->route('hardware.index')->with('error', $error);
}
/**
* Delete the associated file
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $modelId
* @param int $fileId
* @since [v1.0]
* @return View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($modelId = null, $fileId = null)
{
$model = AssetModel::find($modelId);
$this->authorize('update', $model);
$rel_path = 'private_uploads/assetmodels';
// the asset is valid
if (isset($model->id)) {
$this->authorize('update', $model);
$log = Actionlog::find($fileId);
if ($log) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
}
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the hardware management page
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
}
@@ -27,7 +27,7 @@ class AssetCheckoutController extends Controller
public function create($assetId)
{
// Check if the asset exists
if (is_null($asset = Asset::find(e($assetId)))) {
if (is_null($asset = Asset::with('company')->find(e($assetId)))) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
}
@@ -12,14 +12,16 @@ use App\Models\CheckoutRequest;
use App\Models\Company;
use App\Models\Location;
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\User;
use Auth;
use Carbon\Carbon;
use DB;
use Gate;
use Illuminate\Support\Facades\Gate;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Cookie;
use Input;
use Intervention\Image\Facades\Image;
use League\Csv\Reader;
@@ -139,12 +141,14 @@ class AssetsController extends Controller
$asset->depreciate = '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_cost = request('purchase_cost');
$asset->purchase_date = request('purchase_date', null);
$asset->asset_eol_date = request('asset_eol_date', $asset->present()->eol_date());
$asset->assigned_to = request('assigned_to', null);
$asset->supplier_id = request('supplier_id', null);
$asset->requestable = request('requestable', 0);
$asset->rtd_location_id = request('rtd_location_id', null);
$asset->byod = request('byod', 0);
if (! empty($settings->audit_interval)) {
$asset->next_audit_date = Carbon::now()->addMonths($settings->audit_interval)->toDateString();
@@ -167,17 +171,17 @@ class AssetsController extends Controller
foreach ($model->fieldset->fields as $field) {
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = \Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
}
}
} else {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = implode(', ', $request->input($field->convertUnicodeDbSlug()));
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug());
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
@@ -201,18 +205,30 @@ class AssetsController extends Controller
}
$success = true;
}
}
if ($success) {
// Redirect to the asset listing page
$minutes = 518400;
// dd( $_POST['options']);
// Cookie::queue(Cookie::make('optional_info', json_decode($_POST['options']), $minutes));
return redirect()->route('hardware.index')
->with('success', trans('admin/hardware/message.create.success'));
}
return redirect()->back()->withInput()->withErrors($asset->getErrors());
}
public function getOptionCookie(Request $request){
$value = $request->cookie('optional_info');
echo $value;
return $value;
}
/**
* Returns a view that presents a form to edit an existing asset.
*
@@ -297,7 +313,9 @@ class AssetsController extends Controller
$asset->status_id = $request->input('status_id', null);
$asset->warranty_months = $request->input('warranty_months', null);
$asset->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$asset->purchase_cost = $request->input('purchase_cost', null);
$asset->asset_eol_date = request('asset_eol_date', null);
$asset->purchase_date = $request->input('purchase_date', null);
$asset->supplier_id = $request->input('supplier_id', null);
$asset->expected_checkin = $request->input('expected_checkin', null);
@@ -305,6 +323,13 @@ class AssetsController extends Controller
// If the box isn't checked, it's not in the request at all.
$asset->requestable = $request->filled('requestable');
$asset->rtd_location_id = $request->input('rtd_location_id', null);
$asset->byod = $request->input('byod', 0);
$status = Statuslabel::find($asset->status_id);
if($status->archived){
$asset->assigned_to = null;
}
if ($asset->assigned_to == '') {
$asset->location_id = $request->input('rtd_location_id', null);
@@ -343,17 +368,17 @@ class AssetsController extends Controller
foreach ($model->fieldset->fields as $field) {
if ($field->field_encrypted == '1') {
if (Gate::allows('admin')) {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt(implode(', ', $request->input($field->convertUnicodeDbSlug())));
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = \Crypt::encrypt(implode(', ', $request->input($field->db_column)));
} else {
$asset->{$field->convertUnicodeDbSlug()} = \Crypt::encrypt($request->input($field->convertUnicodeDbSlug()));
$asset->{$field->db_column} = \Crypt::encrypt($request->input($field->db_column));
}
}
} else {
if (is_array($request->input($field->convertUnicodeDbSlug()))) {
$asset->{$field->convertUnicodeDbSlug()} = implode(', ', $request->input($field->convertUnicodeDbSlug()));
if (is_array($request->input($field->db_column))) {
$asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
} else {
$asset->{$field->convertUnicodeDbSlug()} = $request->input($field->convertUnicodeDbSlug());
$asset->{$field->db_column} = $request->input($field->db_column);
}
}
}
@@ -609,7 +634,11 @@ class AssetsController extends Controller
$csv->setHeaderOffset(0);
$header = $csv->getHeader();
$isCheckinHeaderExplicit = in_array('checkin date', (array_map('strtolower', $header)));
$results = $csv->getRecords();
try {
$results = $csv->getRecords();
} catch (\Exception $e) {
return back()->with('error', trans('general.error_in_import_file', ['error' => $e->getMessage()]));
}
$item = [];
$status = [];
$status['error'] = [];
@@ -12,6 +12,7 @@ use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
use App\Http\Requests\AssetCheckoutRequest;
class BulkAssetsController extends Controller
{
@@ -28,39 +29,48 @@ class BulkAssetsController extends Controller
*/
public function edit(Request $request)
{
$this->authorize('update', Asset::class);
$this->authorize('view', Asset::class);
if (! $request->filled('ids')) {
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')));
if ($request->filled('bulk_actions')) {
switch ($request->input('bulk_actions')) {
case 'labels':
$this->authorize('view', Asset::class);
return view('hardware/labels')
->with('assets', Asset::find($asset_ids))
->with('settings', Setting::getSettings())
->with('bulkedit', true)
->with('count', 0);
case 'delete':
$this->authorize('delete', Asset::class);
$assets = Asset::with('assignedTo', 'location')->find($asset_ids);
$assets->each(function ($asset) {
$this->authorize('delete', $asset);
});
return view('hardware/bulk-delete')->with('assets', $assets);
case 'restore':
$this->authorize('update', Asset::class);
$assets = Asset::withTrashed()->find($asset_ids);
$assets->each(function ($asset) {
$this->authorize('delete', $asset);
});
return view('hardware/bulk-restore')->with('assets', $assets);
case 'edit':
$this->authorize('update', Asset::class);
return view('hardware/bulk')
->with('assets', $asset_ids)
->with('statuslabel_list', Helper::statusLabelList());
@@ -106,6 +116,11 @@ class BulkAssetsController extends Controller
|| ($request->filled('company_id'))
|| ($request->filled('status_id'))
|| ($request->filled('model_id'))
|| ($request->filled('next_audit_date'))
|| ($request->filled('null_purchase_date'))
|| ($request->filled('null_expected_checkin_date'))
|| ($request->filled('null_next_audit_date'))
) {
foreach ($assets as $assetId) {
@@ -118,10 +133,23 @@ class BulkAssetsController extends Controller
->conditionallyAddItem('requestable')
->conditionallyAddItem('status_id')
->conditionallyAddItem('supplier_id')
->conditionallyAddItem('warranty_months');
->conditionallyAddItem('warranty_months')
->conditionallyAddItem('next_audit_date');
if ($request->input('null_purchase_date')=='1') {
$this->update_array['purchase_date'] = null;
}
if ($request->input('null_expected_checkin_date')=='1') {
$this->update_array['expected_checkin'] = null;
}
if ($request->input('null_next_audit_date')=='1') {
$this->update_array['next_audit_date'] = null;
}
if ($request->filled('purchase_cost')) {
$this->update_array['purchase_cost'] = Helper::ParseCurrency($request->input('purchase_cost'));
$this->update_array['purchase_cost'] = $request->input('purchase_cost');
}
if ($request->filled('company_id')) {
@@ -243,7 +271,7 @@ class BulkAssetsController extends Controller
* Process Multiple Checkout Request
* @return View
*/
public function storeCheckout(Request $request)
public function storeCheckout(AssetCheckoutRequest $request)
{
$this->authorize('checkout', Asset::class);
@@ -254,7 +282,7 @@ class BulkAssetsController extends Controller
$target = $this->determineCheckoutTarget();
if (! is_array($request->get('selected_assets'))) {
return redirect()->route('hardware/bulkcheckout')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
return redirect()->route('hardware.bulkcheckout.show')->withInput()->with('error', trans('admin/hardware/message.checkout.no_assets_selected'));
}
$asset_ids = array_filter($request->get('selected_assets'));
@@ -282,7 +310,8 @@ class BulkAssetsController extends Controller
foreach ($asset_ids as $asset_id) {
$asset = Asset::findOrFail($asset_id);
$this->authorize('checkout', $asset);
$error = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), null);
$error = $asset->checkOut($target, $admin, $checkout_at, $expected_checkin, e($request->get('note')), $asset->name, null);
if ($target->location_id != '') {
$asset->location_id = $target->location_id;
@@ -301,9 +330,23 @@ class BulkAssetsController extends Controller
return redirect()->to('hardware')->with('success', trans('admin/hardware/message.checkout.success'));
}
// Redirect to the asset management page with error
return redirect()->to('hardware/bulk-checkout')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
return redirect()->route('hardware.bulkcheckout.show')->with('error', trans('admin/hardware/message.checkout.error'))->withErrors($errors);
} catch (ModelNotFoundException $e) {
return redirect()->to('hardware/bulk-checkout')->with('error', $e->getErrors());
return redirect()->route('hardware.bulkcheckout.show')->with('error', $e->getErrors());
}
}
public function restore(Request $request) {
$this->authorize('update', Asset::class);
$assetIds = $request->get('ids');
if (empty($assetIds)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));
} else {
foreach ($assetIds as $key => $assetId) {
$asset = Asset::withTrashed()->find($assetId);
$asset->restore();
}
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success'));
}
}
}
@@ -116,7 +116,7 @@ class LoginController extends Controller
Auth::login($user);
} else {
$username = $saml->getUsername();
\Log::warning("SAML user '$username' could not be found in database.");
\Log::debug("SAML user '$username' could not be found in database.");
$request->session()->flash('error', trans('auth/message.signin.error'));
$saml->clearData();
}
@@ -127,7 +127,7 @@ class LoginController extends Controller
}
} catch (\Exception $e) {
\Log::warning('There was an error authenticating the SAML user: '.$e->getMessage());
\Log::debug('There was an error authenticating the SAML user: '.$e->getMessage());
throw new \Exception($e->getMessage());
}
@@ -135,14 +135,11 @@ class LoginController extends Controller
} 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.");
if (empty($samlData)) {
\Log::debug("SAML page requested, but samlData seems empty.");
}
}
\Log::warning("Something else went wrong while trying to login as SAML user");
}
@@ -474,6 +471,11 @@ class LoginController extends Controller
}
$request->session()->regenerate(true);
if ($request->session()->has('password_hash_'.Auth::getDefaultDriver())){
$request->session()->remove('password_hash_'.Auth::getDefaultDriver());
}
Auth::logout();
if (! empty($sloRedirectUrl)) {
@@ -3,13 +3,11 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\SaveUserRequest;
use App\Models\Setting;
use App\Models\User;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Validator;
class ResetPasswordController extends Controller
{
@@ -43,6 +41,7 @@ class ResetPasswordController extends Controller
public function __construct()
{
$this->middleware('guest');
$this->middleware('throttle:10,1');
}
protected function rules()
@@ -63,6 +62,14 @@ class ResetPasswordController extends Controller
public function showResetForm(Request $request, $token = null)
{
$credentials = $request->only('email', 'token');
if (is_null($this->broker()->getUser($credentials))) {
\Log::debug('Password reset form FAILED - this token is not valid.');
return redirect()->route('password.request')->with('error', trans('passwords.token'));
}
return view('auth.passwords.reset')->with(
[
'token' => $token,
@@ -73,38 +80,53 @@ class ResetPasswordController extends Controller
public function reset(Request $request)
{
$broker = $this->broker();
$messages = [
'password.not_in' => trans('validation.disallow_same_pwd_as_user_fields'),
];
$request->validate($this->rules(), $request->all(), $this->validationErrorMessages());
// Check to see if the user even exists
$user = User::where('username', '=', $request->input('username'))->first();
\Log::debug('Checking if '.$request->input('username').' exists');
// Check to see if the user even exists - we'll treat the response the same to prevent user sniffing
if ($user = User::where('username', '=', $request->input('username'))->where('activated', '1')->whereNotNull('email')->first()) {
\Log::debug($user->username.' exists');
// handle the password validation rules set by the admin settings
if (strpos(Setting::passwordComplexityRulesSaving('store'), 'disallow_same_pwd_as_user_fields') !== false) {
$request->validate(
[
'password' => 'required|notIn:["'.$user->email.'","'.$user->username.'","'.$user->first_name.'","'.$user->last_name.'"',
], $messages);
}
// set the response
$response = $broker->reset(
$this->credentials($request), function ($user, $password) {
$this->resetPassword($user, $password);
});
// Check if the password reset above actually worked
if ($response == \Password::PASSWORD_RESET) {
\Log::debug('Password reset for '.$user->username.' worked');
return redirect()->guest('login')->with('success', trans('passwords.reset'));
}
\Log::debug('Password reset for '.$user->username.' FAILED - this user exists but the token is not valid');
return redirect()->back()->withInput($request->only('email'))->with('success', trans('passwords.reset'));
$broker = $this->broker();
if (strpos(Setting::passwordComplexityRulesSaving('store'), 'disallow_same_pwd_as_user_fields') !== false) {
$request->validate(
[
'password' => 'required|notIn:["'.$user->email.'","'.$user->username.'","'.$user->first_name.'","'.$user->last_name.'"',
], $messages);
}
$response = $broker->reset(
$this->credentials($request), function ($user, $password) {
$this->resetPassword($user, $password);
}
);
return $response == \Password::PASSWORD_RESET
? $this->sendResetResponse($request, $response)
: $this->sendResetFailedResponse($request, $response);
\Log::debug('Password reset for '.$request->input('username').' FAILED - user does not exist or does not have an email address - but make it look like it succeeded');
return redirect()->guest('login')->with('success', trans('passwords.reset'));
}
protected function sendResetFailedResponse(Request $request, $response)
{
return redirect()->back()
->withInput(['username'=> $request->input('username')])
->withErrors(['username' => trans($response), 'password' => trans($response)]);
}
}
+1 -1
View File
@@ -142,6 +142,6 @@ class SamlController extends Controller
return view('errors.403');
}
return redirect()->route('logout')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
return redirect()->route('logout.get')->with(['saml_logout' => true,'saml_slo_redirect_url' => $sloUrl]);
}
}
@@ -92,7 +92,7 @@ class BulkAssetModelsController extends Controller
AssetModel::whereIn('id', $models_raw_array)->update($update_array);
return redirect()->route('models.index')
->with('success', trans('admin/models/message.bulkedit.success'));
->with('success', trans_choice('admin/models/message.bulkedit.success', count($models_raw_array), ['model_count' => count($models_raw_array)]));
}
return redirect()->route('models.index')
@@ -33,6 +33,11 @@ class ComponentCheckoutController extends Controller
}
$this->authorize('checkout', $component);
// Make sure there is at least one available to checkout
if ($component->numRemaining() <= 0){
return redirect()->route('components.index')->with('error', trans('admin/components/message.checkout.unavailable'));
}
return view('components/checkout', compact('component'));
}
@@ -50,7 +55,7 @@ class ComponentCheckoutController extends Controller
public function store(Request $request, $componentId)
{
// Check if the component exists
if (is_null($component = Component::find($componentId))) {
if (!$component = Component::find($componentId)) {
// Redirect to the component management page with error
return redirect()->route('components.index')->with('error', trans('admin/components/message.not_found'));
}
@@ -58,9 +63,15 @@ class ComponentCheckoutController extends Controller
$this->authorize('checkout', $component);
$max_to_checkout = $component->numRemaining();
// Make sure there are at least the requested number of components available to checkout
if ($max_to_checkout < $request->get('assigned_qty')) {
return redirect()->back()->withInput()->with('error', trans('admin/components/message.checkout.unavailable', ['remaining' => $max_to_checkout, 'requested' => $request->get('assigned_qty')]));
}
$validator = Validator::make($request->all(), [
'asset_id' => 'required',
'assigned_qty' => "required|numeric|between:1,$max_to_checkout",
'asset_id' => 'required|exists:assets,id',
'assigned_qty' => "required|numeric|min:1|digits_between:1,$max_to_checkout",
]);
if ($validator->fails()) {
@@ -69,24 +80,18 @@ class ComponentCheckoutController extends Controller
->withInput();
}
$admin_user = Auth::user();
$asset_id = e($request->input('asset_id'));
// Check if the user exists
if (is_null($asset = Asset::find($asset_id))) {
// Redirect to the component management page with error
return redirect()->route('components.index')->with('error', trans('admin/components/message.asset_does_not_exist'));
}
$asset = Asset::find($request->input('asset_id'));
// Update the component data
$component->asset_id = $asset_id;
$component->asset_id = $request->input('asset_id');
$component->assets()->attach($component->id, [
'component_id' => $component->id,
'user_id' => $admin_user->id,
'user_id' => Auth::user(),
'created_at' => date('Y-m-d H:i:s'),
'assigned_qty' => $request->input('assigned_qty'),
'asset_id' => $asset_id,
'asset_id' => $request->input('asset_id'),
'note' => $request->input('note'),
]);
event(new CheckoutableCheckedOut($component, $asset, Auth::user(), $request->input('note')));
@@ -71,13 +71,14 @@ class ComponentsController extends Controller
$component = new Component();
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number', null);
$component->min_amt = $request->input('min_amt', null);
$component->serial = $request->input('serial', null);
$component->purchase_date = $request->input('purchase_date', null);
$component->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost', null));
$component->purchase_cost = $request->input('purchase_cost', null);
$component->qty = $request->input('qty');
$component->user_id = Auth::id();
$component->notes = $request->input('notes');
@@ -129,7 +130,7 @@ class ComponentsController extends Controller
if (is_null($component = Component::find($componentId))) {
return redirect()->route('components.index')->with('error', trans('admin/components/message.does_not_exist'));
}
$min = $component->numCHeckedOut();
$min = $component->numCheckedOut();
$validator = Validator::make($request->all(), [
'qty' => "required|numeric|min:$min",
]);
@@ -145,13 +146,14 @@ class ComponentsController extends Controller
// Update the component data
$component->name = $request->input('name');
$component->category_id = $request->input('category_id');
$component->supplier_id = $request->input('supplier_id');
$component->location_id = $request->input('location_id');
$component->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$component->order_number = $request->input('order_number');
$component->min_amt = $request->input('min_amt');
$component->serial = $request->input('serial');
$component->purchase_date = $request->input('purchase_date');
$component->purchase_cost = Helper::ParseCurrency(request('purchase_cost'));
$component->purchase_cost = request('purchase_cost');
$component->qty = $request->input('qty');
$component->notes = $request->input('notes');
@@ -0,0 +1,180 @@
<?php
namespace App\Http\Controllers\Components;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
use App\Models\Component;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\JsonResponse;
use enshrined\svgSanitize\Sanitizer;
class ComponentsFilesController extends Controller
{
/**
* Validates and stores files associated with a component.
*
* @todo Switch to using the AssetFileRequest form request validator.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param AssetFileRequest $request
* @param int $componentId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(AssetFileRequest $request, $componentId = null)
{
if (config('app.lock_passwords')) {
return redirect()->route('components.show', ['component'=>$componentId])->with('error', trans('general.feature_disabled'));
}
$component = Component::find($componentId);
if (isset($component->id)) {
$this->authorize('update', $component);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/components')) {
Storage::makeDirectory('private_uploads/components', 775);
}
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'component-'.$component->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension == 'svg') {
\Log::debug('This is an SVG');
\Log::debug($file_name);
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/components/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/components/'.$file_name, file_get_contents($file));
}
//Log the upload to the log
$component->logUpload($file_name, e($request->input('notes')));
}
return redirect()->route('components.show', $component->id)->with('success', trans('general.file_upload_success'));
}
return redirect()->route('components.show', $component->id)->with('error', trans('general.no_files_uploaded'));
}
// Prepare the error message
return redirect()->route('components.index')
->with('error', trans('general.file_does_not_exist'));
}
/**
* Deletes the selected component file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param int $componentId
* @param int $fileId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($componentId = null, $fileId = null)
{
$component = Component::find($componentId);
// the asset is valid
if (isset($component->id)) {
$this->authorize('update', $component);
$log = Actionlog::find($fileId);
// Remove the file if one exists
if (Storage::exists('components/'.$log->filename)) {
try {
Storage::delete('components/'.$log->filename);
} catch (\Exception $e) {
\Log::debug($e);
}
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the licence management page
return redirect()->route('components.index')->with('error', trans('general.file_does_not_exist'));
}
/**
* Allows the selected file to be viewed.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.4]
* @param int $componentId
* @param int $fileId
* @return \Symfony\Component\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($componentId = null, $fileId = null, $download = true)
{
\Log::debug('Private filesystem is: '.config('filesystems.default'));
$component = Component::find($componentId);
// the component is valid
if (isset($component->id)) {
$this->authorize('view', $component);
$this->authorize('components.files', $component);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/components/'.$log->filename;
if (Storage::missing($file)) {
\Log::debug('FILE DOES NOT EXISTS for '.$file);
\Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}
return redirect()->route('components.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));
}
}
@@ -24,9 +24,16 @@ class ConsumableCheckoutController extends Controller
*/
public function create($consumableId)
{
if (is_null($consumable = Consumable::find($consumableId))) {
if (is_null($consumable = Consumable::with('users')->find($consumableId))) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
}
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0){
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.checkout.unavailable'));
}
$this->authorize('checkout', $consumable);
return view('consumables/checkout', compact('consumable'));
@@ -44,19 +51,25 @@ class ConsumableCheckoutController extends Controller
*/
public function store(Request $request, $consumableId)
{
if (is_null($consumable = Consumable::find($consumableId))) {
if (is_null($consumable = Consumable::with('users')->find($consumableId))) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.not_found'));
}
$this->authorize('checkout', $consumable);
// Make sure there is at least one available to checkout
if ($consumable->numRemaining() <= 0) {
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.checkout.unavailable'));
}
$admin_user = Auth::user();
$assigned_to = e($request->input('assigned_to'));
// Check if the user exists
if (is_null($user = User::find($assigned_to))) {
// Redirect to the consumable management page with error
return redirect()->route('checkout/consumable', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist'));
return redirect()->route('consumables.checkout.show', $consumable)->with('error', trans('admin/consumables/message.checkout.user_does_not_exist'))->withInput();
}
// Update the consumable data
@@ -66,6 +79,7 @@ class ConsumableCheckoutController extends Controller
'consumable_id' => $consumable->id,
'user_id' => $admin_user->id,
'assigned_to' => e($request->input('assigned_to')),
'note' => $request->input('note'),
]);
event(new CheckoutableCheckedOut($consumable, $user, Auth::user(), $request->input('note')));
@@ -9,6 +9,7 @@ use App\Models\Company;
use App\Models\Consumable;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;
/**
* This controller handles all actions related to Consumables for
@@ -67,6 +68,7 @@ class ConsumablesController extends Controller
$consumable = new Consumable();
$consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number');
@@ -75,7 +77,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->purchase_cost = $request->input('purchase_cost');
$consumable->qty = $request->input('qty');
$consumable->user_id = Auth::id();
$consumable->notes = $request->input('notes');
@@ -128,10 +130,22 @@ class ConsumablesController extends Controller
return redirect()->route('consumables.index')->with('error', trans('admin/consumables/message.does_not_exist'));
}
$min = $consumable->numCheckedOut();
$validator = Validator::make($request->all(), [
"qty" => "required|numeric|min:$min"
]);
if ($validator->fails()) {
return redirect()->back()
->withErrors($validator)
->withInput();
}
$this->authorize($consumable);
$consumable->name = $request->input('name');
$consumable->category_id = $request->input('category_id');
$consumable->supplier_id = $request->input('supplier_id');
$consumable->location_id = $request->input('location_id');
$consumable->company_id = Company::getIdForCurrentUser($request->input('company_id'));
$consumable->order_number = $request->input('order_number');
@@ -140,7 +154,7 @@ class ConsumablesController extends Controller
$consumable->model_number = $request->input('model_number');
$consumable->item_no = $request->input('item_no');
$consumable->purchase_date = $request->input('purchase_date');
$consumable->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$consumable->purchase_cost = $request->input('purchase_cost');
$consumable->qty = Helper::ParseFloat($request->input('qty'));
$consumable->notes = $request->input('notes');
@@ -0,0 +1,180 @@
<?php
namespace App\Http\Controllers\Consumables;
use App\Helpers\StorageHelper;
use App\Http\Controllers\Controller;
use App\Http\Requests\AssetFileRequest;
use App\Models\Actionlog;
use App\Models\Consumable;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Storage;
use Symfony\Consumable\HttpFoundation\JsonResponse;
use enshrined\svgSanitize\Sanitizer;
class ConsumablesFilesController extends Controller
{
/**
* Validates and stores files associated with a consumable.
*
* @todo Switch to using the AssetFileRequest form request validator.
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param AssetFileRequest $request
* @param int $consumableId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(AssetFileRequest $request, $consumableId = null)
{
if (config('app.lock_passwords')) {
return redirect()->route('consumables.show', ['consumable'=>$consumableId])->with('error', trans('general.feature_disabled'));
}
$consumable = Consumable::find($consumableId);
if (isset($consumable->id)) {
$this->authorize('update', $consumable);
if ($request->hasFile('file')) {
if (! Storage::exists('private_uploads/consumables')) {
Storage::makeDirectory('private_uploads/consumables', 775);
}
foreach ($request->file('file') as $file) {
$extension = $file->getClientOriginalExtension();
$file_name = 'consumable-'.$consumable->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$extension;
// Check for SVG and sanitize it
if ($extension == 'svg') {
\Log::debug('This is an SVG');
\Log::debug($file_name);
$sanitizer = new Sanitizer();
$dirtySVG = file_get_contents($file->getRealPath());
$cleanSVG = $sanitizer->sanitize($dirtySVG);
try {
Storage::put('private_uploads/consumables/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
} else {
Storage::put('private_uploads/consumables/'.$file_name, file_get_contents($file));
}
//Log the upload to the log
$consumable->logUpload($file_name, e($request->input('notes')));
}
return redirect()->route('consumables.show', $consumable->id)->with('success', trans('general.file_upload_success'));
}
return redirect()->route('consumables.show', $consumable->id)->with('error', trans('general.no_files_uploaded'));
}
// Prepare the error message
return redirect()->route('consumables.index')
->with('error', trans('general.file_does_not_exist'));
}
/**
* Deletes the selected consumable file.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.0]
* @param int $consumableId
* @param int $fileId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($consumableId = null, $fileId = null)
{
$consumable = Consumable::find($consumableId);
// the asset is valid
if (isset($consumable->id)) {
$this->authorize('update', $consumable);
$log = Actionlog::find($fileId);
// Remove the file if one exists
if (Storage::exists('consumables/'.$log->filename)) {
try {
Storage::delete('consumables/'.$log->filename);
} catch (\Exception $e) {
\Log::debug($e);
}
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
}
// Redirect to the licence management page
return redirect()->route('consumables.index')->with('error', trans('general.file_does_not_exist'));
}
/**
* Allows the selected file to be viewed.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v1.4]
* @param int $consumableId
* @param int $fileId
* @return \Symfony\Consumable\HttpFoundation\Response
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show($consumableId = null, $fileId = null, $download = true)
{
$consumable = Consumable::find($consumableId);
// the consumable is valid
if (isset($consumable->id)) {
$this->authorize('view', $consumable);
$this->authorize('consumables.files', $consumable);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that asset/file', 500)
->header('Content-Type', 'text/plain');
}
$file = 'private_uploads/consumables/'.$log->filename;
if (Storage::missing($file)) {
\Log::debug('FILE DOES NOT EXISTS for '.$file);
\Log::debug('URL should be '.Storage::url($file));
return response('File '.$file.' ('.Storage::url($file).') not found on server', 404)
->header('Content-Type', 'text/plain');
} else {
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') { // TODO - is there any way to fix this at the StorageHelper layer?
return StorageHelper::downloader($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) { // TODO - this will fail on private S3 files or large public ones
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
return JsonResponse::create(['error' => 'Failed validation: '], 500);
}
return StorageHelper::downloader($file);
}
}
}
return redirect()->route('consumables.index')->with('error', trans('general.file_does_not_exist', ['id' => $fileId]));
}
}
+2 -2
View File
@@ -9,11 +9,11 @@
*
* **THIS DOCUMENTATION DOES NOT COVER INSTALLATION.** If you're here and you're not a
* developer, you're probably in the wrong place. Please see the
* [Installation documentation](http://docs.snipeitapp.com) for
* [Installation documentation](https://snipe-it.readme.io) for
* information on how to install Snipe-IT.
*
* To learn how to set up a development environment and get started developing for Snipe-IT,
* please see the [contributing documentation](http://docs.snipeitapp.com/contributing.html).
* please see the [contributing documentation](https://snipe-it.readme.io/docs/contributing-overview).
*
* Only the Snipe-IT specific controllers, models, helpers, service providers,
* etc have been included in this documentation (excluding vendors, Laravel core, etc)
+68 -17
View File
@@ -7,6 +7,7 @@ use App\Http\Requests\CustomFieldRequest;
use App\Models\CustomField;
use App\Models\CustomFieldset;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Redirect;
/**
@@ -45,7 +46,7 @@ class CustomFieldsController extends Controller
* @see CustomFieldsController::storeField()
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v5.1.5]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function show()
@@ -63,14 +64,17 @@ class CustomFieldsController extends Controller
* @return \Illuminate\Support\Facades\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function create()
public function create(Request $request)
{
$this->authorize('create', CustomField::class);
$fieldsets = CustomFieldset::get();
return view('custom_fields.fields.edit', [
'predefinedFormats' => Helper::predefined_formats(),
'customFormat' => '',
])->with('field', new CustomField());
'customFormat' => '',
'fieldsets' => $fieldsets,
'field' => new CustomField(),
]);
}
/**
@@ -79,36 +83,57 @@ class CustomFieldsController extends Controller
* @see CustomFieldsController::createField()
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @since [v1.8]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function store(CustomFieldRequest $request)
{
$this->authorize('create', CustomField::class);
$show_in_email = $request->get("show_in_email", 0);
$display_in_user_view = $request->get("display_in_user_view", 0);
// Override the display settings if the field is encrypted
if ($request->get("field_encrypted") == '1') {
$show_in_email = '0';
$display_in_user_view = '0';
}
$field = new CustomField([
"name" => trim($request->get("name")),
"element" => $request->get("element"),
"help_text" => $request->get("help_text"),
"field_values" => $request->get("field_values"),
"field_encrypted" => $request->get("field_encrypted", 0),
"show_in_email" => $request->get("show_in_email", 0),
"show_in_email" => $show_in_email,
"is_unique" => $request->get("is_unique", 0),
"display_in_user_view" => $display_in_user_view,
"auto_add_to_fieldsets" => $request->get("auto_add_to_fieldsets", 0),
"user_id" => Auth::id()
]);
if ($request->filled('custom_format')) {
$field->format = e($request->get('custom_format'));
$field->format = $request->get('custom_format');
} else {
$field->format = e($request->get('format'));
$field->format = $request->get('format');
}
if ($field->save()) {
// Sync fields with fieldsets
$fieldset_array = $request->input('associate_fieldsets');
if ($request->has('associate_fieldsets') && (is_array($fieldset_array))) {
$field->fieldset()->sync(array_keys($fieldset_array));
} else {
$field->fieldset()->sync([]);
}
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.create.success'));
}
return redirect()->back()->withInput()
return redirect()->back()->with('selected_fieldsets', $request->input('associate_fieldsets'))->withInput()
->with('error', trans('admin/custom_fields/message.field.create.error'));
}
@@ -118,7 +143,7 @@ class CustomFieldsController extends Controller
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @since [v3.0]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function deleteFieldFromFieldset($field_id, $fieldset_id)
@@ -137,8 +162,7 @@ class CustomFieldsController extends Controller
->with('success', trans('admin/custom_fields/message.field.delete.success'));
} else {
return redirect()->back()->withErrors(['message' => "Field is in use and cannot be deleted."]);
}
}
}
return redirect()->back()->withErrors(['message' => "Error deleting field from fieldset"]);
@@ -151,7 +175,7 @@ class CustomFieldsController extends Controller
*
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @since [v1.8]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function destroy($field_id)
@@ -180,12 +204,12 @@ class CustomFieldsController extends Controller
* @return \Illuminate\Support\Facades\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($id)
public function edit(Request $request, $id)
{
if ($field = CustomField::find($id)) {
$this->authorize('update', $field);
$fieldsets = CustomFieldset::get();
$customFormat = '';
if ((stripos($field->format, 'regex') === 0) && ($field->format !== CustomField::PREDEFINED_FORMATS['MAC'])) {
$customFormat = $field->format;
@@ -194,6 +218,7 @@ class CustomFieldsController extends Controller
return view('custom_fields.fields.edit', [
'field' => $field,
'customFormat' => $customFormat,
'fieldsets' => $fieldsets,
'predefinedFormats' => Helper::predefined_formats(),
]);
}
@@ -212,7 +237,7 @@ class CustomFieldsController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
* @since [v4.0]
* @return Redirect
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update(CustomFieldRequest $request, $id)
@@ -221,13 +246,25 @@ class CustomFieldsController extends Controller
$this->authorize('update', $field);
$show_in_email = $request->get("show_in_email", 0);
$display_in_user_view = $request->get("display_in_user_view", 0);
// Override the display settings if the field is encrypted
if ($request->get("field_encrypted") == '1') {
$show_in_email = '0';
$display_in_user_view = '0';
}
$field->name = trim(e($request->get("name")));
$field->element = e($request->get("element"));
$field->field_values = e($request->get("field_values"));
$field->user_id = Auth::id();
$field->help_text = $request->get("help_text");
$field->show_in_email = $request->get("show_in_email", 0);
$field->show_in_email = $show_in_email;
$field->is_unique = $request->get("is_unique", 0);
$field->display_in_user_view = $display_in_user_view;
$field->auto_add_to_fieldsets = $request->get("auto_add_to_fieldsets", 0);
if ($request->get('format') == 'CUSTOM REGEX') {
$field->format = e($request->get('custom_format'));
@@ -235,7 +272,21 @@ class CustomFieldsController extends Controller
$field->format = e($request->get('format'));
}
if ($field->element == 'checkbox' || $field->element == 'radio'){
$field->format = 'ANY';
}
if ($field->save()) {
// Sync fields with fieldsets
$fieldset_array = $request->input('associate_fieldsets');
if ($request->has('associate_fieldsets') && (is_array($fieldset_array))) {
$field->fieldset()->sync(array_keys($fieldset_array));
} else {
$field->fieldset()->sync([]);
}
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/message.field.update.success'));
}
@@ -75,9 +75,9 @@ class CustomFieldsetsController extends Controller
*/
public function create()
{
$this->authorize('create', CustomFieldset::class);
$this->authorize('create', CustomField::class);
return view('custom_fields.fieldsets.edit');
return view('custom_fields.fieldsets.edit')->with('item', new CustomFieldset());
}
/**
@@ -91,18 +91,29 @@ class CustomFieldsetsController extends Controller
*/
public function store(Request $request)
{
$this->authorize('create', CustomFieldset::class);
$this->authorize('create', CustomField::class);
$cfset = new CustomFieldset([
$fieldset = new CustomFieldset([
'name' => e($request->get('name')),
'user_id' => Auth::user()->id,
]);
$validator = Validator::make($request->all(), $cfset->rules);
if ($validator->passes()) {
$cfset->save();
$validator = Validator::make($request->all(), $fieldset->rules);
return redirect()->route('fieldsets.show', [$cfset->id])
if ($validator->passes()) {
$fieldset->save();
// Sync fieldset with auto_add_to_fieldsets
$fields = CustomField::select('id')->where('auto_add_to_fieldsets', '=', '1')->get();
if ($fields->count() > 0) {
foreach ($fields as $field) {
$field_ids[] = $field->id;
}
$fieldset->fields()->sync($field_ids);
}
return redirect()->route('fieldsets.show', [$fieldset->id])
->with('success', trans('admin/custom_fields/message.fieldset.create.success'));
}
@@ -110,31 +121,52 @@ class CustomFieldsetsController extends Controller
}
/**
* What the actual fuck, Brady?
* Presents edit form for fieldset
*
* @todo Uhh, build this?
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
* @since [v1.8]
* @return Fuckall
* @since [v6.0.14]
* @return Redirect
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function edit($id)
{
//
$this->authorize('create', CustomField::class);
if ($fieldset = CustomFieldset::find($id)) {
return view('custom_fields.fieldsets.edit')->with('item', $fieldset);
}
return redirect()->route('fields.index')->with('error', trans('admin/custom_fields/general.fieldset_does_not_exist', ['id' => $id]));
}
/**
* GET IN THE SEA BRADY.
* Saves updated fieldset data
*
* @todo Uhh, build this too?
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $id
* @since [v1.8]
* @return Fuckall
* @since [v6.0.14]
* @return Redirect
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function update($id)
public function update(Request $request, $id)
{
//
$this->authorize('create', CustomField::class);
if ($fieldset = CustomFieldset::find($id)) {
$fieldset->name = $request->input('name');
if ($fieldset->save()) {
return redirect()->route('fields.index')->with('success', trans('admin/custom_fields/general.fieldset_updated'));
}
return redirect()->back()->withInput()->withErrors($fieldset->getErrors());
}
return redirect()->route('fields.index')->with('error', trans('admin/custom_fields/general.fieldset_does_not_exist', ['id' => $id]));
}
/**
@@ -202,7 +234,7 @@ class CustomFieldsetsController extends Controller
*/
public function makeFieldRequired($fieldset_id, $field_id)
{
$this->authorize('update', CustomFieldset::class);
$this->authorize('update', CustomField::class);
$field = CustomField::findOrFail($field_id);
$fieldset = CustomFieldset::findOrFail($fieldset_id);
$fields[$field->id] = ['required' => 1];
@@ -220,7 +252,7 @@ class CustomFieldsetsController extends Controller
*/
public function makeFieldOptional($fieldset_id, $field_id)
{
$this->authorize('update', CustomFieldset::class);
$this->authorize('update', CustomField::class);
$field = CustomField::findOrFail($field_id);
$fieldset = CustomFieldset::findOrFail($fieldset_id);
$fields[$field->id] = ['required' => 0];
+1 -1
View File
@@ -34,7 +34,7 @@ class DashboardController extends Controller
$counts['license'] = \App\Models\License::assetcount();
$counts['consumable'] = \App\Models\Consumable::count();
$counts['component'] = \App\Models\Component::count();
$counts['user'] = \App\Models\User::count();
$counts['user'] = \App\Models\Company::scopeCompanyables(Auth::user())->count();
$counts['grand_total'] = $counts['asset'] + $counts['accessory'] + $counts['license'] + $counts['consumable'];
if ((! file_exists(storage_path().'/oauth-private.key')) || (! file_exists(storage_path().'/oauth-public.key'))) {
@@ -54,7 +54,8 @@ class DepartmentsController extends Controller
$department->fill($request->all());
$department->user_id = Auth::user()->id;
$department->manager_id = ($request->filled('manager_id') ? $request->input('manager_id') : null);
$department->location_id = ($request->filled('location_id') ? $request->input('location_id') : null);
$department->company_id = ($request->filled('company_id') ? $request->input('company_id') : null);
$department = $request->handleImages($department);
if ($department->save()) {
@@ -167,6 +168,8 @@ class DepartmentsController extends Controller
$department->fill($request->all());
$department->manager_id = ($request->filled('manager_id') ? $request->input('manager_id') : null);
$department->location_id = ($request->filled('location_id') ? $request->input('location_id') : null);
$department->company_id = ($request->filled('company_id') ? $request->input('company_id') : null);
$department = $request->handleImages($department);
@@ -0,0 +1,74 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;
use Laravel\Socialite\Two\InvalidStateException;
use App\Models\Setting;
class GoogleAuthController extends Controller
{
/**
* We need this constructor so that we override the socialite expected config variables,
* since we want to allow this to be changed via database fields
*/
public function __construct()
{
parent::__construct();
$setting = Setting::getSettings();
config(['services.google.redirect' => config('app.url').'/google/callback']);
config(['services.google.client_id' => $setting->google_client_id]);
config(['services.google.client_secret' => $setting->google_client_secret]);
}
public function redirectToGoogle()
{
return Socialite::driver('google')->redirect();
}
public function handleGoogleCallback()
{
try {
$socialUser = Socialite::driver('google')->user();
\Log::debug('Google user found in Google Workspace');
} catch (InvalidStateException $exception) {
\Log::debug('Google user NOT found in Google Workspace');
return redirect()->route('login')
->withErrors(
[
'username' => [
trans('auth/general.google_login_failed')
],
]
);
}
$user = User::where('username', $socialUser->getEmail())->first();
if ($user) {
\Log::debug('Google user '.$socialUser->getEmail().' found in Snipe-IT');
$user->update([
'avatar' => $socialUser->avatar,
]);
Auth::login($user, true);
return redirect()->route('home');
}
\Log::debug('Google user '.$socialUser->getEmail().' NOT found in Snipe-IT');
return redirect()->route('login')
->withErrors(
[
'username' => [
trans('auth/general.google_login_failed'),
],
]
);
}
}
+5 -6
View File
@@ -92,7 +92,7 @@ class GroupsController extends Controller
return view('groups.edit', compact('group', 'permissions', 'selected_array', 'groupPermissions'));
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found'));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
/**
@@ -107,7 +107,7 @@ class GroupsController extends Controller
public function update(Request $request, $id = null)
{
if (! $group = Group::find($id)) {
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
$group->name = $request->input('name');
$group->permissions = json_encode($request->input('permission'));
@@ -133,14 +133,13 @@ class GroupsController extends Controller
* @return \Illuminate\Http\RedirectResponse
* @throws \Exception
*/
public function destroy($id = null)
public function destroy($id)
{
if (! config('app.lock_passwords')) {
if (! $group = Group::find($id)) {
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
$group->delete();
// Redirect to the group management page
return redirect()->route('groups.index')->with('success', trans('admin/groups/message.success.delete'));
}
@@ -164,6 +163,6 @@ class GroupsController extends Controller
return view('groups/view', compact('group'));
}
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', ['id' => $id]));
}
}
@@ -1,22 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Http\Transformers\ImportsTransformer;
use App\Models\Asset;
use App\Models\Import;
class ImportsController extends Controller
{
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function index()
{
$this->authorize('import');
$imports = (new ImportsTransformer)->transformImports(Import::latest()->get());
return view('importer/import')->with('imports', $imports);
}
}
@@ -59,6 +59,12 @@ class LicenseCheckinController extends Controller
}
$license = License::find($licenseSeat->license_id);
// LicenseSeat is not assigned, it can't be checked in
if (is_null($licenseSeat->assigned_to) && is_null($licenseSeat->asset_id)) {
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
}
$this->authorize('checkout', $license);
if (! $license->reassignable) {
@@ -106,4 +112,54 @@ class LicenseCheckinController extends Controller
// Redirect to the license page with error
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
}
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckin(Request $request, $licenseId) {
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
$licenseSeatsByUser = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('assigned_to')
->with('user')
->get();
foreach ($licenseSeatsByUser as $user_seat) {
$user_seat->assigned_to = null;
if ($user_seat->save()) {
\Log::debug('Checking in '.$license->name.' from user '.$user_seat->username);
$user_seat->logCheckin($user_seat->user, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
}
}
$licenseSeatsByAsset = LicenseSeat::where('license_id', '=', $licenseId)
->whereNotNull('asset_id')
->with('asset')
->get();
$count = 0;
foreach ($licenseSeatsByAsset as $asset_seat) {
$asset_seat->asset_id = null;
if ($asset_seat->save()) {
\Log::debug('Checking in '.$license->name.' from asset '.$asset_seat->asset_tag);
$asset_seat->logCheckin($asset_seat->asset, trans('admin/licenses/general.bulk.checkin_all.log_msg'));
$count++;
}
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkin_all.success', 2, ['count' => $count] ));
}
}
@@ -30,15 +30,17 @@ class LicenseCheckoutController extends Controller
// Check that the license is valid
if ($license = License::find($licenseId)) {
$this->authorize('checkout', $license);
// If the license is valid, check that there is an available seat
if ($license->avail_seats_count < 1) {
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
}
return view('licenses/checkout', compact('license'));
}
$this->authorize('checkout', $license);
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.not_found'));
return view('licenses/checkout', compact('license'));
}
/**
@@ -61,6 +63,7 @@ class LicenseCheckoutController extends Controller
$licenseSeat = $this->findLicenseSeatToCheckout($license, $seatId);
$licenseSeat->user_id = Auth::id();
$checkoutMethod = 'checkoutTo'.ucwords(request('checkout_to_type'));
if ($this->$checkoutMethod($licenseSeat)) {
@@ -76,14 +79,14 @@ class LicenseCheckoutController extends Controller
if (! $licenseSeat) {
if ($seatId) {
return redirect()->route('licenses.index')->with('error', 'This Seat is not available for checkout.');
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'This Seat is not available for checkout.'));
}
return redirect()->route('licenses.index')->with('error', 'There are no available seats for this license');
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'There are no available seats for this license.'));
}
if (! $licenseSeat->license->is($license)) {
return redirect()->route('licenses.index')->with('error', 'The license seat provided does not match the license.');
throw new \Illuminate\Http\Exceptions\HttpResponseException(redirect()->route('licenses.index')->with('error', 'The license seat provided does not match the license.'));
}
return $licenseSeat;
@@ -125,4 +128,70 @@ class LicenseCheckoutController extends Controller
return false;
}
/**
* Bulk checkin all license seats
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @see LicenseCheckinController::create() method that provides the form view
* @since [v6.1.1]
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function bulkCheckout($licenseId) {
\Log::debug('Checking out '.$licenseId.' via bulk');
$license = License::findOrFail($licenseId);
$this->authorize('checkin', $license);
$avail_count = $license->getAvailSeatsCountAttribute();
$users = User::whereNull('deleted_at')->where('autoassign_licenses', '=', 1)->with('licenses')->get();
\Log::debug($avail_count.' will be assigned');
if ($users->count() > $avail_count) {
\Log::debug('You do not have enough free seats to complete this task, so we will check out as many as we can. ');
}
// If the license is valid, check that there is an available seat
if ($license->availCount()->count() < 1) {
return redirect()->back()->with('error', trans('admin/licenses/general.bulk.checkout_all.error_no_seats'));
}
$assigned_count = 0;
foreach ($users as $user) {
// Check to make sure this user doesn't already have this license checked out to them
if ($user->licenses->where('id', '=', $licenseId)->count()) {
\Log::debug($user->username.' already has this license checked out to them. Skipping... ');
continue;
}
$licenseSeat = $license->freeSeat();
// Update the seat with checkout info
$licenseSeat->assigned_to = $user->id;
if ($licenseSeat->save()) {
$avail_count--;
$assigned_count++;
$licenseSeat->logCheckout(trans('admin/licenses/general.bulk.checkout_all.log_msg'), $user);
\Log::debug('License '.$license->name.' seat '.$licenseSeat->id.' checked out to '.$user->username);
}
if ($avail_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_not_enough_seats', ['count' => $assigned_count]));
}
}
if ($assigned_count == 0) {
return redirect()->back()->with('warning', trans('admin/licenses/general.bulk.checkout_all.warn_no_avail_users', ['count' => $assigned_count]));
}
return redirect()->back()->with('success', trans_choice('admin/licenses/general.bulk.checkout_all.success', 2, ['count' => $assigned_count] ));
}
}
@@ -91,29 +91,30 @@ class LicenseFilesController extends Controller
*/
public function destroy($licenseId = null, $fileId = null)
{
$license = License::find($licenseId);
if ($license = License::find($licenseId)) {
// the asset is valid
if (isset($license->id)) {
$this->authorize('update', $license);
$log = Actionlog::find($fileId);
// Remove the file if one exists
if (Storage::exists('licenses/'.$log->filename)) {
try {
Storage::delete('licenses/'.$log->filename);
} catch (\Exception $e) {
\Log::debug($e);
if ($log = Actionlog::find($fileId)) {
// Remove the file if one exists
if (Storage::exists('licenses/'.$log->filename)) {
try {
Storage::delete('licenses/'.$log->filename);
} catch (\Exception $e) {
\Log::debug($e);
}
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
}
$log->delete();
return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->route('licenses.index')->with('error', trans('general.log_does_not_exist'));
}
// Redirect to the licence management page
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist'));
}
@@ -129,12 +130,12 @@ class LicenseFilesController extends Controller
*/
public function show($licenseId = null, $fileId = null, $download = true)
{
\Log::info('Private filesystem is: '.config('filesystems.default'));
$license = License::find($licenseId);
// the license is valid
if (isset($license->id)) {
$this->authorize('view', $license);
$this->authorize('licenses.files', $license);
if (! $log = Actionlog::find($fileId)) {
return response('No matching record for that asset/file', 500)
@@ -171,6 +172,6 @@ class LicenseFilesController extends Controller
}
}
return redirect()->route('license.index')->with('error', trans('admin/licenses/message.does_not_exist', ['id' => $fileId]));
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.does_not_exist', ['id' => $fileId]));
}
}
@@ -6,6 +6,8 @@ use App\Helpers\Helper;
use App\Http\Controllers\Controller;
use App\Models\Company;
use App\Models\License;
use App\Models\LicenseSeat;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@@ -86,7 +88,7 @@ class LicensesController extends Controller
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->purchase_order = $request->input('purchase_order');
@@ -164,7 +166,7 @@ class LicensesController extends Controller
$license->name = $request->input('name');
$license->notes = $request->input('notes');
$license->order_number = $request->input('order_number');
$license->purchase_cost = Helper::ParseCurrency($request->input('purchase_cost'));
$license->purchase_cost = $request->input('purchase_cost');
$license->purchase_date = $request->input('purchase_date');
$license->purchase_order = $request->input('purchase_order');
$license->reassignable = $request->input('reassignable', 0);
@@ -233,16 +235,40 @@ class LicensesController extends Controller
{
$license = License::with('assignedusers')->find($licenseId);
if ($license) {
$this->authorize('view', $license);
return view('licenses/view', compact('license'));
if (!$license) {
return redirect()->route('licenses.index')
->with('error', trans('admin/licenses/message.does_not_exist'));
}
return redirect()->route('licenses.index')
->with('error', trans('admin/licenses/message.does_not_exist'));
$users_count = User::where('autoassign_licenses', '1')->count();
$total_seats_count = $license->totalSeatsByLicenseID();
$available_seats_count = $license->availCount()->count();
$checkedout_seats_count = ($total_seats_count - $available_seats_count);
\Log::debug('Total: '.$total_seats_count);
\Log::debug('Users: '.$users_count);
\Log::debug('Available: '.$available_seats_count);
\Log::debug('Checkedout: '.$checkedout_seats_count);
$this->authorize('view', $license);
return view('licenses.view', compact('license'))
->with('users_count', $users_count)
->with('total_seats_count', $total_seats_count)
->with('available_seats_count', $available_seats_count)
->with('checkedout_seats_count', $checkedout_seats_count);
}
/**
* Returns a view with prepopulated data for clone
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $licenseId
* @return \Illuminate\Http\RedirectResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function getClone($licenseId = null)
{
if (is_null($license_to_clone = License::find($licenseId))) {
+54 -12
View File
@@ -211,23 +211,65 @@ class LocationsController extends Controller
public function print_assigned($id)
{
$location = Location::where('id', $id)->first();
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('assigned_to', $id)->where('assigned_type', Location::class)->with('model', 'model.category')->get();
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
if ($location = Location::where('id', $id)->first()) {
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('assigned_to', $id)->where('assigned_type', Location::class)->with('model', 'model.category')->get();
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
}
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
/**
* Returns a view that presents a form to clone a location.
*
* @author [A. Gianotto] [<snipe@snipe.net>]
* @param int $locationId
* @since [v6.0.14]
* @return View
*/
public function getClone($locationId = null)
{
$this->authorize('create', Location::class);
// Check if the asset exists
if (is_null($location_to_clone = Location::find($locationId))) {
// Redirect to the asset management page
return redirect()->route('licenses.index')->with('error', trans('admin/locations/message.does_not_exist'));
}
$location = clone $location_to_clone;
// unset these values
$location->id = null;
$location->image = null;
return view('locations/edit')
->with('item', $location);
}
public function print_all_assigned($id)
{
$location = Location::where('id', $id)->first();
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('location_id', $id)->with('model', 'model.category')->get();
if ($location = Location::where('id', $id)->first()) {
$parent = Location::where('id', $location->parent_id)->first();
$manager = User::where('id', $location->manager_id)->first();
$users = User::where('location_id', $id)->with('company', 'department', 'location')->get();
$assets = Asset::where('location_id', $id)->with('model', 'model.category')->get();
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
}
return redirect()->route('locations.index')->with('error', trans('admin/locations/message.does_not_exist'));
return view('locations/print')->with('assets', $assets)->with('users', $users)->with('location', $location)->with('parent', $parent)->with('manager', $manager);
}
}
@@ -68,6 +68,7 @@ class ManufacturersController extends Controller
$manufacturer->user_id = Auth::id();
$manufacturer->url = $request->input('url');
$manufacturer->support_url = $request->input('support_url');
$manufacturer->warranty_lookup_url = $request->input('warranty_lookup_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');
$manufacturer = $request->handleImages($manufacturer);
@@ -123,10 +124,11 @@ class ManufacturersController extends Controller
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
}
// Save the data
// Save the data
$manufacturer->name = $request->input('name');
$manufacturer->url = $request->input('url');
$manufacturer->support_url = $request->input('support_url');
$manufacturer->warranty_lookup_url = $request->input('warranty_lookup_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');
+1 -1
View File
@@ -17,7 +17,7 @@ class ModalController extends Controller
* @author [A. Gianotto] [<snipe@snipe.net]
* @return View
*/
function show ($type, $itemId = null) {
public function show ($type, $itemId = null) {
// These values should correspond to a file in resources/views/modals/
$allowed_types = [

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