vendure icon indicating copy to clipboard operation
vendure copied to clipboard

Assign Permission to Users per Channel

Open Draykee opened this issue 4 months ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, assigning permissions in our system is rigid and inefficient because roles are directly tied to users and channels independently. This setup forces us to create multiple roles for each channel even if they share similar permissions.

For instance, if I want to assign admin (role) permissions to a user for Channel X and only support (role) permissions for the same user on Channel Y, I must create duplicate roles for each channel, when I want to have each admin and support roles for the channels. This results in a complex and error-prone permission management process once you work with multiple channels and roles.

Describe the solution you'd like I propose a more flexible permission assignment system where roles can be assigned based on a combination of user and channel. Instead of binding a role solely to a user or a channel, we would assign roles to a pair of user + channel (UserChannelRole). This approach would allow for precise control over permissions on a per-channel basis without the need to duplicate roles across different channels. For example, a user could be assigned the 'admin' role on Channel X and 'support' on Channel Y with just a single assignment operation per channel.

image

Describe alternatives you've considered I can't think of any simpler alternative. The current alternative is to create new roles every time.

Additional context Implementing this feature would significantly streamline our permission management process, reducing administrative overhead and the potential for errors.

Draykee avatar Sep 29 '24 13:09 Draykee