Skip to content

PFRole. Creating and Retrieving issues. #402

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
polo2244 opened this issue Feb 14, 2016 · 6 comments
Closed

PFRole. Creating and Retrieving issues. #402

polo2244 opened this issue Feb 14, 2016 · 6 comments

Comments

@polo2244
Copy link

I am using Heroku with mongolab with my migration.
I Migrated my existing app, i just didn't press Finalize on parse. But all my database and classes are available on mongolab.
I have successfully, created and retrieved objects using Terminal and iOS SDK with Heroku api, but for some reason whenever i Query, or create a role (using iOS and Logged in) i get this error:
[Clients aren't allowed to perform the create operation on the role collection. (Code: 119, Version: 1.12.0)]

Also, i was not able to Retrieve any Previously created objects (That have ACLs restriction on Roles) even if the User is in that Role. (Which used to work on api.parse.com)

@flessard
Copy link
Contributor

In parse-server you can't query or create on role collection without masterkey.
You can create a cloud function where you can retrieve or create the role by using the function useMasterKey.

@gfosco
Copy link
Contributor

gfosco commented Feb 14, 2016

@flessard is correct, in ParseServer the masterKey is required... It's possible that we made the wrong assumption here during development. What was the context here for accessing roles from the client, and how were they secured?

@polo2244
Copy link
Author

Thank you @flessard . We haven't made changed to the iOS app yet, and we thought that a mistake from our part was made. We will start modifying the app and adding a Cloud function to fix this issue.

@gfosco , regarding the use of roles. There is a section in the app that can control a bunch of Objects (under the role's ACL). A query to that role was made to decide whether to show a 'Manage' button in the app. (or a query to all the Roles the User is in can be made to know how to manage the Dashboard in our application. To add a set of actions that that specific user can do. eg. 'Manage', 'Create', 'Edit', 'Delete' )** i hope that this answers your question.**

Nevertheless, this issue can be can be easily fixed with a Cloud call to Return all the Role names the User is in.

@gfosco
Copy link
Contributor

gfosco commented Feb 14, 2016

Ok, maybe the ability to query can be added again in the future... Glad you're happy with the workaround though. Thanks. 👍

@gfosco gfosco closed this as completed Feb 14, 2016
@georgesjamous
Copy link
Contributor

@gfosco hello.
I stumbled upon this issue my self. There were Roles that when the User calling the Cloud function should not READ or WRITE (due to ACLs). But the roles were retrieved and modified regardless of this fact because we have to use the *masterKey = YES. *

_So my request is, to enable the query to the Role class from the client side (in cloud code JS at least) to be able to use our architecture as we did on parse.com .
As there are no downsides for this because the Roles should be secured using ACLs and we all did that because query to Role class was allowed with parse.com before .

If you would like some usage examples, of how this can be implemented please let me know.
or if this cannot be re-implemented, also let me know.
Thank you.

@hclviv
Copy link

hclviv commented Apr 28, 2016

Team,

I am getting the same issue with the iOS SDK ver 1.12.0. I migrate my Parse data to Amazon with Mango DB support, below is my error
[Clients aren't allowed to perform the create operation on the role collection. (Code: 119, Version: 1.12.0)]

The same functionality is working fine with iOS SDK 1.7.5 with Parse but after migrating to AWS and making changes in client framework app is unable to create role.

I think Parse team remove role creation support from iOS SDK ver 1.12.0 ? is that correct

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

5 participants