Generate sessionToken with linkWith (#5799)

* Generate sessionToken with linkWith

* improve test

* Add comment
This commit is contained in:
Diamond Lewis
2019-07-10 15:23:16 -05:00
committed by peril-parse-community[bot]
parent 9816285205
commit 5341b8248f
2 changed files with 17 additions and 1 deletions

View File

@@ -802,7 +802,8 @@ RestWrite.prototype.createSessionTokenIfNeeded = function() {
if (this.className !== '_User') {
return;
}
if (this.query) {
// Don't generate session for updating user (this.query is set) unless authData exists
if (this.query && !this.data.authData) {
return;
}
if (