commit 62c06c1b78c7a1525d95bffd328ec5edf23b8a8b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Jan 13 16:47:59 2015 +0100
Require the admin to provide a message when denying a request
pkgdb2client/admin.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/pkgdb2client/admin.py b/pkgdb2client/admin.py
index 78c20c1..5b7c6c1 100644
--- a/pkgdb2client/admin.py
+++ b/pkgdb2client/admin.py
@@ -257,11 +257,15 @@ def __handle_request_package(actionid, action):
)
elif decision in ('deny', 'd'):
+ message = raw_input(
+ 'Could you explain why you declined this request? (this message '
+ 'will be sent to the user)\n=>')
data = PKGDBCLIENT.handle_api_call(
'/admin/action/status',
data={
'id': actionid,
- 'status': 'Denied'
+ 'status': 'Denied',
+ 'message': message,
}
)
@@ -305,11 +309,15 @@ def __handle_request_branche(actionid, action):
)
elif decision in ('deny', 'd'):
+ message = raw_input(
+ 'Could you explain why you declined this request? (this message '
+ 'will be sent to the user)\n=>')
data = PKGDBCLIENT.handle_api_call(
'/admin/action/status',
data={
'id': actionid,
- 'status': 'Denied'
+ 'status': 'Denied',
+ 'message': message,
}
)