Skip to content

PFRole. Creating and Retrieving issues. #402

Description

@polo2244

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)

Activity

  1. flessard commented on Feb 14, 2016

    @flessard
    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.

  2. gfosco commented on Feb 14, 2016

    @gfosco
    Contributor

    @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?

  3. polo2244 commented on Feb 14, 2016

    @polo2244
    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.

  4. gfosco commented on Feb 14, 2016

    @gfosco
    Contributor

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

  5. georgesjamous commented on Feb 22, 2016

    @georgesjamous
    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.

  6. hclviv commented on Apr 28, 2016

    @hclviv

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions