Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix cache managing for permissions modal

Smaug673906dc7c076250
diff --git a/frontend/app/components/Node/NodePermissions.modal.vue b/frontend/app/components/Node/NodePermissions.modal.vue
index 51f58c3b..8320395c 100644
--- a/frontend/app/components/Node/NodePermissions.modal.vue
+++ b/frontend/app/components/Node/NodePermissions.modal.vue
@@ -83,9 +83,12 @@ const link = computed(() => `${window.location.origin}/doc/${node.value?.id}`);
const searchError = ref<string | null>(null);
const isLoading = ref(0);
-for (const perm of node.value.permissions) {
- usersStore.fetchPublicUser(perm.user_id);
-}
+watchEffect(() => {
+ if (node.value.partial) nodesStore.fetch({ id: node.value.id }).then(fetched => (node.value = fetched));
+ for (const perm of node.value.permissions) {
+ usersStore.fetchPublicUser(perm.user_id);
+ }
+});
watch(query, async newQuery => {
users.value = [];