fixtest: GET my dynamic entity endpoint gets records the user created,

not just records with hasPersonalEntity=true. Previous behaviour was
confusing.
This commit is contained in:
simonredfern 2026-01-21 09:42:47 +01:00
parent c0a0dfed0b
commit aaf04ee036

View File

@ -1725,20 +1725,20 @@ class DynamicEntityTest extends V400ServerSetup {
}
{
Then("User1 get my foobar, only return his own records, only one")
Then("User1 get my foobar, returns his own records (including those created via non-/my endpoints)")
val requestGetFoobars = (dynamicEntity_Request / "my" / "FooBar").GET <@ (user1)
val responseGetFoobars = makeGetRequest(requestGetFoobars)
responseGetFoobars.code should equal(200)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
}
{
Then("User2 get my foobar, only return his own records, only one")
Then("User2 get my foobar, returns his own records (including those created via non-/my endpoints)")
val requestGetFoobars = (dynamicEntity_Request / "my" / "FooBar").GET <@ (user2)
val responseGetFoobars = makeGetRequest(requestGetFoobars)
responseGetFoobars.code should equal(200)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
}
{
@ -1851,20 +1851,20 @@ class DynamicEntityTest extends V400ServerSetup {
}
{
Then("User1 get my foobar, only return his own records, only one")
Then("User1 get my foobar, returns his own records (including those created via non-/my endpoints)")
val requestGetFoobars = (dynamicEntity_Request / "banks" / testBankId1.value / "my" / "FooBar").GET <@ (user1)
val responseGetFoobars = makeGetRequest(requestGetFoobars)
responseGetFoobars.code should equal(200)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
}
{
Then("User2 get my foobar, only return his own records, only one")
Then("User2 get my foobar, returns his own records (including those created via non-/my endpoints)")
val requestGetFoobars = (dynamicEntity_Request / "banks" / testBankId1.value / "my" / "FooBar").GET <@ (user2)
val responseGetFoobars = makeGetRequest(requestGetFoobars)
responseGetFoobars.code should equal(200)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(1)
(responseGetFoobars.body \ "foo_bar_list").asInstanceOf[JArray].arr.size should be(2)
}
{