Permissions type not updating after creating ac and adding to organization plugin.
Hi, I believe this is a bug, even after adding my own permissions.ts, and adding ac and all of the roles to my auth.ts and auth-client.ts, it shows that the only permissions available are the 3 default ones built into the plugin. Is there any more setup that needs to be done that I'm missing? I've looked through the source of better-auth and cant pinpoint the issue

19 Replies
the guide has been updated
Organization | Better Auth
The organization plugin allows you to manage your organization's members and teams.
I’ll try it out again, I was following this steps on the beta branch
Still getting type error with all new styeps

No type error when doing this, but only recognizes the default permissions, not the ones i specificied

can you show me how you added ac and roles on your auth config and your auth client?
Pretty stumped still
oh will take a look now
Thank you!
are you on canary?
if not please update first and let me know if it's still an issue
I’m on latest at the time I posted, let me update rq
Still same issue on canary
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Very interesting
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
I have no idea how or why, but my types in my ac are now being recognized for my roles and permissions, and I had to modify the hasPermission to include a body request. No type errors now
:blobshrug:
https://github.com/better-auth/better-auth/pull/616
Made a pr, after checking source, thats definitley the schema it wants you to follow
GitHub
Fix error in docs by salvinoto · Pull Request #616 · better-auth/be...
Update hasPermission to show correct syntax
oh nice
merged :))
Awesome!
One thing I'm trying to get, whats the objective of passing in the role, isnt it supposed to grab the role from the current user and check against it?
like for example, if im specifying the role on the client, couldnt they just easily change the role and grant access?