wwwlayermeshusa/src/access/authenticated.ts
2026-02-11 07:19:33 +01:00

10 lines
244 B
TypeScript

import type { AccessArgs } from 'payload'
import type { User } from '@/payload-types'
type isAuthenticated = (args: AccessArgs<User>) => boolean
export const authenticated: isAuthenticated = ({ req: { user } }) => {
return Boolean(user)
}