Commit graph

16158 commits

Author SHA1 Message Date
spencerrlongg 5e475c3558 Remove unused imports from AssetsController files.
Simplify the code by cleaning up unused import statements in both `AssetsController.php` and `Api/AssetsController.php`. This reduces potential confusion and helps maintain cleaner code for future development and maintenance.
2024-12-03 14:41:30 -06:00
spencerrlongg bdf1033277 Merge remote-tracking branch 'upstream/develop' into refactor/asset-action
# Conflicts:
#	app/Http/Controllers/Api/AssetsController.php
#	app/Http/Controllers/Assets/AssetsController.php
#	app/Http/Controllers/Assets/BulkAssetsController.php
#	resources/lang/en-US/admin/hardware/message.php
2024-12-03 14:31:50 -06:00
spencerrlongg 16740b41e4 Simplify asset handling logic for creation and update
Refactor asset creation and update processes by removing redundant save checks and organizing error handling logic. Enhance success and failure feedback in the asset creation flow to improve clarity and user experience. Add support for detailed multi-success and partial failure messages to alert users of outcomes.
2024-12-03 13:50:30 -06:00
snipe 43d66a8fcc
Merge pull request #15918 from Godmartinz/mail_name_fix
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled
Adds `MAIL_FROM_NAME` to mail envelope
2024-12-03 17:17:26 +00:00
Godfrey M e5284c03e2 fix typo 2024-12-03 09:10:50 -08:00
Godfrey M 16283b8fc0 adds mail from name to mail envelope 2024-12-03 09:08:39 -08:00
snipe 2ad1407d51
Merge pull request #15909 from Godmartinz/checkin-out-notifications
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Fixed general webhook option notifications not firing
2024-12-02 22:03:32 +00:00
snipe 14730184c9 Fixed sr-only blank text
Signed-off-by: snipe <snipe@snipe.net>
2024-12-02 18:48:02 +00:00
snipe 8ff099e802
Merge pull request #15910 from marcusmoore/chore/include-testing-variable
Included MAIL_FROM_ADDR in phpunit configuration
2024-12-02 18:34:08 +00:00
Marcus Moore ea1f8328b9
Include MAIL_FROM_ADDR in phpunit configuration 2024-12-02 10:23:02 -08:00
Godfrey M 99464fcd86 fixes general webhook not firing 2024-12-02 10:19:24 -08:00
snipe 93d4d24194 Fixed funky layout in importer
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Update Docker Hub Description / dockerHubDescription (push) Has been cancelled
Signed-off-by: snipe <snipe@snipe.net>
2024-12-02 17:56:15 +00:00
snipe 1bbe9bf6c9 Merge remote-tracking branch 'origin/develop' 2024-12-02 17:43:03 +00:00
snipe 6874f703bf Some CSS twiddling
Signed-off-by: snipe <snipe@snipe.net>
2024-12-02 17:42:26 +00:00
snipe a7d5b3944e
Merge pull request #15908 from snipe/revert-15892-bug/harden-checkout-validation
Revert "Hardened asset checkout validation by requiring integer"
2024-12-02 17:42:02 +00:00
Marcus Moore b5e83899c6
Revert "Hardened asset checkout validation by requiring integer" 2024-12-02 09:37:21 -08:00
snipe dcd586e3cd Merge remote-tracking branch 'origin/develop' 2024-12-02 17:17:20 +00:00
snipe 1246ab1de7 Fixed bulk user form in user detail view
Signed-off-by: snipe <snipe@snipe.net>
2024-12-02 17:14:36 +00:00
snipe 5a4a3aa8f3 Merge remote-tracking branch 'origin/develop' 2024-12-02 15:59:25 +00:00
snipe 2220828b00
Merge pull request #15904 from snipe/fixes/#15901
Fixed #15901 - re-added required indicator on text and select custom fields
2024-12-02 15:51:32 +00:00
snipe 716c67d4b8 Fixed #15901 - re-added required indicator on text and select custom fields
Signed-off-by: snipe <snipe@snipe.net>
2024-12-02 15:45:07 +00:00
spencerrlongg 0a1aba5406 a little work for conflicts 2024-11-29 14:32:19 -06:00
snipe ee4a54be24 Fixed order by notes for users
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Signed-off-by: snipe <snipe@snipe.net>
2024-11-27 15:48:13 +00:00
snipe 46be1ada60
Merge pull request #15892 from marcusmoore/bug/harden-checkout-validation
Hardened asset checkout validation by requiring integer
2024-11-27 14:55:11 +00:00
snipe e1c0a80c20 Merge remote-tracking branch 'origin/develop'
Some checks failed
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
2024-11-27 13:52:03 +00:00
snipe 2cb1b6d462 Use transformer on API update
Signed-off-by: snipe <snipe@snipe.net>
2024-11-27 13:51:53 +00:00
spencerrlongg ac1d09add0 Fix authorization check in AssetsController
Removed incorrect and commented-out authorization check in the destroy method. Ensured proper authorization by explicitly authorizing the asset instance before attempting deletion.
2024-11-26 14:49:50 -06:00
spencerrlongg e056da6b2a Add permissions checks to asset tests
Implement tests to ensure users without appropriate permissions are denied access to asset endpoints. Update tests to verify proper soft deletions and asset existence checks in delete scenarios.
2024-11-26 14:47:16 -06:00
snipe 37ac7fe25c Merge remote-tracking branch 'origin/develop'
Some checks are pending
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Waiting to run
Codacy Security Scan / Codacy Security Scan (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
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
2024-11-26 20:38:46 +00:00
spencerrlongg 09d4e0cb05 Remove unnecessary parameter and add delete asset tests
Removed the redundant $request parameter from the destroy method in AssetsController. Added feature tests to verify asset deletion functionality with proper permissions and ensure deletion is forbidden without permissions.
2024-11-26 14:37:45 -06:00
spencerrlongg 233656df01 Add tests for storing assets with all fields and multiple entries
Introduced StoreAssetTest to verify the handling of full asset records and multiple asset entries in the database. Updated StoreAssetAction and AssetsController to support next audit date validation and improved error handling.
2024-11-26 14:28:22 -06:00
snipe 11f83b4cd9 Merge branch 'develop' of https://github.com/snipe/snipe-it into develop
Some checks are pending
Crowdin Action / upload-sources-to-crowdin (push) Waiting to run
Docker images (Alpine) / docker (push) Waiting to run
Docker images / docker (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Waiting to run
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Waiting to run
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Waiting to run
2024-11-26 20:12:14 +00:00
snipe 0f1d10bd69 Dev assets
Signed-off-by: snipe <snipe@snipe.net>
2024-11-26 20:12:09 +00:00
snipe 82108f8a18
Merge pull request #15208 from akemidx/feature/sc-26415
FEATURE: Option for Notes to be Required on Asset Checkin/Checkout
2024-11-26 20:11:04 +00:00
akemidx a7dae10a82 fixing line 2024-11-26 15:06:25 -05:00
akemidx 2727210c78 requested changes from pr 2024-11-26 15:04:54 -05:00
Marcus Moore fcbd5dcae5
Harden asset checkout validation by requiring ints 2024-11-26 11:33:17 -08:00
snipe fa80716320
Merge pull request #15890 from Godmartinz/mobile-view-fix
Mobile view fix
2024-11-26 19:13:39 +00:00
Godfrey M 15c9df0ab1 fix mobile view for asset and user 2024-11-26 10:59:31 -08:00
spencerrlongg 233355ab48 Refactor UpdateAssetAction for clarity and remove comments
Removed outdated and redundant comments for improved code clarity and readability. Renamed `bulkUpdate` method to `bulkLocationUpdate` for better context and understanding.
2024-11-26 12:52:09 -06:00
snipe 6ee0c93c87 Merge remote-tracking branch 'origin/develop' 2024-11-26 18:47:22 +00:00
snipe 37e091adbb
Merge pull request #15889 from Godmartinz/Fix-user-API-location-update
Fixed Users API `update` from clearing `location_id` unnecessarily
2024-11-26 18:45:20 +00:00
Godfrey M 021e82927e fixed mobile view of assets 2024-11-26 10:42:59 -08:00
spencerrlongg aeb5e90037 Add CheckoutNotAllowed exception in UpdateAssetAction
This change introduces the CheckoutNotAllowed exception to the UpdateAssetAction class. It ensures that the action can handle scenarios where checking out an asset is not permitted, improving the robustness of the application.
2024-11-26 12:40:53 -06:00
Godfrey M 60642cd902 fix user api update from clearing location_id unnecessarily 2024-11-26 09:58:17 -08:00
spencerrlongg 705a852d45 Refactor error handling and remove redundant code
Refactored error handling by replacing `\Exception` with `Exception` for consistency. Removed redundant comments and unused code to improve readability and maintainability of the `StoreAssetAction` class.
2024-11-25 20:09:30 -06:00
spencerrlongg 93e42ce939 Remove unused code from UpdateAssetAction.php
Removed commented-out code related to handling encrypted custom fields in UpdateAssetAction.php. This cleanup helps to maintain a more readable and maintainable codebase.
2024-11-25 15:50:47 -06:00
snipe fd07550803 Merge remote-tracking branch 'origin/develop'
Some checks failed
CodeQL Security Scan / CodeQL Security Scan (javascript) (push) Has been cancelled
Codacy Security Scan / Codacy Security Scan (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Signed-off-by: snipe <snipe@snipe.net>

# Conflicts:
#	config/version.php
2024-11-25 14:19:05 +00:00
snipe 30b481bc93 Updated version
Some checks failed
Crowdin Action / upload-sources-to-crowdin (push) Has been cancelled
Docker images (Alpine) / docker (push) Has been cancelled
Docker images / docker (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.1) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.2) (push) Has been cancelled
Tests in MySQL / PHP ${{ matrix.php-version }} (8.3) (push) Has been cancelled
Tests in SQLite / PHP ${{ matrix.php-version }} (8.1.1) (push) Has been cancelled
Signed-off-by: snipe <snipe@snipe.net>
2024-11-25 14:18:31 +00:00
snipe 25bfd3e845 Merge remote-tracking branch 'origin/develop' 2024-11-25 13:05:28 +00:00