``` export const getServerSideProps = withCapabili...
# spicedb
j
Copy code
export const getServerSideProps = withCapabilities(
  withPagePermissionRequired<MyProps>(
    async () => {
      return {
        props: {
          status: 200,
        }
      }
    },
    (ctx) => Document(ctx.query.doc as string).view
  ),
  (ctx) => Document(ctx.query.doc as string).admin,
)