PLATAL_DOMAIN = get_config('Mail', 'domain')
PLATAL_DOMAIN2 = get_config('Mail', 'domain2', '')
sys.stderr.write('PLATAL_DOMAIN = %s\n' % PLATAL_DOMAIN )
+sys.stderr.write("MYSQL_DB = %s\n" % MYSQL_DB)
VHOST_SEP = get_config('Lists', 'vhost_sep', '_')
ON_CREATE_CMD = get_config('Lists', 'on_create', '')
% (PLATAL_DOMAIN, uid, md5))
if res:
name, forlife, perms = res
- if vhost != PLATAL_DOMAIN:
+ if vhost != PLATAL_DOMAIN and perms != 'admin':
res = mysql_fetchone ("""SELECT m.uid, IF(m.perms = 'admin', 'admin', 'lists')
FROM group_members AS m
INNER JOIN groups AS g ON (m.asso_id = g.id)
userdesc = UserDesc(forlife, name, None, 0)
return (userdesc, perms, vhost)
else:
+ print >> sys.stderr, "no user found for uid: %s, passwd: %s" % (uid, md5)
return None
################################################################################
@root: the handler requires site admin rights
"""
try:
- print "calling method: %s" % method
+ print >> sys.stderr, "calling method: %s" % method
if has_annotation(method, "root") and perms != "admin":
return 0
if has_annotation(method, "mlist"):
if not is_member and (mlist.subscribe_policy > 1):
is_pending = list_call_locked(is_subscription_pending, userdesc, perms, mlist, False)
if is_pending is 0:
- return 0
+ return None
host = mlist.internal_name().split(VHOST_SEP)[0].lower()
details = {
""" List the members of a list.
@mlist
"""
- details, members = get_list_info(userdesc, perms, mlist)
+ infos = get_list_info(userdesc, perms, mlist)
+ if infos is None:
+ return None
+ details, members = infos
members.sort()
members = map(lambda member: (get_name(member), member), members)
return (details, members, mlist.owner)