Commit Graph

139 Commits

Author SHA1 Message Date
Setogit 77364a93f0 Apply g.f to literal strings
[back-port of #2684]
2016-08-29 10:48:12 -07:00
Benjamin Kroeger ecd881a0f3 streamline use if `self` 2016-08-25 10:39:44 +02:00
Benjamin Kroeger c538aa764d resolve related models from correct registry
Also modify setup of test servers when ACL was used, force the app
to `loadBuiltinModels` with localRegistry.
2016-08-25 10:39:44 +02:00
Miroslav Bajtoš b221af7cf6 KeyValueModel: add API for listing keys
- Expose "keys()" at "GET /keys"
 - Add a dummy implementation for "iterateKeys" to serve a useful error
   message when the model is not attached correctly.
2016-08-18 13:34:29 +02:00
Miroslav Bajtoš 7932d75c44 Revert globalization of Swagger descriptions 2016-08-16 14:02:41 +02:00
Amir Jafarian e562137807 Expose `Replace*` methods
*Re-mapping `updateAttributes` endpoint to use
`PATCH` and `PUT`(configurable) verb
*Exposing `replaceById` and `replaceOrCreate` via
`POST` and `PUT`(configurable) verb
2016-08-15 12:17:36 -04:00
Loay d8aa6bdf00 Add bcrypt validation
https://github.com/strongloop/loopback/pull/2580
2016-08-15 09:55:23 -04:00
Miroslav Bajtoš 99dc1f9541 common: add KeyValueModel 2016-08-10 15:30:15 +02:00
Candy 3767940472 Backport of #2407 2016-08-05 11:55:32 -04:00
Miroslav Bajtoš fea3b781a0 Update dependencies to their latest versions 2016-08-05 10:54:42 +02:00
Miroslav Bajtoš 895629632f test: use local registry in test fixtures
Use local registry in test fixtures to prevent collision in globally
shared models.

Fix issues discoverd in auth implementation where the global registry
was used instead of the correct local one.
2016-07-27 15:06:32 +02:00
Loay 619372e51e Backport/Fix security issue 580 2016-07-25 11:06:19 -04:00
Jue Hou 8fe77b2a06 Fix description for User.prototype.hasPassword 2016-06-17 17:35:28 -04:00
Loay 4480cd92ab Fix verificationToken bug #2440 2016-06-17 11:16:06 -04:00
Simon Ho 14aed2251c Merge pull request #2317 from strongloop/backport/change-all-hrefs-in-verification-email
Update user.js
2016-05-10 17:15:23 -07:00
juehou 8fef4845f8 Resolver support return promise 2016-05-10 18:00:42 -04:00
Rik 7868803711 Update user.js
allow to change all {href} instances in user.verify() mail into generated url instead of just one
2016-05-09 12:32:05 -07:00
Supasate Choochaisri 4798b2f8c9 Add feature to not allow duplicate role name
- Also fix jshint error in backported test
2016-05-05 10:51:28 -07:00
Ryan Graham 4d6f2e7ab7
update/insert copyright notices 2016-05-03 17:10:46 -07:00
Miroslav Bajtoš cae9786f0e Fix role.isOwner to support app-local registry 2016-05-03 14:39:29 +02:00
Jue Hou 7a54da5870 Promisify Model Change
* Change.diff
* Change.findOrCreateChange
* Change.rectifyModelChanges
* Change.prototype.currentRevision
* Change.prototype.rectify
2016-02-04 16:01:45 -05:00
Miroslav Bajtoš a0a1083564 Hide verificationToken
We should never be showing this publically.

Adds unit test for hiding verification token.

This is a back-port of pull request #1851 from gausie/patch-4
2016-02-04 16:27:03 +01:00
Amir Jafarian 8deec2e89a Checkpoint speedup 2016-01-19 10:28:53 -05:00
Miroslav Bajtoš 1b765922c9 Merge pull request #1860 from strongloop/fix/replication-performance
Fix replication performance
2015-12-08 19:32:57 +01:00
Miroslav Bajtoš 62d2b0bf0d change: skip cp lookup on no change
Modify `Change.rectify` to look up the current checkpoint only when
there was actually some change made.

This should improve the performance of `rectifyAll` when called from a
regular timer and there were no changes made since the last call.
Before this commit, `rectifyAll` would perform N calls of
`Checkpoint.current` where N is the number of model instances. With
this commit in place, no call is made.
2015-12-08 17:54:26 +01:00
Miroslav Bajtoš 6d040a98ae Merge pull request #1804 from richardpringle/master
Add case-sensitive email option for User model
2015-12-08 12:47:58 +01:00
Miroslav Bajtoš d2aaca7460 Change: correctly rectify no-change
Modify `Change.rectify()` to not make any changes to the Change instance
(most notably to not modify the `checkpoint` field) when the tracked
model instance was not changed.

This should improve the performance of change replication as it reduces
the number of unnecessary replications.

For example, before this commit, every run of `rectifyAll` would
trigger a full sync of all clients, because all change instances would
be moved to the current checkpoint.
2015-12-07 14:13:25 +01:00
David Cheung c4917819af Adding properties description for User Model
- Added description for `realm` `created` `lastUpdated` `status`
- End of line for descriptions to be peroid
2015-12-04 14:55:01 -05:00
Richard Pringle 2cca83c4ff Add case-sensitve email option for User model. 2015-12-03 13:18:49 -05:00
Simo Moujami 403e677155 Fix user.resetPassword to fail on email not found 2015-11-02 12:55:24 +01:00
Samuel Gaus 351b8026a0 Do not include redundant ports in verify links
If the protocol and port match we can ignore the port for a more
visually appealing link.
2015-10-12 16:24:30 +02:00
wusuopu ce48521efb Set application's id property only if it's empty.
Fix `Application.resetKeys()` to reset instance id only if it is not
already set. This fixes a bug where each call of resetKeys created
a new instance.
2015-10-12 11:23:33 +02:00
Felipe Oliveira Carvalho 355ff8ee41 Update comment about user ACL to reflect implementation 2015-09-11 21:57:55 -03:00
Farid Nouri Neshat 1cc25923a7 Fix options.to assertion message in user.verify 2015-08-27 00:25:09 +08:00
Raymond Feng 06cece038e Merge pull request #1584 from strongloop/feature/add-more-acl-utils
Enhance the ACL related models
2015-08-13 09:00:32 -07:00
Raymond Feng 3eb8dd55f6 Add util methods to ACL and clean up related model resolutions 2015-08-13 08:58:41 -07:00
Pradnya Baviskar 2ee7c94a4e Promisify 'Application' model 2015-08-12 09:15:24 +02:00
Miroslav Bajtoš 004baad44c Merge pull request #1501 from digitalsadhu/master
Add missing . to user model property descriptions
2015-08-06 09:40:22 +02:00
Miroslav Bajtoš aa5c9e3628 Merge pull request #1493 from PradnyaBaviskar/issue418-userModel
Promisify User model
2015-08-04 10:32:44 +02:00
Raymond Feng 66d5cc07e0 Merge pull request #1465 from FreeCodeCamp/fix/no-password
fix: exit early when password is non-string
2015-07-29 15:12:43 -07:00
Berkeley Martinez 68fd106510 fix exit early when password is non-string
closes #1437
2015-07-29 13:14:06 -07:00
Pradnya Baviskar dc987a59a9 Promisify User model 2015-07-14 13:01:46 +05:30
Miroslav Bajtoš 5ec7fd51e2 Merge pull request #1416 from strongloop/feature/searchDefaultTokenKeys
Config option: (do not) search default token keys
2015-07-09 18:03:41 +02:00
Richard Walker 83dca3e838 Add missing . to user model property descriptions 2015-07-04 22:30:45 +02:00
Raymond Feng 77bcc09107 Merge branch 'master' of https://github.com/esco/loopback into esco-master 2015-05-29 16:44:18 -07:00
Owen Brotherwood 86ed4721a5 access-token: add option "searchDefaultTokenKeys"
Set this option to false to prevent AccessToken from checking default
places like "access_token" in query.
2015-05-29 12:06:31 +02:00
Alexandru Savin f70c209526 Pass the full options object to the email send method in user verification process. 2015-05-06 15:52:07 +02:00
Miroslav Bajtoš da50d6ffb0 Merge pull request #1332 from strongloop/fix/user-login-include
Fix remoting metadata for User.login#include
2015-04-28 08:08:25 +02:00
Miroslav Bajtoš 03d9f64c82 Fix remoting metadata for User.login#include
Change the type of the "include" argument to "string array".

The type used to be "string" before and thus requests sending multiple
include items were technically incorrect.
2015-04-24 08:58:30 +02:00
Raymond Feng bdc741520e Disable inclusion of User.accessTokens 2015-04-20 11:44:07 -07:00