Merge branch 'alpha' of github.com:payloadcms/payload into alpha
This commit is contained in:
@@ -94,16 +94,10 @@ const collectionSchema = joi.object().keys({
|
||||
maxLoginAttempts: joi.number(),
|
||||
removeTokenFromResponses: joi.boolean().valid(true),
|
||||
strategies: joi.array().items(
|
||||
joi.alternatives().try(
|
||||
strategyBaseSchema.keys({
|
||||
name: joi.string().required(),
|
||||
strategy: joi.func().maxArity(1).required(),
|
||||
}),
|
||||
strategyBaseSchema.keys({
|
||||
name: joi.string(),
|
||||
strategy: joi.object().required(),
|
||||
}),
|
||||
),
|
||||
joi.object().keys({
|
||||
name: joi.string().required(),
|
||||
authenticate: joi.func().required(),
|
||||
}),
|
||||
),
|
||||
tokenExpiration: joi.number(),
|
||||
useAPIKey: joi.boolean(),
|
||||
|
||||
@@ -85,6 +85,13 @@ const sanitizeCollections = (
|
||||
delete sanitized.upload.handlers
|
||||
}
|
||||
|
||||
if ('auth' in sanitized && typeof sanitized.auth === 'object') {
|
||||
sanitized.auth = { ...sanitized.auth }
|
||||
delete sanitized.auth.strategies
|
||||
delete sanitized.auth.forgotPassword
|
||||
delete sanitized.auth.verify
|
||||
}
|
||||
|
||||
if ('admin' in sanitized) {
|
||||
sanitized.admin = { ...sanitized.admin }
|
||||
|
||||
|
||||
@@ -51,9 +51,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
|
||||
|
||||
const redirectToInactivityRoute = useCallback(() => {
|
||||
if (window.location.pathname.startsWith(admin)) {
|
||||
const redirectParam = `?redirect=${encodeURIComponent(
|
||||
window.location.pathname.replace(admin, ''),
|
||||
)}`
|
||||
const redirectParam = `?redirect=${encodeURIComponent(window.location.pathname)}`
|
||||
router.replace(`${admin}${logoutInactivityRoute}${redirectParam}`)
|
||||
} else {
|
||||
router.replace(`${admin}${logoutInactivityRoute}`)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@import '../../scss/styles.scss';
|
||||
|
||||
.template-default {
|
||||
[dir='rtl']
|
||||
&__nav-toggler-wrapper {
|
||||
background-color: var(--theme-bg);
|
||||
color: var(--theme-text);
|
||||
|
||||
[dir='rtl'] &__nav-toggler-wrapper {
|
||||
left: unset;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
min-height: 100%;
|
||||
background-color: var(--theme-bg-color);
|
||||
color: var(--theme-text);
|
||||
|
||||
&--width-normal {
|
||||
.template-minimal__wrap {
|
||||
|
||||
Reference in New Issue
Block a user