Files
payload/test/admin/globals/Settings.ts
Paul 01ccbd48b0 feat!: custom views are now public by default and fixed some issues with notFound page (#8820)
This PR aims to fix a few issues with the notFound page and custom views
so it matches v2 behaviour:
- Non authorised users should always be redirected to the login page
regardless if not found or valid URL
- Previously notFound would render for non users too potentially
exposing valid but protected routes and creating a confusing workflow as
the UI was being rendered as well
- Custom views are now public by default
- in our `admin` test suite, the `/admin/public-custom-view` is
accessible to non users but
`/admin/public-custom-view/protected-nested-view` is not unless the
checkbox is true in the Settings global, there's e2e coverage for this
- Fixes https://github.com/payloadcms/payload/issues/8716
2024-10-30 11:29:29 -06:00

14 lines
253 B
TypeScript

import type { GlobalConfig } from 'payload'
import { settingsGlobalSlug } from '../slugs.js'
export const Settings: GlobalConfig = {
slug: settingsGlobalSlug,
fields: [
{
type: 'checkbox',
name: 'canAccessProtected',
},
],
}