### What? Reflects any access control restrictions applied to Auth fields in the UI. I.e. if `email` has `update: () => false` the field should be displayed as read-only. ### Why? Currently any access control that is applied to auth fields is functional but is not matched within the UI. For example: - `password` that does not have read access will not return data, but the field will still be shown when it should be hidden - `email` that does not have update access, updating the field and saving the doc will **not** update the data, but it should be displayed as read-only so nothing can be filled out and the updating restriction is made clear ### How? Passes field permissions through to the Auth fields UI and adds docs with instructions on how to override auth field access. #### Testing Use `access-control` test suite and `auth` collection. Tests added to `access-control` e2e. Fixes #11569
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
export const firstArrayText = 'first-array-text'
|
|
export const secondArrayText = 'second-array-text'
|
|
|
|
export const slug = 'posts'
|
|
export const unrestrictedSlug = 'unrestricted'
|
|
export const readOnlySlug = 'read-only-collection'
|
|
export const readOnlyGlobalSlug = 'read-only-global'
|
|
export const hooksSlug = 'hooks'
|
|
|
|
export const userRestrictedCollectionSlug = 'user-restricted-collection'
|
|
export const fullyRestrictedSlug = 'fully-restricted'
|
|
export const createNotUpdateCollectionSlug = 'create-not-update-collection'
|
|
export const userRestrictedGlobalSlug = 'user-restricted-global'
|
|
export const readNotUpdateGlobalSlug = 'read-not-update-global'
|
|
export const restrictedVersionsSlug = 'restricted-versions'
|
|
export const restrictedVersionsAdminPanelSlug = 'restricted-versions-admin-panel'
|
|
export const siblingDataSlug = 'sibling-data'
|
|
export const relyOnRequestHeadersSlug = 'rely-on-request-headers'
|
|
export const docLevelAccessSlug = 'doc-level-access'
|
|
export const hiddenFieldsSlug = 'hidden-fields'
|
|
export const hiddenAccessSlug = 'hidden-access'
|
|
export const hiddenAccessCountSlug = 'hidden-access-count'
|
|
export const disabledSlug = 'disabled'
|
|
|
|
export const nonAdminEmail = 'no-admin-access@payloadcms.com'
|
|
export const publicUserEmail = 'public-user@payloadcms.com'
|
|
export const publicUsersSlug = 'public-users'
|
|
|
|
export const authSlug = 'auth-collection'
|