is_super_user_api_key: Make tabbott/extra@mit.edu a super user.

(imported from commit a8bb8356c3d3ca37eb8de9ab705f400942389429)
This commit is contained in:
Tim Abbott
2012-11-08 13:04:47 -05:00
parent 97ce892e8d
commit f74bf4da92

View File

@@ -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