Consolidate GVL deletion workflow and document purge semantics
Dieser Commit ist enthalten in:
@@ -89,31 +89,11 @@ async function purgeUnlockedEvidenceRecords(db) {
|
||||
});
|
||||
}
|
||||
|
||||
function purgeGvlReferenceData(db) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const clearedStores = {};
|
||||
const tx = db.transaction(VENDORGET_GVL_REFERENCE_STORE_NAMES, "readwrite");
|
||||
|
||||
tx.onerror = () => reject(tx.error);
|
||||
tx.onabort = () => reject(tx.error);
|
||||
tx.oncomplete = () => {
|
||||
resolve({
|
||||
success: true,
|
||||
clearedStores
|
||||
});
|
||||
};
|
||||
|
||||
for (const storeName of VENDORGET_GVL_REFERENCE_STORE_NAMES) {
|
||||
const objectStore = tx.objectStore(storeName);
|
||||
const countRequest = objectStore.count();
|
||||
|
||||
countRequest.onsuccess = () => {
|
||||
clearedStores[storeName] = countRequest.result;
|
||||
objectStore.clear();
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// TODO: GVL-Datenpflege darf nicht storeweise per clear() erfolgen.
|
||||
// Loeschbar ist nur eine GVL-Revision, wenn ihre zugehoerigen Raw-, Snapshot-,
|
||||
// Event- und normalisierten Records identifiziert sind, ihr Schutzstatus
|
||||
// vollstaendig bewertet wurde und eine vorhandene Vault-/Workspace-Schutzlogik
|
||||
// die Loeschung erlaubt.
|
||||
|
||||
function buildGvlWorkspaceProtectionIndex(db) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren