From f74bf4da92f09cecc96b9227de0e64b2fc1c815c Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 8 Nov 2012 13:04:47 -0500 Subject: [PATCH] is_super_user_api_key: Make tabbott/extra@mit.edu a super user. (imported from commit a8bb8356c3d3ca37eb8de9ab705f400942389429) --- zephyr/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zephyr/views.py b/zephyr/views.py index 7f81ff998e..448273d1ea 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -490,9 +490,12 @@ def json_send_message(request): return send_message_backend(request, user_profile, user_profile, client_name=request.POST.get("client")) -# TODO: This should have a real superuser security check +# Currently tabbott/extra@mit.edu and starnine@mit.edu are our +# superusers. Once we migrate zephyr mirroring, we can drop +# starnine@mit.edu. TODO: Make this a real superuser security check. def is_super_user_api(request): - return request.POST.get("api-key") == "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + return request.POST.get("api-key") in ["xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"] def already_sent_mirrored_message(request): utc_from_ts = datetime.datetime.utcfromtimestamp