Skip to content

Class with CLP using _Role plus a CLP using _User pointer not working as expected #1953

Closed
@brianyyz

Description

@brianyyz

A class that has CLPs of a Role and of a User pointer only returns data to the User pointer client.

To recreate

Create a class Rides which has an attribute rideOwnerId which is a pointer to _User.

Using the browser create a Role called generalUser.

Set the permissions for Rides using the data browser as follows:

  • Public: no access
  • generalUser (_Role): Get, Find, Create
  • rideOwnerId (_User): All

On api.parse.com this works as one would expect e.g. a client belonging to generalUser can retrieve Rides but cannot update any Ride - only the client who is the rideOwnerId can update their Ride.

on parse server this doesn't work. The generalUser (_Role) CLP works alone, however, when I add the rideOwnerId (_User) CLP only the rideOwnerId can retrieve Rides. Queries by other clients who are part of generalUser return an empty array.

  • Server
    • parse-server version: 2.2.10
    • Operating System: OSX 10.11.5
    • Hardware: MBP
    • Localhost
  • Database
    • MongoDB version: 3.2.4
    • Storage engine: wiredtiger
    • Hardware: MBP
    • Localhost

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.
I can provide targeted logs but there are no errors and the only behaviour is that with only the Role CLP the results array is populated and with both the Role and the User CLP the results array is empty.

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