summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_responses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_responses.c')
-rw-r--r--src/mint/taler-mint-httpd_responses.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index ccc144e29..013cc19b8 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -172,6 +172,25 @@ TMH_RESPONSE_reply_arg_missing (struct MHD_Connection *connection,
/**
+ * Send a response indicating permission denied.
+ *
+ * @param connection the MHD connection to use
+ * @param hint hint about why access was denied
+ * @return a MHD result code
+ */
+int
+TMH_RESPONSE_reply_permission_denied (struct MHD_Connection *connection,
+ const char *hint)
+{
+ return TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_FORBIDDEN,
+ "{s:s, s:s}",
+ "error", "permission denied",
+ "hint", hint);
+}
+
+
+/**
* Send a response indicating an internal error.
*
* @param connection the MHD connection to use