Show More
@@ -200,7 +200,7 b' class hgwebdir(object):' | |||
|
200 | 200 | wsgireq = requestmod.wsgirequest(env, respond) |
|
201 | 201 | return self.run_wsgi(wsgireq) |
|
202 | 202 | |
|
203 |
def read |
|
|
203 | def readallowed(self, ui, req): | |
|
204 | 204 | """Check allow_read and deny_read config options of a repo's ui object |
|
205 | 205 | to determine user permissions. By default, with neither option set (or |
|
206 | 206 | both empty), allow all users to read the repo. There are two ways a |
@@ -209,7 +209,7 b' class hgwebdir(object):' | |||
|
209 | 209 | allow_read is not empty and the user is not in allow_read. Return True |
|
210 | 210 | if user is allowed to read the repo, else return False.""" |
|
211 | 211 | |
|
212 | user = wsgireq.env.get('REMOTE_USER') | |
|
212 | user = req.remoteuser | |
|
213 | 213 | |
|
214 | 214 | deny_read = ui.configlist('web', 'deny_read', untrusted=True) |
|
215 | 215 | if deny_read and (not user or ismember(ui, user, deny_read)): |
@@ -329,6 +329,7 b' class hgwebdir(object):' | |||
|
329 | 329 | tmpl = None |
|
330 | 330 | |
|
331 | 331 | def makeindex(self, wsgireq, tmpl, subdir=""): |
|
332 | req = wsgireq.req | |
|
332 | 333 | |
|
333 | 334 | def archivelist(ui, nodeid, url): |
|
334 | 335 | allowed = ui.configlist("web", "allow_archive", untrusted=True) |
@@ -428,7 +429,7 b' class hgwebdir(object):' | |||
|
428 | 429 | if u.configbool("web", "hidden", untrusted=True): |
|
429 | 430 | continue |
|
430 | 431 | |
|
431 |
if not self.read |
|
|
432 | if not self.readallowed(u, req): | |
|
432 | 433 | continue |
|
433 | 434 | |
|
434 | 435 | # update time with local timezone |
@@ -480,8 +481,8 b' class hgwebdir(object):' | |||
|
480 | 481 | self.refresh() |
|
481 | 482 | sortable = ["name", "description", "contact", "lastchange"] |
|
482 | 483 | sortcolumn, descending = sortdefault |
|
483 |
if 'sort' in |
|
|
484 |
sortcolumn = |
|
|
484 | if 'sort' in req.qsparams: | |
|
485 | sortcolumn = req.qsparams['sort'] | |
|
485 | 486 | descending = sortcolumn.startswith('-') |
|
486 | 487 | if descending: |
|
487 | 488 | sortcolumn = sortcolumn[1:] |
General Comments 0
You need to be logged in to leave comments.
Login now