3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-06 00:25:45 +00:00
Commit Graph

30 Commits

Author SHA1 Message Date
eccdcc373e parent 2220828b00
author Brady Wetherington <bwetherington@grokability.com> 1728320853 +0100
committer Brady Wetherington <bwetherington@grokability.com> 1733158021 +0000

Prevent setting assigned_to without setting assigned_type

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Added tighter validation to assigned_to and assigned_type, new tests

Fixed wrong comment

Fixed tests to include assigned_type when setting assigned_to

Add new tests for assigned_to without assigned_type

Fixed wrong comment
2024-12-02 16:53:08 +00:00
e1882ee6d2 Add comment 2024-10-21 12:21:45 -07:00
7eee239378 use is_numeric instead of is_int 2024-10-21 12:20:28 -07:00
7e1b47708e Fix failing test ensuring company id is an integer 2024-10-17 15:18:41 -07:00
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
ba69259f2d Fixed #13396 - do not allow checkout to undeployable status types
Signed-off-by: snipe <snipe@snipe.net>
2024-09-24 15:35:00 +01:00
fd7082c30f Merge branch 'develop' into bug/sc-23936 2024-07-29 14:00:00 -05:00
2a71877bec Add additional condition 2024-04-25 17:04:07 -07:00
30bd920497 Add conditional 2024-04-25 16:24:12 -07:00
1d5b48b88d Add comment and improve method 2024-04-25 16:22:15 -07:00
3a2eeaea7a WIP: Future-proof rules being converted to array syntax 2024-04-24 17:40:40 -07:00
12418ae91b WIP: allow EU style purchase cost via api 2024-04-24 17:18:29 -07:00
997eddfed1 cleanup + notes for monday 2024-04-04 18:23:03 -05:00
e1fb446888 this is a pretty good start, need to know about other PR 2024-04-04 14:20:03 -05:00
57d1c036ec Improve method name 2024-03-25 13:53:30 -07:00
71722b753d Little bit of clean up 2024-03-25 13:49:03 -07:00
a2625c889a Improve comment 2024-03-25 13:48:32 -07:00
c98b9da612 Pass last_audit_date through for model level validation if not a date 2024-03-25 13:47:24 -07:00
5f4c964309 Account for last_audit_date not being provided 2024-03-25 12:45:11 -07:00
66ba96d531 Set last_audit_date to valid format in StoreAssetRequest 2024-03-25 12:38:12 -07:00
423b636db9 Guard against non-integers being passed for company_id 2024-01-09 10:57:43 -08:00
901b1b83d0 rm code, was probably fixed through rules at some point 2024-01-02 18:27:17 -06:00
b17078fffd a couple notes 2023-11-28 22:15:13 -06:00
c886fb555b checkout on store tests almost done 2023-11-28 22:11:20 -06:00
75ac7f80b9 some refactor + tests 2023-11-28 15:17:46 -06:00
d167ec6dc0 unique undeleted recreated with laravel rule 2023-11-01 13:36:35 -05:00
e05af5216e formatting 2023-11-01 12:14:46 -05:00
3f834cb88f authorization tested in request 2023-11-01 11:43:53 -05:00
53bd5626c9 this works, need to write up pr 2023-11-01 11:33:29 -05:00
b67b00dd82 this is a start, something up with asset_tag unique rule 2023-10-31 21:06:44 -05:00