We've been utilizing SuperTokens in a basic capacity, assigning roles to users and validating these roles in our API calls. However, we're looking to enhance our permission and role management with a more nuanced approach, and we have a couple of areas where we're seeking guidance:
1. User-Organization Level Roles: We understand that roles can be assigned at the user-organization level by using a "
-
" pattern instead of just the user_id. We're planning to migrate to this system for more granular control. Could you provide any migration tips or best practices to ensure a smooth transition?
2. Feature-based Permissions: We aim to assign different permissions to an organization-user based on specific features. Our current idea is to create roles and permissions (e.g., 'Feature 1', 'Feature 2') and check both the front/back-end to see if a user has, for example, the 'Editor' role and 'Feature 2' permission.
Are there any downsides on point 2's approach? If so, could you recommend the best way to implement permissions on a user-organization-feature level to maintain scalability and manageability?
Thanks in advance!