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