Skip to content

Auth._loadRoles will query the same role multiple times. #1365

Closed
@blacha

Description

@blacha

Given a role hierarchy of
role:a -> role:b -> role:c
role:a -> role:c

When loading all the roles using Auth._loadRoles for role:a, role:c will be queried for twice.

This seems to be a change in ParseServer, as the role look up Parse.com is much faster when a large number of roles are used.

In my app with a user with 100 roles, ParseServer it will generate over 1000 database queries for _Role lookups for every request.

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