diff mercurial/hgweb/hgweb_mod.py @ 2509:6350b01d173f

merge with wsgi changes.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 27 Jun 2006 00:10:41 -0700
parents d0db3462d568 b73552a00b20
children 419c42223bee
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Tue Jun 27 00:09:37 2006 -0700
+++ b/mercurial/hgweb/hgweb_mod.py	Tue Jun 27 00:10:41 2006 -0700
@@ -49,8 +49,7 @@
             self.allowpull = self.repo.ui.configbool("web", "allowpull", True)
 
     def archivelist(self, nodeid):
-        allowed = (self.repo.ui.config("web", "allow_archive", "")
-                   .replace(",", " ").split())
+        allowed = self.repo.ui.configlist("web", "allow_archive")
         for i in self.archives:
             if i in allowed or self.repo.ui.configbool("web", "allow" + i):
                 yield {"type" : i, "node" : nodeid, "url": ""}
@@ -816,7 +815,7 @@
     def do_archive(self, req):
         changeset = self.repo.lookup(req.form['node'][0])
         type_ = req.form['type'][0]
-        allowed = self.repo.ui.config("web", "allow_archive", "").split()
+        allowed = self.repo.ui.configlist("web", "allow_archive")
         if (type_ in self.archives and (type_ in allowed or
             self.repo.ui.configbool("web", "allow" + type_, False))):
             self.archive(req, changeset, type_)
@@ -844,15 +843,11 @@
 
         user = req.env.get('REMOTE_USER')
 
-        deny = self.repo.ui.config('web', 'deny_' + op, '')
-        deny = deny.replace(',', ' ').split()
-
+        deny = self.repo.ui.configlist('web', 'deny_' + op)
         if deny and (not user or deny == ['*'] or user in deny):
             return False
 
-        allow = self.repo.ui.config('web', 'allow_' + op, '')
-        allow = allow.replace(',', ' ').split()
-
+        allow = self.repo.ui.configlist('web', 'allow_' + op)
         return (allow and (allow == ['*'] or user in allow)) or default
 
     def do_unbundle(self, req):