mercurial/hgweb/common.py
changeset 45942 89a2afe31e82
parent 45380 f0735f2ce542
child 46819 d4ba4d51f85f
equal deleted inserted replaced
45941:346af7687c6f 45942:89a2afe31e82
    49     """
    49     """
    50     return userlist == [b'*'] or username in userlist
    50     return userlist == [b'*'] or username in userlist
    51 
    51 
    52 
    52 
    53 def checkauthz(hgweb, req, op):
    53 def checkauthz(hgweb, req, op):
    54     '''Check permission for operation based on request data (including
    54     """Check permission for operation based on request data (including
    55     authentication info). Return if op allowed, else raise an ErrorResponse
    55     authentication info). Return if op allowed, else raise an ErrorResponse
    56     exception.'''
    56     exception."""
    57 
    57 
    58     user = req.remoteuser
    58     user = req.remoteuser
    59 
    59 
    60     deny_read = hgweb.configlist(b'web', b'deny_read')
    60     deny_read = hgweb.configlist(b'web', b'deny_read')
    61     if deny_read and (not user or ismember(hgweb.repo.ui, user, deny_read)):
    61     if deny_read and (not user or ismember(hgweb.repo.ui, user, deny_read)):