upd: add decline endpoint and free up username on decline

This commit is contained in:
Marie 2024-10-17 20:11:10 +02:00
parent 786677b079
commit 1d9cb4fad9
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
13 changed files with 170 additions and 2 deletions

View file

@ -75,7 +75,7 @@ async function deleteAccount() {
if (typed.canceled) return;
if (typed.result === props.user.username) {
await os.apiWithDialog('admin/delete-account', {
await os.apiWithDialog('admin/decline-user', {
userId: props.user.id,
});
emits('deleted', props.user.id);

View file

@ -31,6 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
[$style.logRed]: [
'suspend',
'approve',
'decline',
'deleteRole',
'deleteGlobalAnnouncement',
'deleteUserAnnouncement',
@ -51,6 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<span v-if="log.type === 'updateUserNote'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'suspend'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'approve'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'decline'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'unsuspend'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'resetPassword'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }}</span>
<span v-else-if="log.type === 'assignRole'">: @{{ log.info.userUsername }}{{ log.info.userHost ? '@' + log.info.userHost : '' }} <i class="ti ti-arrow-right"></i> {{ log.info.roleName }}</span>