Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git] / bin / lists.rpc.py
index c456f35..00b498c 100755 (executable)
@@ -137,7 +137,7 @@ class BasicAuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
                               % (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)
@@ -148,7 +148,7 @@ class BasicAuthXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
             userdesc = UserDesc(forlife, name, None, 0)
             return (userdesc, perms, vhost)
         else:
-            print "no user found for uid: %s, passwd: %s" % (uid, md5)
+            print >> sys.stderr, "no user found for uid: %s, passwd: %s" % (uid, md5)
             return None
 
 ################################################################################
@@ -242,7 +242,7 @@ def list_call_dispatcher(method, userdesc, perms, vhost, *arg):
         @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"):