Add a new model-level setting "replicationChunkSize" which allows
users to configure change replication algorithm to issue several
smaller requests to fetch changes and upload updates.
* Fix Role.isOwner() for multiple user models (ebarault)
* Update ISSUE_TEMPLATE.md (Simon Ho)
* Upgrade supertest to 3.x (Miroslav Bajtoš)
* Fix creation of verification links (Miroslav Bajtoš)
* Enable multiple user models (Eric)
* Babelify juggler for Karma tests (Miroslav Bajtoš)
* Fix Karma config to babelify node_modules too (Miroslav Bajtoš)
* Add promise support to built-in model RoleMapping (ebarault)
* Add promise support to built-in model ACL (ebarault)
* Add nyc coverage, report data to coveralls.io (Miroslav Bajtoš)
* Upgrade eslint config, fix linter errors (Miroslav Bajtoš)
* Add missing type to Role properties definition (David Hernandez)
* Preserve sessions on User.save() making no changes (Miroslav Bajtoš)
* Fix logout to handle no or missing accessToken (Ritchie Martori)
* Promise-ify built-in Role model (Miroslav Bajtoš)
* Remove .jscsrc that's no longer used (Miroslav Bajtoš)
* Enable ES6/ES2015 goodness (Miroslav Bajtoš)
* Remove test/support.js from karma config (Miroslav Bajtoš)
* Use English when running Mocha tests (Miroslav Bajtoš)
* Update ISSUE_TEMPLATE (Simon Ho)
* Updating README - add cli and remove arc (Joe Sepi)
* Fix User methods to use correct Primary Key (Aris Kemper)
* Fix User.resetPassword to call createAccessToken() (João Ribeiro)
* Role model: resolves related models by name (Benjamin Kroeger)
Fix `Role.isOwner()` to check both principalId and principalType.
This fixes a bug where users from different User model were treated
as owners as long as their user id was the same as owner's id.
Fix User.prototype.verify to call `querystring.stringify` instead
of concatenating query-string components directly.
In particular, this fixes the bug where `options.redirect` containing
a hash fragment like `#/home?arg1=value1&arg2=value2` produced incorrect
URL, because the `redirect` value was not correctly encoded.
Allow LoopBack applications to configure multiple User models and share
the same AccessToken model.
To enable this feature:
1) In your custom AccessToken model:
- add a new property "principalType" of type "string".
- configure the relation "belongsTo user" as polymorphic,
using "principalType" as the discriminator
2) In your User models:
- Configure the "hasMany accessTokens" relation as polymorphic,
using "principalType" as the discriminator
When creating custom Role and Principal instances, set your
User model's name as the value of "prinicipalType".
Fix configuration of Karma:
- Disable ES6 modules. The ES6 module transpiler is adding
"use strict" to all source files, this breaks e.g. chai or juggler
- Relax "ignore" setting to exclude only strong-task-emitter,
thus bring back Babel transpilation for chai and juggler.
Before this change, dependencies in node_modules (e.g. strong-remoting)
were not transformed to ES5 and thus crashed the tests in PhantomJS.
Note that loopback-datasource-juggler cannot be babelified to ES5
because it does not correctly support strict mode yet.
Return 401 when the request does not provide any accessToken argument
or the token was not found.
Also simplify the implementation of the `logout` method to make only
a single database call (`deleteById`) instead of `findById` + `delete`.
- Remove ES5 parser exception from .eslintrc
- Configure Karma to use Babel to transpile ES6 sources to ES5,
because PhantomJS does not support ES6
- Upgrade es5-shim to es6-shim