Commit graph

28 commits

Author SHA1 Message Date
8eb0f2366b
remove missed default value 2026-04-26 20:43:27 +03:00
cd40483cd4
remove default values from user constructors
Forcing every call site to be explicit about admin status and
password eliminates a class of bugs where an unintended
isAdmin=false or empty passwordHash could silently slip through.
The CreateUserTest case that asserted the isAdmin default is
dropped since the default no longer exists.
2026-04-26 10:46:07 +03:00
a65c9259fa
dont cast email to string, use new value method 2026-04-26 10:19:38 +03:00
632085f5b6
inject PasswordHasher into CreateUser and AuthenticateUser
Replace direct password_hash and password_verify calls with the
injected PasswordHasher so the bcrypt cost can be substituted out
in tests. Production wiring is handled by the container's autowiring
of BcryptPasswordHasher.

This commit alone breaks the test suite because the existing tests
construct these use cases without the new dependency; the next
commit restores green by introducing FakePasswordHasher.
2026-04-26 09:06:21 +03:00
6c5833af5e
return user from create user use case 2026-04-24 13:27:15 +03:00
79d9ece2ae
add authenticate user use case 2026-04-24 13:21:02 +03:00
20e4a6ee69
add authenticate user request 2026-04-24 13:20:30 +03:00
ada29ea957
store password hash in json user repo 2026-04-24 13:19:15 +03:00
0f179e53c2
hash password in create user 2026-04-24 13:18:44 +03:00
016e98412b
add password hash to user entity 2026-04-24 13:18:33 +03:00
5093259063
add password hash to create user dto 2026-04-24 13:18:24 +03:00
261319078d
add password to create user request 2026-04-24 13:18:15 +03:00
96ad78425f
reject duplicate email in create user 2026-04-24 13:17:11 +03:00
ac461afcf0
implement find by email in json user repo 2026-04-24 13:16:41 +03:00
ee271e162e
add find by email to user repository 2026-04-24 13:16:11 +03:00
54db92a76c
persist is admin in json user repo 2026-04-24 13:15:24 +03:00
4157710187
pass is admin through create user 2026-04-24 13:14:57 +03:00
0e86af3e81
add is admin to user entity 2026-04-24 13:14:48 +03:00
affa1e7b1b
add is admin to create user dto 2026-04-24 13:14:39 +03:00
b9f7fcf148
add is admin to create user request 2026-04-24 13:14:30 +03:00
3595bcbf11
add json user repository 2026-04-24 10:24:57 +03:00
03e4781799
add @throws BadRequestException to create user 2026-04-19 23:23:26 +03:00
90a9002df0
add null guard in create user use case 2026-04-19 23:13:57 +03:00
e2c220e0ee
make CreateUserRequest email nullable 2026-04-19 23:13:42 +03:00
9c2f95eda1
add find method to user repo 2026-02-23 10:58:13 +02:00
f18d958481
create user use case with request and dto 2026-02-14 21:58:10 +02:00
6aaa8cac83
user repo with create method 2026-02-14 21:57:57 +02:00
3411e8daf0
init user 2026-02-14 21:57:48 +02:00