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
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
import type { Config } from 'payload'
|
|
|
|
export const slugSingularLabel = 'Post'
|
|
|
|
export const slugPluralLabel = 'Posts'
|
|
|
|
export const customViewPath = '/custom-view'
|
|
|
|
export const customNestedViewPath = `${customViewPath}/nested-view`
|
|
|
|
export const publicCustomViewPath = '/public-custom-view'
|
|
|
|
export const protectedCustomNestedViewPath = `${publicCustomViewPath}/protected-nested-view`
|
|
|
|
export const customParamViewPathBase = '/custom-param'
|
|
|
|
export const customParamViewPath = `${customParamViewPathBase}/:id`
|
|
|
|
export const customViewTitle = 'Custom View'
|
|
|
|
export const customParamViewTitle = 'Custom Param View'
|
|
|
|
export const customNestedViewTitle = 'Custom Nested View'
|
|
|
|
export const customEditLabel = 'Custom Edit Label'
|
|
|
|
export const customTabLabel = 'Custom Tab Label'
|
|
|
|
export const customTabViewPath = '/custom-tab-component'
|
|
|
|
export const customTabViewTitle = 'Custom View With Tab Component'
|
|
|
|
export const customTabLabelViewTitle = 'Custom Tab Label View'
|
|
|
|
export const customTabViewComponentTitle = 'Custom View With Tab Component'
|
|
|
|
export const customNestedTabViewPath = `${customTabViewPath}/nested-view`
|
|
|
|
export const customCollectionMetaTitle = 'Custom Meta Title'
|
|
|
|
export const customRootViewMetaTitle = 'Custom Root View Meta Title'
|
|
|
|
export const customDefaultTabMetaTitle = 'Custom Default Tab Meta Title'
|
|
|
|
export const customVersionsTabMetaTitle = 'Custom Versions Tab Meta Title'
|
|
|
|
export const customViewMetaTitle = 'Custom Tab Meta Title'
|
|
|
|
export const customNestedTabViewTitle = 'Custom Nested Tab View'
|
|
|
|
export const customCollectionParamViewPathBase = '/custom-param'
|
|
|
|
export const customCollectionParamViewPath = `${customCollectionParamViewPathBase}/:slug`
|
|
|
|
export const customAdminRoutes: Config['admin']['routes'] = {
|
|
inactivity: '/custom-inactivity',
|
|
logout: '/custom-logout',
|
|
}
|