Skip to content

Commit

Permalink
Update impersonation.mdx (#854)
Browse files Browse the repository at this point in the history
  • Loading branch information
cherniavskii authored Sep 29, 2024
1 parent a083bb6 commit 82cad07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pages/docs/impersonation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 82cad07

Please sign in to comment.