##// END OF EJS Templates
config: rename allow_push to allow-push...
David Demelier -
r35029:6ef744a7 default
parent child Browse files
Show More
@@ -4695,7 +4695,7 b' def serve(ui, repo, **opts):'
4695
4695
4696 Please note that the server does not implement access control.
4696 Please note that the server does not implement access control.
4697 This means that, by default, anybody can read from the server and
4697 This means that, by default, anybody can read from the server and
4698 nobody can write to it by default. Set the ``web.allow_push``
4698 nobody can write to it by default. Set the ``web.allow-push``
4699 option to ``*`` to allow everybody to push to the server. You
4699 option to ``*`` to allow everybody to push to the server. You
4700 should use a real web server if you need to authenticate users.
4700 should use a real web server if you need to authenticate users.
4701
4701
@@ -1010,7 +1010,8 b" coreconfigitem('web', 'allow-pull',"
1010 alias=[('web', 'allowpull')],
1010 alias=[('web', 'allowpull')],
1011 default=True,
1011 default=True,
1012 )
1012 )
1013 coreconfigitem('web', 'allow_push',
1013 coreconfigitem('web', 'allow-push',
1014 alias=[('web', 'allow_push')],
1014 default=list,
1015 default=list,
1015 )
1016 )
1016 coreconfigitem('web', 'allowzip',
1017 coreconfigitem('web', 'allowzip',
@@ -2260,7 +2260,7 b' For a quick setup in a trusted environme'
2260 you want it to accept pushes from anybody, you can use the following
2260 you want it to accept pushes from anybody, you can use the following
2261 command line::
2261 command line::
2262
2262
2263 $ hg --config web.allow_push=* --config web.push_ssl=False serve
2263 $ hg --config web.allow-push=* --config web.push_ssl=False serve
2264
2264
2265 Note that this will allow anybody to push anything to the server and
2265 Note that this will allow anybody to push anything to the server and
2266 that this should not be used for public servers.
2266 that this should not be used for public servers.
@@ -2290,13 +2290,13 b' The full set of options is:'
2290 ``allow-pull``
2290 ``allow-pull``
2291 Whether to allow pulling from the repository. (default: True)
2291 Whether to allow pulling from the repository. (default: True)
2292
2292
2293 ``allow_push``
2293 ``allow-push``
2294 Whether to allow pushing to the repository. If empty or not set,
2294 Whether to allow pushing to the repository. If empty or not set,
2295 pushing is not allowed. If the special value ``*``, any remote
2295 pushing is not allowed. If the special value ``*``, any remote
2296 user can push, including unauthenticated users. Otherwise, the
2296 user can push, including unauthenticated users. Otherwise, the
2297 remote user must have been authenticated, and the authenticated
2297 remote user must have been authenticated, and the authenticated
2298 user name must be present in this list. The contents of the
2298 user name must be present in this list. The contents of the
2299 allow_push list are examined after the deny_push list.
2299 allow-push list are examined after the deny_push list.
2300
2300
2301 ``allow_read``
2301 ``allow_read``
2302 If the user has not already been denied repository access due to
2302 If the user has not already been denied repository access due to
@@ -2390,7 +2390,7 b' The full set of options is:'
2390 push is not denied. If the special value ``*``, all remote users are
2390 push is not denied. If the special value ``*``, all remote users are
2391 denied push. Otherwise, unauthenticated users are all denied, and
2391 denied push. Otherwise, unauthenticated users are all denied, and
2392 any authenticated user name present in this list is also denied. The
2392 any authenticated user name present in this list is also denied. The
2393 contents of the deny_push list are examined before the allow_push list.
2393 contents of the deny_push list are examined before the allow-push list.
2394
2394
2395 ``deny_read``
2395 ``deny_read``
2396 Whether to deny reading/viewing of the repository. If this list is
2396 Whether to deny reading/viewing of the repository. If this list is
@@ -75,7 +75,7 b' def checkauthz(hgweb, req, op):'
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
General Comments 0
You need to be logged in to leave comments. Login now