From 253d220ea54d45557f33dd3a7affef0e79593218 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 30 Jun 2015 22:09:15 +0200 Subject: towards implementing #3851: /admin/add/incoming --- src/mint/taler-mint-httpd_responses.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mint/taler-mint-httpd_responses.c') 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 @@ -171,6 +171,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. * -- cgit v1.2.3