loopback/test
Miroslav Bajtoš cf2acb3cd2 Conflict resolution and Access control
Add end-to-end unit-tests verifying enforcement of access control during
conflict resolution.

Implement two facade methods providing REST API for Change methods used
by conflict resolution:

    PersistedModel.findLastChange
    GET /api/{model.pluralName}/{id}/changes/last

    PersistedModel.updateLastChange
    PUT /api/{model.pluralName}/{id}/changes/last

By providing these two methods on PersistedModel, replication users
don't have to expose the Change model via the REST API. What's even
more important, these two methods use the same set of ACL rules
as other (regular) PersistedModel methods.

Rework `Conflict.prototype.changes()` and `Conflict.prototype.resolve()`
to use these new facade methods.

Implement a new method `Conflict.prototype.swapParties()` that provides
better API for the situation when a conflict detected in Remote->Local
replication should be resolved locally (i.e. in the replication target).
2015-04-14 08:23:24 +02:00
..
e2e test: use 127.0.0.1 instead of localhost 2015-01-15 22:53:09 -08:00
fixtures Enable remoting for hasOne relations 2015-01-29 22:33:34 -08:00
util AccessControl for change replication 2015-04-07 19:53:58 +02:00
access-control.integration.js fix jscs errors 2014-11-21 03:35:36 +01:00
access-token.test.js Add support for app level Model isolation 2015-04-03 11:48:45 -07:00
acl.test.js Static ACL support array of properties now 2015-03-06 06:24:09 +08:00
app.test.js Add support for app level Model isolation 2015-04-03 11:48:45 -07:00
change.test.js Detect 3rd-party changes made during replication 2015-03-20 08:19:59 +01:00
checkpoint.test.js Run replication tests in the browser too 2015-03-06 14:50:16 +01:00
data-source.test.js Add support for app level Model isolation 2015-04-03 11:48:45 -07:00
email.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
geo-point.test.js Fix Geo test cases 2015-01-06 16:03:37 -08:00
hidden-properties.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
integration.test.js Add test for request pausing during authentication 2014-03-18 08:43:24 +01:00
karma.conf.js Run replication tests in the browser too 2015-03-06 14:50:16 +01:00
loopback.test.js Add `loopback.runInContext` 2015-03-27 19:12:17 +01:00
memory.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
model.application.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
model.test.js test: remove global autoAttach 2015-04-07 15:25:18 +02:00
registries.test.js Add support for app level Model isolation 2015-04-03 11:48:45 -07:00
relations.integration.js Fix the style issue 2015-04-02 08:45:04 -07:00
remote-connector.test.js test: setup GUID for all models tracking changes 2015-03-02 18:16:18 +01:00
remoting-coercion.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
remoting.integration.js Upgrade jscs to ~1.11 via grunt-jscs ^1.5 2015-02-20 15:31:15 +01:00
replication.rest.test.js Conflict resolution and Access control 2015-04-14 08:23:24 +02:00
replication.test.js AccessControl for change replication 2015-04-07 19:53:58 +02:00
rest.middleware.test.js test: remove global autoAttach 2015-04-07 15:25:18 +02:00
role.test.js fix jscs errors 2014-11-21 03:35:36 +01:00
support.js test: remove global autoAttach 2015-04-07 15:25:18 +02:00
user.test.js test: remove global autoAttach 2015-04-07 15:25:18 +02:00