fix: respect user mail deletion toggle in user center (#979)

* fix: respect user mail deletion toggle in user center

Hide user mailbox delete actions and block /user_api/mails deletion when ENABLE_USER_DELETE_EMAIL is disabled. Add an e2e regression test and changelog entries for issue #978.

* test: hash user password in mail deletion e2e

Use the same SHA-256 pre-hashed password format as the frontend for the user register/login flow in the mail deletion regression test.
This commit is contained in:
jiaxin
2026-04-14 15:25:39 +08:00
committed by GitHub
parent e15b1b83d0
commit 15e339282d
6 changed files with 114 additions and 3 deletions

View File

@@ -3,9 +3,11 @@ import { onMounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n'
import { api } from '../../api'
import { useGlobalState } from '../../store'
import MailBox from '../../components/MailBox.vue';
const message = useMessage()
const { openSettings } = useGlobalState()
const { t } = useI18n({
messages: {
@@ -78,7 +80,7 @@ onMounted(() => {
</n-button>
</n-input-group>
<div style="margin-top: 10px;"></div>
<MailBox :key="mailBoxKey" :enableUserDeleteEmail="true" :fetchMailData="fetchMailData"
<MailBox :key="mailBoxKey" :enableUserDeleteEmail="openSettings.enableUserDeleteEmail" :fetchMailData="fetchMailData"
:deleteMail="deleteMail" :showFilterInput="true" />
</div>
</template>