Mercurial > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 7575:3ccaefc84f45
hgweb: fix long line lengths introduced in 2dc868712dcc
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 03 Jan 2009 21:44:15 +0100 |
parents | 305efd897a63 |
children | 1d54e2f6c0b7 |
comparison
equal
deleted
inserted
replaced
7574:4afc3208a7b8 | 7575:3ccaefc84f45 |
---|---|
100 allow_read is not empty and the user is not in allow_read. Return True | 100 allow_read is not empty and the user is not in allow_read. Return True |
101 if user is allowed to read the repo, else return False.""" | 101 if user is allowed to read the repo, else return False.""" |
102 | 102 |
103 user = req.env.get('REMOTE_USER') | 103 user = req.env.get('REMOTE_USER') |
104 | 104 |
105 deny_read = ui.configlist('web', 'deny_read', default=None, untrusted=True) | 105 deny_read = ui.configlist('web', 'deny_read', untrusted=True) |
106 if deny_read and (not user or deny_read == ['*'] or user in deny_read): | 106 if deny_read and (not user or deny_read == ['*'] or user in deny_read): |
107 return False | 107 return False |
108 | 108 |
109 allow_read = ui.configlist('web', 'allow_read', default=None, untrusted=True) | 109 allow_read = ui.configlist('web', 'allow_read', untrusted=True) |
110 # by default, allow reading if no allow_read option has been set | 110 # by default, allow reading if no allow_read option has been set |
111 if (not allow_read) or (allow_read == ['*']) or (user in allow_read): | 111 if (not allow_read) or (allow_read == ['*']) or (user in allow_read): |
112 return True | 112 return True |
113 | 113 |
114 return False | 114 return False |