Skip to content

Improve performance for retriving all rolesNames for roleIds in Auth.js #9735

Closed
@abubkr-hago

Description

@abubkr-hago

Current Limitation

The current implementation for resolving user roles and their nested roles performs multiple iterations over two collections (the _Role and _User relations).
This approach can lead to inefficiencies, especially when dealing with deep or complex role hierarchies.


Feature / Enhancement Description

Optimize the role resolution logic by reducing the number of iterations and database queries.
Introduce a more efficient mechanism to recursively resolve nested roles, potentially using $graphLookup aggregation pipeline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:duplicateDuplicate of already reported issuetype:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions