Files
payload/test/auth/shared.ts
Jacob Fletcher f3aebe3263 fix(ui): public users unable to log out (#10188)
Fixes #10180. When logged in as an unauthorized user who cannot access
the admin panel, the user is unable to log out through the prompted
`/admin/logout` page. This was because that page was using an incorrect
API endpoint, reading from `admin.user` instead of `user.collection`
when formatting the route. This page was also able to get stuck in an
infinite loading state when attempting to log out without any user at
all. Now, public users can properly log out and then back in with
another user who might have access. The messaging around this was also
misleading. Instead of displaying the "Unauthorized, you must be logged
in to make this request" message, we now display a new "Unauthorized,
this user does not have access to the admin panel" message for added
clarity.
2024-12-26 22:52:00 -05:00

12 lines
318 B
TypeScript

export const slug = 'users'
export const publicUsersSlug = 'public-users'
export const apiKeysSlug = 'api-keys'
export const partialDisableLocaleStrategiesSlug = 'partial-disable-locale-strategies'
export const namedSaveToJWTValue = 'namedSaveToJWT value'
export const saveToJWTKey = 'x-custom-jwt-property-name'