https://authzed.com logo
#spicedb
Title
# spicedb
j

Joey

02/23/2022, 5:21 PM
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,
)