Closed
Description
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.