From f737b3b02f3e840cd552ec16c357c5f81f8df8a8 Mon Sep 17 00:00:00 2001 From: Bereket Engida Date: Mon, 17 Feb 2025 08:21:33 +0300 Subject: [PATCH] docs(admin): update usage instructions to include adminUserIds option --- docs/content/docs/plugins/admin.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/content/docs/plugins/admin.mdx b/docs/content/docs/plugins/admin.mdx index fbea862753..5c3dcf41ef 100644 --- a/docs/content/docs/plugins/admin.mdx +++ b/docs/content/docs/plugins/admin.mdx @@ -67,7 +67,7 @@ The Admin plugin provides a set of administrative functions for user management ## Usage -Before performing any admin operations, the user must be authenticated with an admin account. An admin is any user assigned the `admin` role. For the first admin user, you'll need to manually assign the `admin` role to their account in your database. +Before performing any admin operations, the user must be authenticated with an admin account. An admin is any user assigned the `admin` role or any user whose ID is included in the `adminUserIds` option. ### Create User @@ -332,6 +332,16 @@ admin({ }) ``` +### Admin userIds + +You can pass an array of userIds that should be considered as admin. Default to `[]` + +```ts title="auth.ts" +admin({ + adminUserIds: ["user_id_1", "user_id_2"] +}) +``` + ### impersonationSessionDuration The duration of the impersonation session in seconds. Defaults to 1 hour.