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.
12 lines
318 B
TypeScript
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'
|