Skip to content

ParseObject save will remove acl control. #129

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

Closed
zakiso opened this issue Mar 18, 2019 · 11 comments
Closed

ParseObject save will remove acl control. #129

zakiso opened this issue Mar 18, 2019 · 11 comments

Comments

@zakiso
Copy link

zakiso commented Mar 18, 2019

image

8704D58B-CAED-448B-B27B-B1B88EB202A8
hi @phillwiggins
When I insert a new object with ACL,the ACL key and value will be removed.
How to add ACL control when I save my object? Thanks

@phillwiggins
Copy link
Member

phillwiggins commented Mar 18, 2019 via email

@zakiso
Copy link
Author

zakiso commented Mar 18, 2019

    var obj = ParseObject("MyClass");
    obj.setObjectData(this.toMap());
    obj.set("ACL", {
      currentUser.objectId: {"read": true, "write": true}
    });
    var result = await obj.save();

@phillwiggins
Copy link
Member

phillwiggins commented Mar 18, 2019 via email

@zakiso
Copy link
Author

zakiso commented Mar 18, 2019

Ok Thank you very much 💯

@zakiso
Copy link
Author

zakiso commented Mar 18, 2019

Hi. @phillwiggins I have another question. I already created a acl object on my server. But when I query it, cannot read it. What should I do when send request?
My ACL setting is only creator can read and write it. Then I use same user query it, can't find it.
Maybe I should read the parse server docs, But I can't find some useful info. If you can give me some advice? Thanks a lot.

@phillwiggins
Copy link
Member

Hey, I'm not sure on the querying ACL, although I have now added a correction so it should be sent if you want to test the v1.0.16 branch straight in your project? If you could let me know if that worked it would be great.

Thanks

@zakiso
Copy link
Author

zakiso commented Mar 18, 2019

hi
You are just comment this line? //map.remove(keyVarAcl);
I already test it. Now it corrected. Save object with ACL will create a acl object to server.It ok.
But I still cannot query object with acl.

@danibjor
Copy link

Did you, in Parse.initialize(), set
autoSendSessionId: true

@zakiso
Copy link
Author

zakiso commented Mar 18, 2019

I’m not set it.
Tomorrow I will try it and report the result here.

@zakiso
Copy link
Author

zakiso commented Mar 19, 2019

it worked. Perfectly 😀

@phillwiggins
Copy link
Member

Thanks @danibjor for resolving.

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

No branches or pull requests

3 participants