[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 06/08: implementing #7521
From: |
gnunet |
Subject: |
[libeufin] 06/08: implementing #7521 |
Date: |
Wed, 08 Feb 2023 14:32:22 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 3f175df5ce0be03e1c09f0a62e0c4236f92f4fc6
Author: MS <ms@taler.net>
AuthorDate: Wed Feb 8 14:17:51 2023 +0100
implementing #7521
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
index 0f64efa6..992346a1 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
@@ -66,7 +66,8 @@ data class CircuitContactData(
data class CircuitAccountReconfiguration(
val contact_data: CircuitContactData,
- val cashout_address: String
+ val cashout_address: String,
+ val name: String? = null
)
data class AccountPasswordChange(
@@ -530,6 +531,10 @@ fun circuitApi(circuitRoute: Route) {
allowOwnerOrAdmin(username, resourceName)
// account found and authentication succeeded
val req = call.receive<CircuitAccountReconfiguration>()
+ // Only admin's allowed to change the legal name
+ if (req.name != null && username != "admin") throw forbidden(
+ "Only admin can change the user legal name"
+ )
if ((req.contact_data.email != null) &&
(!checkEmailAddress(req.contact_data.email)))
throw badRequest("Invalid e-mail address:
${req.contact_data.email}")
if ((req.contact_data.phone != null) &&
(!checkPhoneNumber(req.contact_data.phone)))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (64c2d251 -> 6726bb63), gnunet, 2023/02/08
- [libeufin] 05/08: background jobs, gnunet, 2023/02/08
- [libeufin] 02/08: EBICS subscriber creation., gnunet, 2023/02/08
- [libeufin] 01/08: help message, gnunet, 2023/02/08
- [libeufin] 03/08: comments, gnunet, 2023/02/08
- [libeufin] 04/08: Tests environment., gnunet, 2023/02/08
- [libeufin] 06/08: implementing #7521,
gnunet <=
- [libeufin] 07/08: tests: needed to specify a correct EBICS host ID., gnunet, 2023/02/08
- [libeufin] 08/08: testing the implementation of #7521, gnunet, 2023/02/08