Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Sep 29, 2024
2 parents 773314d + 82cad07 commit d6ecde8
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 d6ecde8

Please sign in to comment.