nickva commented on a change in pull request #1721: Copy _security object in 
couchup; python3 fix
URL: https://github.com/apache/couchdb/pull/1721#discussion_r231680682
 
 

 ##########
 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:
   Do we need to set `headers = {'Content-type': 'application/json'}`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to