diff options
| -rw-r--r-- | share/www/script/test/replicator_db.js | 3 | ||||
| -rw-r--r-- | src/couchdb/couch_js_functions.hrl | 6 | 
2 files changed, 6 insertions, 3 deletions
diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js index 2810352c..48e5d5c6 100644 --- a/share/www/script/test/replicator_db.js +++ b/share/www/script/test/replicator_db.js @@ -676,7 +676,8 @@ couchTests.replicator_db = function(debug) {        var repDoc = {          _id: "foo_rep_doc",          source: dbA.name, -        target: dbB.name +        target: dbB.name, +        continuous: true        };        T(CouchDB.login("fdmanana", "qwerty").ok); diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl index 0cc49d62..1e3ed4e9 100644 --- a/src/couchdb/couch_js_functions.hrl +++ b/src/couchdb/couch_js_functions.hrl @@ -140,8 +140,10 @@          var isReplicator = (userCtx.roles.indexOf('_replicator') >= 0);          var isAdmin = (userCtx.roles.indexOf('_admin') >= 0); -        if (oldDoc && !newDoc._deleted && !isReplicator) { -            reportError('Only the replicator can edit replication documents.'); +        if (oldDoc && !newDoc._deleted && !isReplicator && +            (oldDoc._replication_state === 'triggered')) { +            reportError('Only the replicator can edit replication documents ' + +                'that are in the triggered state.');          }          if (!newDoc._deleted) {  | 
