mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
fix
This commit is contained in:
parent
1f0253258a
commit
588019d4c6
@ -1042,7 +1042,7 @@ export const currentUserCrudHandlers = createLazyProxy(() => createCrudHandlers(
|
||||
});
|
||||
},
|
||||
async onDelete({ auth }) {
|
||||
if (auth.type === 'client' && !auth.tenancy.config.client_user_deletion_enabled) {
|
||||
if (auth.type === 'client' && !auth.tenancy.config.users.allowClientUserDeletion) {
|
||||
throw new StatusError(StatusError.BadRequest, "Client user deletion is not enabled for this project");
|
||||
}
|
||||
|
||||
|
||||
@ -353,12 +353,12 @@ export async function sendEmailFromTemplate(options: {
|
||||
}
|
||||
|
||||
export async function getEmailConfig(tenancy: Tenancy): Promise<EmailConfig> {
|
||||
const projectEmailConfig = tenancy.config.email_config;
|
||||
const projectEmailConfig = tenancy.config.emails.server;
|
||||
|
||||
if (projectEmailConfig.type === 'shared') {
|
||||
if (projectEmailConfig.isShared) {
|
||||
return await getSharedEmailConfig(tenancy.project.display_name);
|
||||
} else {
|
||||
if (!projectEmailConfig.host || !projectEmailConfig.port || !projectEmailConfig.username || !projectEmailConfig.password || !projectEmailConfig.sender_email || !projectEmailConfig.sender_name) {
|
||||
if (!projectEmailConfig.host || !projectEmailConfig.port || !projectEmailConfig.username || !projectEmailConfig.password || !projectEmailConfig.senderEmail || !projectEmailConfig.senderName) {
|
||||
throw new StackAssertionError("Email config is not complete despite not being shared. This should never happen?", { projectId: tenancy.id, emailConfig: projectEmailConfig });
|
||||
}
|
||||
return {
|
||||
@ -366,8 +366,8 @@ export async function getEmailConfig(tenancy: Tenancy): Promise<EmailConfig> {
|
||||
port: projectEmailConfig.port,
|
||||
username: projectEmailConfig.username,
|
||||
password: projectEmailConfig.password,
|
||||
senderEmail: projectEmailConfig.sender_email,
|
||||
senderName: projectEmailConfig.sender_name,
|
||||
senderEmail: projectEmailConfig.senderEmail,
|
||||
senderName: projectEmailConfig.senderName,
|
||||
secure: isSecureEmailPort(projectEmailConfig.port),
|
||||
type: 'standard',
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user