commit 0da70eb44628f541ac6f56bd97de6a81eb8808cb
parent 955fbd70559dbabe05fdbc475b0fd42cc74389c2
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 16 Nov 2025 21:26:30 +0100
implement new DEFAULT_PERSONA option (#10581)
Diffstat:
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
@@ -134,6 +134,8 @@ char *TMH_helper_sms;
char *TMH_allowed_payment_targets;
+char *TMH_default_persona;
+
char *TMH_payment_target_regex;
regex_t TMH_payment_target_re;
@@ -3062,6 +3064,15 @@ run (void *cls,
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
"merchant",
+ "DEFAULT_PERSONA",
+ &TMH_default_persona))
+ {
+ TMH_default_persona = GNUNET_strdup ("expert");
+ }
+
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ "merchant",
"PAYMENT_TARGET_REGEX",
&TMH_payment_target_regex))
{
diff --git a/src/backend/taler-merchant-httpd.h b/src/backend/taler-merchant-httpd.h
@@ -741,6 +741,11 @@ extern char *TMH_helper_sms;
extern char *TMH_allowed_payment_targets;
/**
+ * Default persona to use for new browsers.
+ */
+extern char *TMH_default_persona;
+
+/**
* Regular expression further restricting payment target types.
* Can be NULL/empty for no restrictions.
*/
diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c
@@ -43,7 +43,7 @@
* #MERCHANT_PROTOCOL_CURRENT and #MERCHANT_PROTOCOL_AGE in
* merchant_api_get_config.c!
*/
-#define MERCHANT_PROTOCOL_VERSION "23:0:11"
+#define MERCHANT_PROTOCOL_VERSION "23:1:11"
/**
@@ -122,6 +122,8 @@ MH_handler_config (const struct TMH_RequestHandler *rh,
TMH_currency),
GNUNET_JSON_pack_string ("payment_target_types",
TMH_allowed_payment_targets),
+ GNUNET_JSON_pack_string ("default_persona",
+ TMH_default_persona),
GNUNET_JSON_pack_allow_null (
GNUNET_JSON_pack_string ("payment_target_regex",
TMH_payment_target_regex)),