Skip to content
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

Fix acl conflict with parse.com when updating acl in parse-server #1317

Closed

Conversation

carmenlau
Copy link
Contributor

refs #1150

Would like to bring up and open a discussion on the ACL compatibility problem between parse.com and parse-server. The problem is described clearly in issue #1150. This PR is going to updated the old _acl field, so that parse.com can serve the acl in right way.

Parse.com might has its plan on acl schema migration? Would like know if we need this fix in parse-server.

Thanks!

@codecov-io
Copy link

Current coverage is 93.07%

Merging #1317 into master will increase coverage by +0.03% as of 3e14a51

@@            master   #1317   diff @@
======================================
  Files           84      84       
  Stmts         5304    5312     +8
  Branches       970     973     +3
  Methods          0       0       
======================================
+ Hit           4935    4944     +9
  Partial         11      11       
+ Missed         358     357     -1

Review entire Coverage Diff as of 3e14a51

Powered by Codecov. Updated on successful CI builds.

@flovilmart
Copy link
Contributor

I'll assign @nlutsenko on that one as it's very close to the DB and I'm convinced he's the best to know what to do with it :)

@drew-gross
Copy link
Contributor

I believe Parse.com understands the new format, so maybe the thing to do is $unset the old format if it exists.

@nlutsenko
Copy link
Contributor

Need to confirm few things, but parse.com should be able to understand the new format, hence it's the one we explicitly put to handle and are migrating the data in. Will get back to you on this here.

@carmenlau
Copy link
Contributor Author

Here is my observation.

parse.com
Update: _acl, _wperm and _rperm
Read: _acl

parse-server
Update: _wperm and _rperm
Read: _wperm and _rperm

parse.com should understand the new format, as it will write the acl in both way (old and new acl). But parse.com will only read the old format and that is the problem. If we update the acl in parse-server, the acl in parse.com will be wrong.

I think unset the old format might not work. Since I tested if I create a new object in parse-server, it only contains new format acl. The acl of that object in parse.com is undefined.

If parse.com will change to read the new format, then the problem will be solved and don't need this fix.

Hope this help.

@carmenlau
Copy link
Contributor Author

Thanks all :)

@drew-gross
Copy link
Contributor

Sorry for the really late response, I finally got a chance to investigate whats going on here. This change looks like it should fix the issue, if you rebase it, I will merge. If you could add some tests, that would also be very much appreciated (but not mandatory)

@TylerBrock
Copy link
Contributor

TylerBrock commented May 16, 2016

Wait so @carmenlau is absolutely correct in saying that what needs to happen is either parse.com should be changed to read the new format OR parse-server should also write the old format (for the time being). Removing the old format by unsetting it on parse-server will not fix the issue, if I'm understanding it correctly.

@drew-gross
Copy link
Contributor

Yes that seems to be the case.

@drew-gross
Copy link
Contributor

Replaced by #1810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants