Create new roles and permissions client side

Hello, my app is based on user roles and permissions. I want to create a page where the admin user can create and manage new roles and assign permissions. However, better auth does not have a role and permission tables. Is it possible to do what I have in mind?
3 Replies
Glenn Prince
Glenn Prince21h ago
You could use the admin plugin to do most of this: https://www.better-auth.com/docs/plugins/admin
Admin | Better Auth
Admin plugin for Better Auth
Soheel
Soheel7h ago
I’m fairly certain that’s not an option for @Filippo, as the plugin’s configuration appears to be immutable at runtime. That said, it’s generally possible to add your own tables to the database and handle role and permission checks manually. The admin plugin does offer a predefined set of roles and rules, but since these are static and must be configured ahead of time, it might be more flexible to implement your own access control system alongside better-auth.
Ping
Ping1h ago
Yeah it's not currently possible. However I'm sure it will in the future.

Did you find this page helpful?