-
-
Notifications
You must be signed in to change notification settings - Fork 735
Remove isLazy property in ParseUser #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
// This will set the unresolvedUser in acl | ||
acl.setReadAccess(unresolvedUser, true); | ||
acl.setWriteAccess(unresolvedUser, true); | ||
|
||
unresolvedUser.setObjectId("test"); | ||
acl.resolveUser(unresolvedUser); | ||
unresolvedUser.setObjectId("test"); |
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.
What's the reasoning we need this?
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.
Sorry, I'll remove this.
@lukas1994 just a few questions |
LGTM If you could squash and rebase on master, I can merge! |
We always have the invariant: lazy == true <==> objectId == null && authData.get("anonymous") != null So we can remove the additional property. For testing: to get the "lazy" user behavior we need to make sure that the user has no objectId and we need to set "anonymous" authData (see setLazy() in ParseACLTest.java).
Remove isLazy property in ParseUser
Fixes integration test failures caused by #52 We strip anonymity in `signUp` and `linkWith` before calling into `saveAsync` where there's a fork in logic for `isLazy()`. Since we now determine `isLazy()` based off `objectId != null && ParseAnonymousUtils.isLinked(this)`, `isLazy()` returns the incorrect value for these logic paths. The solution is to get the value of `isLazy()` before stripping anonymity and passing it through to `saveAsync()`.
Fixes integration test failures caused by #52 We strip anonymity in `signUp` and `linkWith` before calling into `saveAsync` where there's a fork in logic for `isLazy()`. Since we now determine `isLazy()` based off `objectId != null && ParseAnonymousUtils.isLinked(this)`, `isLazy()` returns the incorrect value for these logic paths. The solution is to get the value of `isLazy()` before stripping anonymity and passing it through to `saveAsync()`.
Fixes integration test failures caused by #52 We strip anonymity in `signUp` and `linkWith` before calling into `saveAsync` where there's a fork in logic for `isLazy()`. Since we now determine `isLazy()` based off `objectId != null && ParseAnonymousUtils.isLinked(this)`, `isLazy()` returns the incorrect value for these logic paths. The solution is to get the value of `isLazy()` before stripping anonymity and passing it through to `saveAsync()`. * Callers of resolveLazinessAsync never use it's return value, might as well make it Void * Make signUp more robust by reverting current user's password on failure if that's how it originally was * Make signUp more robust by reverting the current user's password on success
@lukas1994 updated the pull request. |
We always have the invariant:
lazy == true
<==>objectId == null && authData.get("anonymous") != null
So we can remove the additional property.
For testing: to get the "lazy" user behavior we need to make sure that the user has no
objectId
and we need to set "anonymous"authData
(seesetLazy()
inParseACLTest.java
).