Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/common.py @ 45957:89a2afe31e82
formating: upgrade to black 20.8b1
This required a couple of small tweaks to un-confuse black, but now it
works. Big formatting changes come from:
* Dramatically improved collection-splitting logic upstream
* Black having a strong (correct IMO) opinion that """ is better than '''
Differential Revision: https://phab.mercurial-scm.org/D9430
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 27 Nov 2020 17:03:29 -0500 |
parents | f0735f2ce542 |
children | d4ba4d51f85f |
comparison
equal
deleted
inserted
replaced
45956:346af7687c6f | 45957: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)): |