Show More
@@ -165,8 +165,9 b' class hgweb(object):' | |||
|
165 | 165 | ctype = tmpl('mimetype', encoding=self.encoding) |
|
166 | 166 | ctype = templater.stringify(ctype) |
|
167 | 167 | |
|
168 |
# check |
|
|
169 | self.check_perm(req, None) | |
|
168 | # check read permissions non-static content | |
|
169 | if cmd != 'static': | |
|
170 | self.check_perm(req, None) | |
|
170 | 171 | |
|
171 | 172 | if cmd == '': |
|
172 | 173 | req.form['cmd'] = [tmpl.cache['default']] |
@@ -288,7 +289,7 b' class hgweb(object):' | |||
|
288 | 289 | raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized') |
|
289 | 290 | |
|
290 | 291 | if op == 'pull' and not self.allowpull: |
|
291 |
raise ErrorResponse(HTTP_ |
|
|
292 | raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized') | |
|
292 | 293 | # op is None when checking allow/deny_read permissions for a web-browser request |
|
293 | 294 | elif op == 'pull' or op is None: |
|
294 | 295 | return |
@@ -35,7 +35,7 b' def copyfile(src, dst, basedir):' | |||
|
35 | 35 | except IOError: |
|
36 | 36 | raise util.Abort( |
|
37 | 37 | _("cannot create %s: unable to create destination directory") |
|
38 |
% dst) |
|
|
38 | % dst) | |
|
39 | 39 | |
|
40 | 40 | util.copyfile(abssrc, absdst) |
|
41 | 41 |
@@ -2,11 +2,11 b' adding a' | |||
|
2 | 2 | updating working directory |
|
3 | 3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
4 | 4 | % expect error, cloning not allowed |
|
5 | abort: error: | |
|
5 | abort: authorization failed | |
|
6 | 6 | requesting all changes |
|
7 | 7 | % serve errors |
|
8 | 8 | % expect error, pulling not allowed |
|
9 | abort: error: | |
|
9 | abort: authorization failed | |
|
10 | 10 | pulling from http://localhost/ |
|
11 | 11 | searching for changes |
|
12 | 12 | % serve errors |
General Comments 0
You need to be logged in to leave comments.
Login now