mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +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 { currentUserSettings } = useCurrentUserVariable({ maxDepth: 1 });
|
||||
const { systemSettings } = useSystemSettingsVariable();
|
||||
const { datetimeSettings } = useDatetimeVariable({ noDisabled: true });
|
||||
|
||||
return [environmentVariables, currentUserSettings, datetimeSettings, systemSettings, {
|
||||
return [environmentVariables, currentUserSettings, systemSettings, {
|
||||
value: '$resetLink',
|
||||
label: t('Reset password link'),
|
||||
}, {
|
||||
|
@ -11,7 +11,7 @@ import { AuthConfig, BaseAuth } from '@nocobase/auth';
|
||||
import { PasswordField } from '@nocobase/database';
|
||||
import _ from 'lodash';
|
||||
import { namespace } from '../preset';
|
||||
import { getDateVars, parsedValue } from '@nocobase/utils';
|
||||
import { parsedValue } from '@nocobase/utils';
|
||||
|
||||
export class BasicAuth extends BaseAuth {
|
||||
static readonly optionsKeysNotAllowedInEnv = ['emailContentText', 'emailContentHTML', 'emailSubject'];
|
||||
@ -209,7 +209,6 @@ export class BasicAuth extends BaseAuth {
|
||||
const parsedSubject = parsedValue(emailSubject, {
|
||||
$user: user,
|
||||
$resetLink: resetLink,
|
||||
$nDate: getDateVars(),
|
||||
$env: ctx.app.environment.getVariables(),
|
||||
$resetLinkExpiration: resetTokenExpiresIn,
|
||||
$systemSettings: systemSettings,
|
||||
@ -218,7 +217,6 @@ export class BasicAuth extends BaseAuth {
|
||||
const parsedContent = parsedValue(emailContentType === 'html' ? emailContentHTML : emailContentText, {
|
||||
$user: user,
|
||||
$resetLink: resetLink,
|
||||
$nDate: getDateVars(),
|
||||
$env: ctx.app.environment.getVariables(),
|
||||
$resetLinkExpiration: resetTokenExpiresIn,
|
||||
$systemSettings: systemSettings,
|
||||
|
Loading…
x
Reference in New Issue
Block a user