Meteor-Community-Packages/meteor-roles

Add new function to change scope of existing role assignment

Open

#382 opened on Oct 15, 2023

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (161 forks)batch import
enhancementgood first issue

Repository metrics

Stars
 (919 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Add a new function that would accept userId, targetRole and newScope which would then go and change the scope of the assigned role to the newScope. Right now if I want to just change scope I need to remove role and then add it again. For use cases where user can be assigned the same role into multiple scopes, the function should fail if it finds more than one results or have an optional parameter to define the previous scope.

Thoughts?

Contributor guide