This repository has been archived by the owner on Feb 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Use Agent for admin authentication handling instead of custom handling on Fixtures #212
Merged
jcsmorais
merged 1 commit into
sugarcrm:master
from
jcsmorais:replace-fixtures-admin-handling
Sep 21, 2017
Merged
Use Agent for admin authentication handling instead of custom handling on Fixtures #212
jcsmorais
merged 1 commit into
sugarcrm:master
from
jcsmorais:replace-fixtures-admin-handling
Sep 21, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 similar comment
rhoggSugarcrm
approved these changes
Sep 20, 2017
}); | ||
// Use chakram.post to bulk create the record(s). | ||
bulkRecordCreateDef.requests.push(request); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The block of code from line 319 ~ 334 is the same as the original, except for indentation. This make this commit change more code than it needed (functionally).
index.js
Outdated
let url = utils.constructUrl(VERSION, left._module, left.id, 'link'); | ||
let params = {headers: this._headers}; | ||
let url = [left._module, left.id, 'link'].join('/'); | ||
let params = { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space between an empty object? In fact, the params argument is optional for the "post" per the doc of Chakram, and we don't modify it anywhere. @rhoggSugarcrm said we are aware of this.
yli-sugarcrm
approved these changes
Sep 20, 2017
jcsmorais
changed the title
Replace fixtures custom admin handling by
Use Agent for admin authentication handling instead of custom handling on Fixtures
Sep 20, 2017
Agent.as(Agent.ADMIN)
…g on Fixtures (fixes #145)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some users are currently experiencing intermittent failures with the following error:
Cannot read property '_module' of undefined
.That seems to be related with Fixtures having its own way of handling user authentication for admin users, which might lead into conflicts and unexpected errors if admin users try to log in twice, where the second login ends up invalidating the refresh token from the first login.
This PR is replacing the custom authentication handling for admin users on Fixtures side and making use of the
Agent
abstraction instead.This is also related and should fix what has been reported on: #145