[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Allowing same connection name for diff
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Allowing same connection name for different users. |
Date: |
Tue, 19 Jan 2021 12:08:04 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 7367268 Allowing same connection name for different users.
7367268 is described below
commit 73672682cd5cce06a6e4132748132b77f3a3f50f
Author: MS <ms@taler.net>
AuthorDate: Tue Jan 19 12:07:33 2021 +0100
Allowing same connection name for different users.
---
integration-tests/tests.py | 22 ++++++++++++++++++++++
nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt | 3 +--
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/integration-tests/tests.py b/integration-tests/tests.py
index e063c34..08ecadd 100755
--- a/integration-tests/tests.py
+++ b/integration-tests/tests.py
@@ -405,6 +405,28 @@ def test_double_connection_name():
[406] # expecting "406 Not acceptable"
)
+ # Checking that _another_ user can pick the same connection name.
+ assertResponse(
+ post(
+ f"{PERSONA.nexus.base_url}/users",
+ auth=auth.HTTPBasicAuth("admin", "x"),
+ json=dict(username="second-user", password="second-password"),
+ )
+ )
+
+ assertResponse(
+ post(
+ f"{PERSONA.nexus.base_url}/bank-connections",
+ json=dict(
+ name=PERSONA.nexus.bank_connection, # same name from the
previous creation.
+ source="new",
+ type="ebics",
+ data=PERSONA.ebics.get_as_dict(with_url=True),
+ ),
+ auth=auth.HTTPBasicAuth("second-user", "second-password")
+ ),
+ )
+
def test_ingestion_camt53_non_singleton():
with open("camt53-gls-style-1.xml") as f:
camt = f.read()
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
index 9dc4a96..94d3263 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/DB.kt
@@ -302,14 +302,13 @@ class NexusUserEntity(id: EntityID<String>) :
Entity<String>(id) {
}
object NexusBankConnectionsTable : IdTable<String>() {
- override val id =
NexusBankConnectionsTable.text("id").entityId().uniqueIndex()
+ override val id = NexusBankConnectionsTable.text("id").entityId()
val type = text("type")
val owner = reference("user", NexusUsersTable)
}
class NexusBankConnectionEntity(id: EntityID<String>) : Entity<String>(id) {
companion object : EntityClass<String,
NexusBankConnectionEntity>(NexusBankConnectionsTable)
-
var type by NexusBankConnectionsTable.type
var owner by NexusUserEntity referencedOn NexusBankConnectionsTable.owner
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Allowing same connection name for different users.,
gnunet <=