File tree Expand file tree Collapse file tree
src/ApiPlatform/Metadata/Resource Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ Feature: Prevent disabled users from logging in
5353 @loginSuperAdmin
5454 Scenario : A logged in user can fetch a list of all users
5555 Given there is a user with the username "another_user" password "password" and role "ROLE_USER"
56- When I send a "GET" request to "/users"
56+ When I send a "GET" request to "/users?perPage=5 "
5757 Then the response status code should be 200
5858 And the JSON node "member" should have 2 elements
59- And the JSON node "member[0].username " should be equal to "another_user "
60- And the JSON node "member[1].username " should be equal to "new_user "
59+ And the JSON node "member[0].@id " should match "/^ \/ users \/ ([a-zA-Z0-9 \- ]+)$/ "
60+ And the JSON node "member[1].@id " should match "/^ \/ users \/ ([a-zA-Z0-9 \- ]+)$/ "
6161
6262 Scenario : A successful login
6363 Given there is a user with the username "admin" password "password" and role "ROLE_ADMIN"
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ private function createMeOperation(Get $operation): Operation
7373 {
7474 return new Get (
7575 uriTemplate: '/me{._format} ' ,
76+ uriVariables: [],
7677 routePrefix: $ operation ->getRoutePrefix (),
7778 cacheHeaders: [
7879 'public ' => false ,
@@ -82,6 +83,7 @@ private function createMeOperation(Get $operation): Operation
8283 shortName: '__api_me ' ,
8384 class: $ operation ->getClass (),
8485 security: 'is_granted("IS_AUTHENTICATED_FULLY") ' ,
86+ priority: 1000 ,
8587 name: '_api_me ' ,
8688 provider: UserStateProvider::class
8789 );
You can’t perform that action at this time.
0 commit comments