acdf703d80
scope text endpoints by ownership
...
TextRepository gains findByUser; JsonTextRepository and the
fake implement filtering by stored userId. TextController
splits the list endpoint into getMyTexts (own) and
getAllTexts (admin), and getText now requires the session
user, returning 403 to non-owners while admins bypass.
2026-05-02 21:42:51 +03:00
4635fef3c7
persist user id in json text repository
...
store userId in the json record and rehydrate the User via
UserRepository. throws DomainException if the referenced user
no longer exists.
2026-05-02 21:27:40 +03:00
bac8323806
extract user from session in text controller
...
prevent payload from spoofing ownership by reading the user
from the request attribute set by auth middleware. respond 401
when unauthenticated.
2026-05-02 21:27:36 +03:00
bf006220e8
pass user object to create text use case
...
drop UserRepository dependency; controller now passes the
authenticated User directly via CreateTextRequest, eliminating
a redundant repository lookup.
2026-05-02 21:27:32 +03:00
ffef0ddff6
add user property to text entity
2026-05-02 21:27:28 +03:00
6009fb7ddd
refactor create text controller to catch BadRequestException
2026-04-19 23:38:23 +03:00
920f8ad768
add @throws BadRequestException to create text
2026-04-19 23:23:11 +03:00
f77101e4e9
add null guard in create text use case
2026-04-19 23:12:07 +03:00
ab023315a9
make CreateTextRequest name nullable
2026-04-19 23:11:52 +03:00
189493b045
php cs fixer
2026-04-19 23:07:48 +03:00
38d06fce43
refactor getNodes into a new NodeController and update refs
2026-04-17 11:29:55 +03:00
acdfc14442
create root node on text creation
2026-04-17 11:03:10 +03:00
d4f5b22034
add method to get nodes of text id in text controller
2026-04-17 11:00:36 +03:00
85ab8f2bbc
add getText method to text controller
2026-04-17 09:54:21 +03:00
4fe10214d5
change fn to function -- style
2026-04-17 09:53:50 +03:00
ec32ca0103
Add TextController for texts API
2026-04-15 20:46:56 +03:00
e9195fe991
implement text repo for json files
2026-04-12 22:05:10 +03:00
878e4840a2
add getAll method to text repo
2026-04-12 21:54:31 +03:00
424d46104b
fix test warning for undefined array key by using array_find
2026-02-21 21:09:08 +02:00
df7ce696a9
add id to text and find method to text repo
2026-02-20 12:02:00 +02:00
0998c70160
dto for passing to create method of text repo
2026-02-19 21:00:46 +02:00
a95a8838f6
create text with request dto
2026-02-19 21:00:28 +02:00
6c9abb01d4
text repo
2026-02-19 21:00:16 +02:00
accfa9d04f
init text entity
2026-02-19 20:59:25 +02:00