mercurial/hgweb/hgweb_mod.py
changeset 7831 b5ed0ab8cc74
parent 7740 176d3d681702
child 7873 4a4c7f6a5912
equal deleted inserted replaced
7825:6542be5df719 7831:b5ed0ab8cc74
   282         if deny_read and (not user or deny_read == ['*'] or user in deny_read):
   282         if deny_read and (not user or deny_read == ['*'] or user in deny_read):
   283             raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
   283             raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
   284 
   284 
   285         allow_read = self.configlist('web', 'allow_read')
   285         allow_read = self.configlist('web', 'allow_read')
   286         result = (not allow_read) or (allow_read == ['*'])
   286         result = (not allow_read) or (allow_read == ['*'])
   287         if not result or user in allow_read:
   287         if not (result or user in allow_read):
   288             raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
   288             raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
   289 
   289 
   290         if op == 'pull' and not self.allowpull:
   290         if op == 'pull' and not self.allowpull:
   291             raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized')
   291             raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized')
   292         elif op == 'pull' or op is None: # op is None for interface requests
   292         elif op == 'pull' or op is None: # op is None for interface requests