Rename/remove default organization role names?
Is it possible to rename the default names, or exclude them if I create a custom access control? For instance, instead of "member" use "employee"?
2 Replies
yeah I believe so.
When you create custom roles for existing roles, the predefined permissions for those roles will be overridden. To add the existing permissions to the custom role, you need to import defaultStatements and merge it with your new statement, plus merge the roles' permissions set with the default roles. -# https://www.better-auth.com/docs/plugins/organization#custom-permissions
I don't think that quite answers it - I did read that, but if I want to use "employee" instead of "member", even if I create a custom role of "employee" with same permissions as "member", both will be accessible.