feat: unarchive editorials and restore archived grants

Adds an "Archivierung aufheben" action on the editorial detail page:
clears the archive markers, reactivates suspended accounts and
re-activates exactly the album grants that were revoked by the archive
step (matched via the archive timestamp, skipping albums that received
a fresh active grant in the meantime).
This commit is contained in:
Leon Tonhäuser committed 2026-08-25 01:38:20 +02:00
1 parent c9d3f3d1dc
commit 9308b46d84
4 files changed
+135 -4

No files matched your search

+10
View File
@@ -55,6 +55,16 @@ export async function archiveEditorialAction(editorialId: string): Promise<void>
redirect("/admin/redaktionen");
}
export async function unarchiveEditorialAction(editorialId: string): Promise<void> {
const admin = await requireAdmin(new Headers(await headers()));
await editorialService.unarchiveEditorial({
editorialId,
adminUserId: admin.userId,
});
revalidatePath(`/admin/redaktionen/${editorialId}`);
revalidatePath("/admin/redaktionen");
}
export async function hardDeleteEditorialAction(editorialId: string): Promise<void> {
await requireAdmin(new Headers(await headers()));
await editorialService.hardDeleteEditorial(editorialId);