commit 84c52ec7e8a6d4d8ce3c6e9d89e1ccd207b2053e parent 52d80a4e5ceaec11b741a480d92b18b19e0e2795 Author: ms <ms@taler.net> Date: Tue, 19 Oct 2021 10:55:51 +0200 restrict public accounts list to current demobank Diffstat:
| M | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -1106,12 +1106,15 @@ val sandboxApp: Application.() -> Unit = { // [...] get("/public-accounts") { + val demobank = ensureDemobank(call.getUriComponent("demobankid")) val ret = object { val publicAccounts = mutableListOf<CustomerInfo>() } transaction { DemobankCustomerEntity.find { - DemobankCustomersTable.isPublic eq true + DemobankCustomersTable.isPublic eq true and( + DemobankCustomersTable.demobankConfig eq demobank.id + ) }.forEach { ret.publicAccounts.add( CustomerInfo(