Mercurial > hg-stable
comparison mercurial/hgweb/common.py @ 35061:6ef744a7df65
config: rename allow_push to allow-push
As part of ConfigConsolidationPlan [1], rename the option according to
the new UI guidelines [2] and add an alias for backward compatibility.
[1]: https://www.mercurial-scm.org/wiki/ConfigConsolidationPlan
[2]: https://www.mercurial-scm.org/wiki/UIGuideline#adding_new_options
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 19 Oct 2017 11:46:41 +0200 |
parents | baee5512f262 |
children | d18c0cf5f3ab |
comparison
equal
deleted
inserted
replaced
35060:da5d5ea7d696 | 35061:6ef744a7df65 |
---|---|
73 | 73 |
74 deny = hgweb.configlist('web', 'deny_push') | 74 deny = hgweb.configlist('web', 'deny_push') |
75 if deny and (not user or ismember(hgweb.repo.ui, user, deny)): | 75 if deny and (not user or ismember(hgweb.repo.ui, user, deny)): |
76 raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') | 76 raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') |
77 | 77 |
78 allow = hgweb.configlist('web', 'allow_push') | 78 allow = hgweb.configlist('web', 'allow-push') |
79 if not (allow and ismember(hgweb.repo.ui, user, allow)): | 79 if not (allow and ismember(hgweb.repo.ui, user, allow)): |
80 raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') | 80 raise ErrorResponse(HTTP_UNAUTHORIZED, 'push not authorized') |
81 | 81 |
82 # Hooks for hgweb permission checks; extensions can add hooks here. | 82 # Hooks for hgweb permission checks; extensions can add hooks here. |
83 # Each hook is invoked like this: hook(hgweb, request, operation), | 83 # Each hook is invoked like this: hook(hgweb, request, operation), |