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
3cf583ab03
Add CustomFieldPermissionException handling
2024-11-19 17:45:35 -06:00
spencerrlongg
9f815996c7
tests 'n stuff
2024-11-19 14:45:54 -06:00
spencerrlongg
3e97f0274c
rm extra code
2024-11-19 10:04:10 -06:00
spencerrlongg
6c1239eee5
cleaned - more work needs to happen
2024-11-19 10:02:04 -06:00
spencerrlongg
dd8fb6ef4a
fixed some things, made bulk progress, tests pass
2024-11-19 00:13:28 -06:00
spencerrlongg
c91dfaf9df
gui seemingly working, other good progress - api next
2024-11-14 16:54:23 -06:00
spencerrlongg
b00f8b5c40
a couple more tests passing
2024-10-30 19:37:51 -05:00
spencerrlongg
c0ea1fbe78
delete done
2024-10-30 15:19:34 -05:00
spencerrlongg
698434dcf8
no more base action, scaffolded update and delete
2024-10-30 13:48:14 -05:00
spencerrlongg
34886ee69a
almost wrapped up StoreAssetAction.php
2024-10-29 19:04:57 -05:00
spencerrlongg
eaa10249c2
alright, this mostly works.
2024-10-29 16:16:01 -05:00
snipe
15745d9737
Merge pull request #15566 from Godmartinz/status-label-error-message
...
Fixed Status Labels Error Message
2024-10-22 16:39:44 +01:00
Tobias Regnery
fdcc17ca2c
Fix user creation with FullMultipleCompanySupport enabled over API
...
It is currently possible as a non-superuser to create a new user or patch an existing user with arbitrary company over the API if FullMultipleCompanySupport is enabled.
Altough a highly unlikely scenario as the user needs permission to create API keys and new users, it is a bug that should get fixed.
Add a call to getIdForCurrentUser() to normalize the company_id if FullMultipleCompanySupport is enabled.
2024-10-16 11:47:18 +02:00
snipe
0ae9ce0aa9
Cannot sort by updated at on Users [sc-27147]
...
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 16:41:45 +01:00
snipe
50b8f180b3
More logical grouping in allow_columns
...
Signed-off-by: snipe <snipe@snipe.net>
2024-10-15 16:41:39 +01:00
Tobias Regnery
f3c4e55667
Refactor asset creation with API
...
Commit fb4fe3004
restored the previous behaviour to check the company_id in case of FullMultipleCompanySupport.
But after rereading the code and the laravel documentation, the check is already there where it belongs in AssetStoreRequest::prepareForValidation()
The bug is the is_int-check of the request input in prepareForValidation(). Is is of type string even if it is a numeric value, so the call to getIdForCurrentUser() never happend.
Fix this by removing the check and the now redundant call to getIdForCurrentUser().
Wrong values will get caught by the model-level validation rules.
2024-10-14 15:14:41 +02:00
snipe
e1a70023b1
Merge pull request #15655 from Toreg87/fixes/api_asset_create_fmcs
...
Fixes #15654 Fix asset creation with API and FullMultipleCompanySupport
2024-10-11 11:45:48 +01:00
snipe
de62359c67
Merge pull request #15533 from marcusmoore/testing/fmcs-accessories
...
Added tests for accessory api controller
2024-10-11 11:29:34 +01:00
Tobias Regnery
fb4fe30049
Fix asset creation with API and FullMultipleCompanySupport
...
It is currently possible to create an asset with arbitrary company without being superuser and FullMultipleCompanySupport enabled.
This bug goes back to 75ac7f80b9
which is part of version 6.3.0.
Fix this by restoring the previous behaviour to check the company_id with getIdForCurrentUser().
2024-10-11 12:19:20 +02:00
Brady Wetherington
350b627ce1
Fix numeric sort 'ambiguous order clause' error
2024-10-03 14:23:40 +01:00
snipe
27ba641aa5
Added checkin on delete to API
...
Signed-off-by: snipe <snipe@snipe.net>
2024-10-01 14:30:34 +01:00
Marcus Moore
fdfea390fb
Merge branch 'develop' into testing/fmcs-accessories
2024-09-30 12:59:27 -07:00
Godfrey M
3f74ff25d2
fixed error message
2024-09-25 16:19:09 -07:00
snipe
658c94ad8b
Changed action_date to created_at
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-25 17:25:15 +01:00
snipe
0ce5832b6c
Removed debugging
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 17:29:40 +01:00
snipe
5fb43dd159
Handle audit
*and* audits
for urls
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:55:56 +01:00
snipe
de57d71bf1
Fixed #15548 - unify audit due/overdue APIs
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 16:30:24 +01:00
snipe
b68805cf83
Small fix for notifications checkout
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-20 19:11:52 +01:00
snipe
2fc88a0e08
Eager load adminuser
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-20 14:33:26 +01:00
snipe
b21c303e56
Merge remote-tracking branch 'origin/develop' into features/add_created_at_created_by
2024-09-20 13:43:50 +01:00
Marcus Moore
d609ed50a4
Merge branch 'develop' into testing/fmcs-accessories
2024-09-19 13:20:55 -07:00
snipe
b88f2054dd
Refactor isDeletable on companies
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 20:38:34 +01:00
snipe
454796e52a
Merge pull request #15518 from snipe/sort_by_numeric_custom_fields
...
Fixed #11634 - Sort by numeric columns for numeric custom fields
2024-09-19 20:32:03 +01:00
snipe
f283b5fbe8
Eager load adminuser
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 19:56:39 +01:00
snipe
eb6f05faf7
Eager load adminuser
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 19:41:46 +01:00
Marcus Moore
2137890496
Remove dead code
2024-09-19 11:33:20 -07:00
snipe
cd98b3817d
Removed duplicate line
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 18:26:08 +01:00
snipe
727806372c
Added created_by to status label
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 18:22:11 +01:00
snipe
5e1c736d49
Added created_by for manufacturers
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 18:04:50 +01:00
snipe
6579fa72da
Added scoping for categories and companies
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:56:05 +01:00
snipe
82d6e1510f
Order by created_by for depreciations
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:41:05 +01:00
snipe
822ea96dfd
Use auth()->id() instead of Auth::id()
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:31:46 +01:00
snipe
b247fc33b9
Added legacy comment
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:28:01 +01:00
snipe
2dcae780c0
Reapply deleted code
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:26:21 +01:00
snipe
5c3180ffa0
Removed duplicate code
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:25:09 +01:00
snipe
bbce7b40ca
Additional consistencies
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:20:56 +01:00
snipe
02a29c71ef
Added created_by
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:01:48 +01:00
snipe
6699995972
Added created_by to components
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:01:36 +01:00
snipe
951f03094a
Added created_by to kits
...
Signed-off-by: snipe <snipe@snipe.net>
2024-09-19 17:01:17 +01:00