Commit 66aa6d42 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add a method to return the mailman password (I should rename this to

collab_password). I'm using this from the event scheduler so it can
access the per-experiment DB to store the event trace.

I suppose it would have been easier to stick them in a file?
parent 3d73eff6
......@@ -585,6 +585,30 @@ class user:
value=result,
output=str(result))
#
# Return collab password,
#
def collabpassword(self, version, argdict):
if version != self.VERSION:
return EmulabResponse(RESPONSE_BADVERSION,
output="Client version mismatch!")
try:
checknologins()
pass
except NoLoginsError, e:
return EmulabResponse(RESPONSE_REFUSED, output=str(e))
res = DBQueryFatal("select mailman_password from users where uid=%s",
(self.uid,))
if len(res) == 0:
return EmulabResponse(RESPONSE_ERROR,
output="No such user!")
passwd = res[0][0]
return EmulabResponse(RESPONSE_SUCCESS, value=passwd)
pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment