You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/11/07 21:21:11 UTC
[GitHub] wohali commented on a change in pull request #1721: Copy _security
object in couchup; python3 fix
wohali commented on a change in pull request #1721: Copy _security object in couchup; python3 fix
URL: https://github.com/apache/couchdb/pull/1721#discussion_r231681046
##########
File path: rel/overlay/bin/couchup
##########
@@ -172,6 +172,25 @@ def _put_filter(args, db=None):
print(exc.response.text)
exit(1)
+def _do_security(args, db=None):
+ """Copies the _security object from source to target DB."""
+ try:
+ req = requests.get(
+ 'http://127.0.0.1:{}/{}/_security'.format(
+ args['local_port'], db),
+ auth=args['creds'])
+ req.raise_for_status()
+ security_doc = _tojson(req)
+ req = requests.put(
+ 'http://127.0.0.1:{}/{}/_security'.format(
+ args['clustered_port'], db),
+ data=json.dumps(security_doc),
Review comment:
@nickva requests automatically does this for us :heart: I actually tested the code.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services