mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
docs(fix): import name conflict in admin plugin roles example (#1948)
This commit is contained in:
@@ -362,7 +362,7 @@ the plugin providers easy way to define your own set of permission for each role
|
|||||||
Once you have created the roles you can pass them to the organization plugin both on the client and the server.
|
Once you have created the roles you can pass them to the organization plugin both on the client and the server.
|
||||||
|
|
||||||
```ts title="auth.ts"
|
```ts title="auth.ts"
|
||||||
import { ac, admin, user } from "@/auth/permissions"
|
import { ac, admin as adminRole, user } from "@/auth/permissions"
|
||||||
import { betterAuth } from "better-auth"
|
import { betterAuth } from "better-auth"
|
||||||
import { admin } from "better-auth/plugins"
|
import { admin } from "better-auth/plugins"
|
||||||
|
|
||||||
@@ -371,7 +371,7 @@ the plugin providers easy way to define your own set of permission for each role
|
|||||||
admin({
|
admin({
|
||||||
ac: ac,
|
ac: ac,
|
||||||
roles: {
|
roles: {
|
||||||
admin,
|
admin: adminRole,
|
||||||
user,
|
user,
|
||||||
myCustomRole
|
myCustomRole
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user