Commit Graph

1868 Commits

Author SHA1 Message Date
Miroslav Bajtoš c7d07b6600 Merge pull request #3103 from strongloop/backport/preserve-current-access-token
Preserve current session when invalidating tokens
2017-01-16 12:00:08 +01:00
Miroslav Bajtoš afd6dd7073 Preserve current session when invalidating tokens
Fix User model to preserve the current session (provided via
"options.accessToken") when invalidating access tokens after a change
of email or password property.
2017-01-16 11:02:29 +01:00
Miroslav Bajtoš f8b013dab8 Clean up access-token-invalidation tests 2017-01-16 10:39:49 +01:00
Miroslav Bajtoš dc2b6530b7 2.37.0
* Emit resetPasswordRequest event with options (Sergey Reus)
 * Fix false emailVerified on user model update (박대선)
 * Add new flag injectOptionsFromRemoteContext (Miroslav Bajtoš)
 * Contextify DAO and relation methods (Miroslav Bajtoš)
 * Implement new http arg mapping optionsFromRequest (Miroslav Bajtoš)
 * Fix package.json CI downstreamIgnoreList nesting (David Cheung)
2017-01-09 12:58:30 +01:00
Miroslav Bajtoš f64721a447 Merge pull request #3073 from strongloop/backport/resetPasswordRequest-options
Emit resetPasswordRequest event with options
2017-01-05 16:00:09 +01:00
Sergey Reus 5233dcb557 Emit resetPasswordRequest event with options 2017-01-05 15:36:01 +01:00
Miroslav Bajtoš 0caee53f6b Merge pull request #3072 from strongloop/backport/email-verified-fix
Fix false emailVerified on user model update
2017-01-05 11:38:16 +01:00
박대선 659e9ce09b Fix false emailVerified on user model update
We noticed that every time the user model updates, the emailVerified
column would change to false, even though the email was not changed
at all.

I took a look and realized there might be an error in
https://github.com/strongloop/loopback/commit/eb640d8

The intent of the commit just mention is to make emailVerified false
when the email gets changed, but notice that ctx.data.email is null
on updates, so the condition is always met and emailVerified always
becomes false.

This commit fixes the issue just mentioned.
2017-01-05 11:08:35 +01:00
Miroslav Bajtoš 6e3fc24121 Merge pull request #3048 from strongloop/backport/options-from-context-2x
Inject remoting context to options arg
2017-01-05 10:58:46 +01:00
Miroslav Bajtoš 74bb1daf8a Add new flag injectOptionsFromRemoteContext
Hide the new "options" arguments behind a feature flag
injectOptionsFromRemoteContext that is disabled by default for backwards
compatibility.

Fix construction of sharedCtor remoting metadata to prevent the
situation when we are configuring remoting metadata after
strong-remoting has already picked up data from our parent (base) model.
2017-01-05 10:18:56 +01:00
Miroslav Bajtoš 693d52fc59 Contextify DAO and relation methods
Modify remoting metadata of data-access methods in PersistedModel
and relation method in Model and add an "options" argument to "accepts"
list.
2017-01-05 10:18:56 +01:00
Miroslav Bajtoš ee106e4e15 Implement new http arg mapping optionsFromRequest
Define a new Model method "createOptionsFromRemotingContext" that allows
models to define what "options" should be passed to methods invoked
via strong-remoting (e.g. REST).

Define a new http mapping `http: 'optionsFromRequest'` that invokes
`Model.createOptionsFromRemotingContext` to build the value from
remoting context.

This should provide enough infrastructure for components and
applications to implement their own ways of building the "options"
object.
2017-01-05 10:18:56 +01:00
David Cheung 65a3a0b110 Merge pull request #3067 from strongloop/fix-packagejson-wrong-ci-config
Fix package.json CI downstreamIgnoreList nesting
2017-01-03 17:05:40 -05:00
David Cheung d53d069763 Fix package.json CI downstreamIgnoreList nesting
in packge.json strongloop/loopback#3000 ci should be a root element
instead of under config:ci
2017-01-03 15:23:57 -05:00
Simon Ho 9c3d596106 2.36.2
* Add option disabling periodic change rectification (kobaska)
 * Release LTS LB2 (Simon Ho)
 * Invalidate AccessTokens on password change (Miroslav Bajtoš)
 * Fix registration of operation hooks in User model (Miroslav Bajtoš)
 * Remove "options.template" from Email payload (Miroslav Bajtoš)
 * Opt-out downstream builds that are unstable (David Cheung)
 * Allow password reset request for users in realms (Bram Borggreve)
 * Add "returnOnlyRoleNames" option to Role.getRoles (Eric)
 * Fix context within listByPrincipalType role method (codyolsen)
 * Add templateFn option to User#verify() (Adrien Kiren)
 * Add options to bulkUpdate (Kogulan Baskaran)
 * Require verification after email change (Loay)
 * adding check of string for case insensitive emails (Dhaval Trivedi)
 * Fix PR template to not link all PRs to #49 (#2887) (Miroslav Bajtoš)
2016-12-21 17:54:34 -08:00
Miroslav Bajtoš 18a89e556a Merge pull request #2960 from kobaska/avoid-cleanup
Avoid periodic cleanup/rectification of changes
2016-12-21 16:13:27 +01:00
kobaska b3a5bc739b Add option disabling periodic change rectification
When `Model.settings.changeCleanupInterval` is set to a negative value,
no periodic cleanup is performed at all.
2016-12-21 15:39:08 +01:00
Simon Ho fe1c0b605b Release LTS LB2 2016-12-20 11:32:12 -08:00
Miroslav Bajtoš 5200b28deb Merge pull request #3021 from strongloop/fix/session-expiry-2x
Invalidate AccessTokens on password change
2016-12-12 14:59:16 +01:00
Miroslav Bajtoš 4ee086dcd0 Invalidate AccessTokens on password change
Invalidate all existing sessions (delete all access tokens)
after user's password was changed.
2016-12-12 13:58:20 +01:00
Miroslav Bajtoš 66e4e5be4a Merge pull request #3015 from strongloop/fix/repeated-user-hooks-2x
Fix registration of operation hooks in User model [2.x]
2016-12-09 14:52:06 +01:00
Miroslav Bajtoš 01b2faf14a Fix registration of operation hooks in User model
Operation hooks are inherited by subclassed models, therefore they must
be registered outside of `Model.setup()` function.

This commit fixes this problem in the built-in User model.

There are not tests verifying this change, as writing a test would be
too cumbersome and not worth the cost IMO.
2016-12-09 14:21:38 +01:00
Miroslav Bajtoš 9bea50c5e2 Merge pull request #3007 from strongloop/backport/email-template-in-transport
Remove "options.template" from Email payload
2016-12-07 12:32:11 +01:00
Miroslav Bajtoš 4d41c67c54 Remove "options.template" from Email payload
Fix User.confirm to exclude "options.template" when sending the
confirmation email. Certain nodemailer transport plugins are rejecting
such requests.
2016-12-07 10:54:17 +01:00
David Cheung 956f035482 Merge pull request #3000 from strongloop/opt-out-broken-downstream-2.x
Opt-out downstream builds that are unstable
2016-12-06 14:08:48 -05:00
David Cheung a759286330 Opt-out downstream builds that are unstable
repos that are opting out are not a good indicator of stability of
this module, and are failing
2016-12-06 10:35:13 -05:00
David Cheung 1fa785f66f Merge pull request #2980 from fullcube/bb/password-reset-realms
Allow password reset request for users in realms
2016-12-05 15:26:09 -05:00
Bram Borggreve e7831f6c4d
Allow password reset request for users in realms 2016-11-30 16:57:59 -05:00
Miroslav Bajtoš 63df861753 Merge pull request #2993 from strongloop/backport/returnOnlyRoleNames
Add "returnOnlyRoleNames" option to Role.getRoles
2016-11-30 17:23:20 +01:00
Eric a4a96eb39f Add "returnOnlyRoleNames" option to Role.getRoles
Currently the return type of Role.getRoles() method is inconsistent:
role names are returned for smart roles and role ids are returned for
static roles (configured through user-role mapping).

This commit adds a new option to Role.getRoles() allowing the caller
to request role names to be returned for all types of roles.
2016-11-30 17:10:41 +01:00
Miroslav Bajtoš c0e96ffa12 Merge pull request #2940 from kobaska/add-optional-options-to-bulkupdate
Add options to bulkUpdate
2016-11-15 17:34:06 +01:00
Miroslav Bajtoš 007b20df0c Merge pull request #2944 from strongloop/feature/role-context-2x
Fix context within listByPrincipalType role method
2016-11-15 16:59:35 +01:00
codyolsen d99d608876 Fix context within listByPrincipalType role method
- Fix for current implimentation that returned all models that had any
  assigned roles. Context was not carried into listByPrincipalType,
  setting roleId as null.
2016-11-15 16:27:56 +01:00
Miroslav Bajtoš 586fa1cebb Merge pull request #2938 from strongloop/feature/verify-template-fn-2x
Add templateFn option to User#verify()
2016-11-15 14:17:32 +01:00
Adrien Kiren 5c1558f969 Add templateFn option to User#verify() 2016-11-15 13:46:35 +01:00
Kogulan Baskaran bc923bd781 Add options to bulkUpdate 2016-11-15 13:02:23 +11:00
Loay d06190dae6 Merge pull request #2927 from strongloop/backport/require-verification-email-change
Backport/Require verification after email change
2016-11-09 13:09:33 -05:00
Loay 67e5c6ec1e Require verification after email change
When the User model is configured to require email verification,
then any change of the email address should trigger re-verification.
2016-11-09 11:51:37 -05:00
Loay d61e173d6f Merge pull request #2914 from strongloop/backport-email-case-sensitive
[backport #2912] adding check of string for case insensitive emails
2016-11-04 23:25:01 -04:00
Dhaval Trivedi 6e880137e4 adding check of string for case insensitive emails 2016-11-04 10:35:08 -04:00
Simon Ho 1915d09424 Merge pull request #2890 from strongloop/backport/fix/pr-template
Fix PR template to not link all PRs to #49 (#2887)
2016-10-24 17:44:31 -07:00
Miroslav Bajtoš f80b27880e Fix PR template to not link all PRs to #49 (#2887)
- Add comment with syntax examples
- Remove direct links to #49 in section header

Backport of #2887
2016-10-24 17:10:02 -07:00
Miroslav Bajtoš 4cb9f0d74d 2.36.0
* Need index on principalId for performance. (#2883) (#2884) (Simon Ho)
 * Remove redundant items in PR template (#2877) (#2878) (Simon Ho)
 * Refactor PR template based on feedback (#2865) (#2874) (Simon Ho)
 * Add pull request template (#2843) (#2862) (Simon Ho)
 * Fix description of updateAll response (Miroslav Bajtoš)
2016-10-24 10:40:26 +02:00
Simon Ho 3e0fd94f60 Need index on principalId for performance. (#2883) (#2884)
Backport of #2883
2016-10-21 16:31:33 -07:00
Simon Ho df13b094bb Remove redundant items in PR template (#2877) (#2878)
- Remove sign CLA since CI already shows unsigned CLAs
- Remove all tests must pass CI since we have to check each on a case by
  case basis anyways
- Update example to include linking to the current repo using number
  sign (ie. #49 in addition to org/repo#49)

Backport of #2877
2016-10-19 18:25:04 -07:00
Simon Ho 809ba35fdb Refactor PR template based on feedback (#2865) (#2874)
Updated based on feedback received during sprint demo.

Backport of #2865
2016-10-18 23:53:43 -07:00
Simon Ho f97906d397 Add pull request template (#2843) (#2862)
Backport of #2843
2016-10-17 09:02:24 -07:00
Miroslav Bajtoš f9cd880eaa Merge pull request #2846 from strongloop/fix/metadata-update-delete-all-2x
Fix description of updateAll response
2016-10-17 14:10:46 +02:00
Miroslav Bajtoš 060630aad6 2.35.0
* Reword ticking checkbox note in issue template (#2855) (Simon Ho)
 * Add how to tick checkbox in issue template (#2851) (#2853) (Simon Ho)
 * Use GitHub issue templates (#2810) (#2852) (Simon Ho)
 * Allow tokens with eternal TTL (value -1) (Miroslav Bajtoš)
 * Update ja and nl translation files (Candy)
 * Fix support for remote hooks returning a Promise (Tim van der Staaij)
 * Validate non-email property partial update (Loay)
 * Update translation files - round#2 (Candy)
 * Update tests to use registry for model creation (gunjpan)
 * Call new disable remote method from model class. (Richard Pringle)
 * Temporarily disable Karma tests on Windows CI (Miroslav Bajtoš)
 * Add translation files for 2.x (Candy)
 * Allow resetPassword if email is verified (Loay)
 * Add docs for KeyValue model (Simon Ho)
 * Invalidate sessions after email change (Loay)
 * Upgrade loopback-testing to the latest ^1.4 (Miroslav Bajtoš)
2016-10-13 10:12:11 +02:00
Simon Ho 446d2a5078 Reword ticking checkbox note in issue template (#2855)
Backport of #2854
2016-10-12 18:03:09 -07:00