Skip to content

Roles (ACL) not working properly #3833

@polo2244

Description

@polo2244

Issue Description

Performing this code in the cloud gives an object not found error.
var query = new Parse.Query('classname'); query.get('hVYmCOi7M9').then(function(object) { ...

---Details----
I have a User (a7MTQFYXA9) belonging to a role (admins).
and object (hVYmCOi7M9) with ACL (r/w to admins role).
I have a cloud function (templateTest) that takes an objectId (in our test case hVYmCOi7M9) from ios SDK and retrieves this object, and returns a response of the task to be completed.

ROLE
screen shot 2017-05-19 at 5 48 34 pm

ROLE USERS
screen shot 2017-05-19 at 5 48 52 pm

OBJECT
screen shot 2017-05-19 at 5 49 32 pm

OBJECT ACL
screen shot 2017-05-19 at 5 49 27 pm

Note:
Not restricting the ACL of the object to the role and adding (public read) retrieves the object with no errors. So this may be an Role thing bug

Steps to reproduce

Please read the explanation above.

Expected Results

Object to be retrieved successfully.

Actual Outcome

Error object not found

Environment Setup

  • Server

    • parse-server version 2.4.0
    • Operating System: Mac
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? Localhost
  • Database

    • MongoDB version: 3.4.3
    • Storage engine: Default (GridStore)
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? Localhost

Logs/Trace

error: Failed running cloud function templateTest for user a7MTQFYXA9 with: Input: {"theObjectId":"hVYmCOi7M9"} Error: {"code":141,"message":{"code":101,"message":"Object not found."}}

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