refactored permission system and error handling

This commit is contained in:
2025-09-26 15:35:54 +02:00
parent 2cfd6248bc
commit d025819888
26 changed files with 2312 additions and 300 deletions

View File

@ -37,13 +37,14 @@ export const usePasswordGroupStore = defineStore('passwordGroupStore', () => {
) => {
const group = groups.value.find((group) => group.id === groupId)
console.log('getParentChain1: found group', group, chain)
if (group) {
/* if (group) {
chain.push(group)
console.log('getParentChain: found group', group, chain)
return getParentChain(group.parentId, chain)
}
return chain.reverse()
return chain.reverse() */
return []
}
const syncGroupItemsAsync = async () => {
@ -322,7 +323,7 @@ const deleteGroupAsync = async (groupId: string, final: boolean = false) => {
const items = (await readByGroupIdAsync(groupId)) ?? []
console.log('deleteGroupAsync delete Items', items)
for (const item of items) {
await deleteAsync(item.id, true)
if (item) await deleteAsync(item.id, true)
}
return await currentVault?.drizzle

View File

@ -33,7 +33,6 @@ export const usePasswordItemStore = defineStore('passwordItemStore', () => {
const syncItemsAsync = async () => {
const { currentVault } = useVaultStore()
items.value =
(await currentVault?.drizzle
.select()