mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: remove unused date variable from email parsing in BasicAuth
This commit is contained in:
parent
ca1ed6c90e
commit
c999ae4040
@ -152,9 +152,8 @@ const useVariableOptionsOfForgetPassword = () => {
|
|||||||
const environmentVariables = useGlobalVariable('$env');
|
const environmentVariables = useGlobalVariable('$env');
|
||||||
const { currentUserSettings } = useCurrentUserVariable({ maxDepth: 1 });
|
const { currentUserSettings } = useCurrentUserVariable({ maxDepth: 1 });
|
||||||
const { systemSettings } = useSystemSettingsVariable();
|
const { systemSettings } = useSystemSettingsVariable();
|
||||||
const { datetimeSettings } = useDatetimeVariable({ noDisabled: true });
|
|
||||||
|
|
||||||
return [environmentVariables, currentUserSettings, datetimeSettings, systemSettings, {
|
return [environmentVariables, currentUserSettings, systemSettings, {
|
||||||
value: '$resetLink',
|
value: '$resetLink',
|
||||||
label: t('Reset password link'),
|
label: t('Reset password link'),
|
||||||
}, {
|
}, {
|
||||||
|
@ -11,7 +11,7 @@ import { AuthConfig, BaseAuth } from '@nocobase/auth';
|
|||||||
import { PasswordField } from '@nocobase/database';
|
import { PasswordField } from '@nocobase/database';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { namespace } from '../preset';
|
import { namespace } from '../preset';
|
||||||
import { getDateVars, parsedValue } from '@nocobase/utils';
|
import { parsedValue } from '@nocobase/utils';
|
||||||
|
|
||||||
export class BasicAuth extends BaseAuth {
|
export class BasicAuth extends BaseAuth {
|
||||||
static readonly optionsKeysNotAllowedInEnv = ['emailContentText', 'emailContentHTML', 'emailSubject'];
|
static readonly optionsKeysNotAllowedInEnv = ['emailContentText', 'emailContentHTML', 'emailSubject'];
|
||||||
@ -209,7 +209,6 @@ export class BasicAuth extends BaseAuth {
|
|||||||
const parsedSubject = parsedValue(emailSubject, {
|
const parsedSubject = parsedValue(emailSubject, {
|
||||||
$user: user,
|
$user: user,
|
||||||
$resetLink: resetLink,
|
$resetLink: resetLink,
|
||||||
$nDate: getDateVars(),
|
|
||||||
$env: ctx.app.environment.getVariables(),
|
$env: ctx.app.environment.getVariables(),
|
||||||
$resetLinkExpiration: resetTokenExpiresIn,
|
$resetLinkExpiration: resetTokenExpiresIn,
|
||||||
$systemSettings: systemSettings,
|
$systemSettings: systemSettings,
|
||||||
@ -218,7 +217,6 @@ export class BasicAuth extends BaseAuth {
|
|||||||
const parsedContent = parsedValue(emailContentType === 'html' ? emailContentHTML : emailContentText, {
|
const parsedContent = parsedValue(emailContentType === 'html' ? emailContentHTML : emailContentText, {
|
||||||
$user: user,
|
$user: user,
|
||||||
$resetLink: resetLink,
|
$resetLink: resetLink,
|
||||||
$nDate: getDateVars(),
|
|
||||||
$env: ctx.app.environment.getVariables(),
|
$env: ctx.app.environment.getVariables(),
|
||||||
$resetLinkExpiration: resetTokenExpiresIn,
|
$resetLinkExpiration: resetTokenExpiresIn,
|
||||||
$systemSettings: systemSettings,
|
$systemSettings: systemSettings,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user