3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 22:05:51 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
0f215bbcf8 fix: replace deprecated Symfony Request::get() usage 2025-12-17 18:44:04 -08:00
695c9d070f Require int for department and company ids when creating user via api 2025-03-05 11:32:04 -08:00
abb4221539 Validation rules to prevent switchng user companies if assets are assigned
Signed-off-by: snipe <snipe@snipe.net>
2024-08-29 14:55:18 +01:00
da1e383295 Use the null-safe property accessor for new-user creation 2024-08-29 14:09:23 +01:00
70e5e0f9df get rid of dd 2024-08-16 12:52:06 -05:00
f031309f8f set up api controller for route/model binding 2024-08-14 16:09:15 -05:00
20ec420ba3 not quite done, api side needs some work 2024-08-14 13:53:29 -05:00
4caa501996 Relax property type check 2023-09-07 13:28:32 -07:00
899c2eb19b Implement test case 2023-09-07 12:34:50 -07:00
cd5546e4a1 Fixed wonky switch statement indenting
Signed-off-by: snipe <snipe@snipe.net>
2023-02-06 12:44:17 -08:00
934afa036f Adopt Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions.

You may customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config file to your project root. Feel free to use [Shift's Laravel ruleset][2] to help you get started.

[1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer
[2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200
2021-06-10 20:15:52 +00:00
d03d4deef9 Temp fix for #8561 - manager_id validation error 2020-10-23 11:55:53 -07:00
b3fe47bfa7 Remove/Reorganize logic to make codacy happier. 2020-05-23 15:24:10 -04:00
039f5da0e1 Add image upload to user edit [ch10508] (#7877)
* Use correct Request include

* Updated to use additional form request

* Added SVG sanitizer

* Added response method to form request

* Allow ImageUploadRequest to accept fieldname params, added SVG sanitization, fixed delete

* Fixed upload path for avatars

* Added fieldname variable to blade partial for image upload

* Added enctype="multipart/form-data"  to form to allow uploads

* Added image field

* Updated Request::old() to use $request->old()

* Fixed derp in edit blade referring to $item when it should be $user

* Added svg+xml to image rule
2020-03-05 18:00:24 -08:00
55ee90b25d Fixes #7252 form request changes (#7272)
* Fixes for #7252 - custom fields not validating / no validaton messages in API w/form requests

* Removed debug info

* More fixes for #7252

This is mostly working as intended, if not yet the way Laravel wants us to do it.

Right now, the API returns correctly, and the form UI will return highlighted errors, with the input filled in ~sometimes~. I’m not sure why it’s only sometimes yet, but this is potentially progress.

* Removed experimental method

* Check for digits_between:0,240 for warranty

* Removed debug code
2019-07-18 14:32:23 -07:00
35ebe33e4e Fixed #6703 - fixes password confirmation (#6711)
* Fixed #6703 - fixes password confirmation

* Removed debugging

* Fixed tests

* I guess we use 10 as the settings for password min in tests

* One more try to fix tests - confirmation won’t validate until password validates
2019-02-13 23:01:19 -08:00
c23955d0b5 Allow setting of "ldap_import" through the API (#5218)
* Allow setting of "ldap_import" through the API, this will allow cusom scripts to be made to import data from Active directory using the API, this would allow any field to be filled such as the manager (based on the ID), department etc.

* Password fix for LDAP through API
2018-04-20 14:02:52 -07:00
e0fe383815 Removed debug message in SaveUserRequest 2017-10-24 19:18:53 -07:00
8a9960f830 Fixed missing break that would override password requirement 2017-10-24 16:56:46 -07:00
48e6208214 Fixes #3907 - do not require username on user if LDAP import 2017-08-31 10:43:36 -07:00
a0cbca85bf Fixes for API calls for password complexity stuff 2017-08-22 21:15:35 -07:00
9bda62d295 ADDED: Password rules for complexity, min length, rejecting common passwords 2017-08-22 20:32:39 -07:00
cd28b012b3 Remove last name requirement in save user request 2016-08-30 06:47:38 -07:00
c07ad03e74 Removed unique from form request 2016-07-28 09:16:30 -07:00
75eb2bbe09 Janky-ass form request stuff 2016-06-06 21:02:06 -07:00
75dfb87671 Use form request for user add/edit to handle password and password confirmation 2016-06-06 14:15:50 -07:00