gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]