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.

Fixes in migrations for accessibility

Smaug673908c1353a5d76
diff --git a/backend/migrations/000010_nodes.up.sql b/backend/migrations/000010_nodes.up.sql
index aa0dfd5d..0054ef8d 100644
--- a/backend/migrations/000010_nodes.up.sql
+++ b/backend/migrations/000010_nodes.up.sql
@@ -15,7 +15,7 @@ CREATE TABLE `nodes` (
`icon` TEXT NULL,
`thumbnail` TEXT NULL,
`theme` VARCHAR(30) NULL,
- `accessibility` tinyint(1) NULL,
+ `accessibility` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=private, 2=public',
`access` INT NOT NULL DEFAULT 0,
`display` TINYINT NULL,
`order` INT NULL,
diff --git a/frontend/app/components/Node/NodePermissions.vue b/frontend/app/components/Node/NodePermissions.vue
index 10d85e73..1e91b63e 100644
--- a/frontend/app/components/Node/NodePermissions.vue
+++ b/frontend/app/components/Node/NodePermissions.vue
@@ -68,6 +68,7 @@
import type { Node, Permission, PublicUser } from '~/stores';
const props = defineProps<{ node: Node }>();
+
const node = ref<Node>(props.node);
const usersStore = useUserStore();
diff --git a/frontend/app/pages/dashboard/categories/[id]/index.vue b/frontend/app/pages/dashboard/categories/[id]/index.vue
index 3ef432eb..ca01125d 100644
--- a/frontend/app/pages/dashboard/categories/[id]/index.vue
+++ b/frontend/app/pages/dashboard/categories/[id]/index.vue
@@ -28,14 +28,16 @@ const route = useRoute();
const categoryId = route.params.id as string;
const nodesStore = useNodesStore();
const view: Ref<'table' | 'list'> = ref('list');
-
+const node = computed(() => nodesStore.getById(categoryId));
// definePageMeta({
// breadcrumb: () => {
// const category = nodesStore.getById(route.params.id as string);
// return category?.name || '';
// },
// });
-const openPermissionsModal = () => useModal().add(new Modal(shallowRef(NodePermissions), { props: { nodeId: categoryId }, size: 'small' }));
+const openPermissionsModal = () => {
+ if (node.value) useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: node.value }, size: 'small' }));
+};
const documents = computed(() => {
return nodesStore.getAllChildrens(categoryId).filter(d => d.role == 3);