From 82cad07821bbe0bccddfd99f03979ea5e6764bc6 Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskii Date: Sun, 29 Sep 2024 23:07:34 +0200 Subject: [PATCH] Update impersonation.mdx (#854) --- app/pages/docs/impersonation.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pages/docs/impersonation.mdx b/app/pages/docs/impersonation.mdx index 5443dbd0..b95dbd9c 100644 --- a/app/pages/docs/impersonation.mdx +++ b/app/pages/docs/impersonation.mdx @@ -48,7 +48,7 @@ export const ImpersonateUserInput = z.object({ export default resolver.pipe( resolver.zod(ImpersonateUserInput), - resolver.authorize(), + resolver.authorize('admin'), // Only admins can impersonate other users async ({ userId }, ctx) => { const user = await db.user.findFirst({ where: { id: userId } }) if (!user) throw new Error("Could not find user id " + userId)