Knowledge base does not show up for collaborators #4205

Closed
opened 2026-02-21 18:05:12 -05:00 by yindo · 3 comments
Owner

Originally created by @jnc-nj on GitHub (Jun 20, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Create workspace -- create knowledge base -- add collaborator to workspace

✔️ Expected Behavior

Collaborators can see created knowledge base

Actual Behavior

Collaborators can't see created knowledge base

Originally created by @jnc-nj on GitHub (Jun 20, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.10 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Create workspace -- create knowledge base -- add collaborator to workspace ### ✔️ Expected Behavior Collaborators can see created knowledge base ### ❌ Actual Behavior Collaborators can't see created knowledge base
yindo added the 🐞 bug label 2026-02-21 18:05:12 -05:00
yindo closed this issue 2026-02-21 18:05:12 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 20, 2024):

Hello @jnc-nj! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you're facing.

To resolve the issue where collaborators cannot see the knowledge base, ensure that the visibility permissions are correctly set. You need to set the visibility to "All Team Members" to allow collaborators to view and edit the dataset. If the visibility is set to "Only Me," collaborators will not have access.

Additionally, check the error reporting mechanism for any specific error messages that might indicate why the knowledge base is not visible. The checkValid function in the nodeDefault object can help identify missing or invalid fields that might be causing the issue.

Here is the relevant code snippet for error checking:

checkValid(payload: KnowledgeRetrievalNodeType, t: any) {
    let errorMessages = ''
    if (!errorMessages && (!payload.query_variable_selector || payload.query_variable_selector.length === 0))
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.knowledgeRetrieval.queryVariable`) })

    if (!errorMessages && (!payload.dataset_ids || payload.dataset_ids.length === 0))
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.knowledgeRetrieval.knowledge`) })

    if (!errorMessages && payload.retrieval_mode === RETRIEVE_TYPE.multiWay && !payload.multiple_retrieval_config?.reranking_model?.provider)
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.errorMsg.fields.rerankModel`) })

    if (!errorMessages && payload.retrieval_mode === RETRIEVE_TYPE.oneWay && !payload.single_retrieval_config?.model?.provider)
      errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t('common.modelProvider.systemReasoningModel.key') })

    return {
      isValid: !errorMessages,
      errorMessage: errorMessages,
    }
}

Make sure to review these settings and error messages to identify and resolve the issue [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 20, 2024): <!-- Greeting --> Hello @jnc-nj! I'm here to assist you with any bugs, questions, or contributions. Let's work together to resolve the issue you're facing. <!-- Answer --> To resolve the issue where collaborators cannot see the knowledge base, ensure that the visibility permissions are correctly set. You need to set the visibility to "All Team Members" to allow collaborators to view and edit the dataset. If the visibility is set to "Only Me," collaborators will not have access. Additionally, check the error reporting mechanism for any specific error messages that might indicate why the knowledge base is not visible. The `checkValid` function in the `nodeDefault` object can help identify missing or invalid fields that might be causing the issue. Here is the relevant code snippet for error checking: ```ts checkValid(payload: KnowledgeRetrievalNodeType, t: any) { let errorMessages = '' if (!errorMessages && (!payload.query_variable_selector || payload.query_variable_selector.length === 0)) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.knowledgeRetrieval.queryVariable`) }) if (!errorMessages && (!payload.dataset_ids || payload.dataset_ids.length === 0)) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.nodes.knowledgeRetrieval.knowledge`) }) if (!errorMessages && payload.retrieval_mode === RETRIEVE_TYPE.multiWay && !payload.multiple_retrieval_config?.reranking_model?.provider) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t(`${i18nPrefix}.errorMsg.fields.rerankModel`) }) if (!errorMessages && payload.retrieval_mode === RETRIEVE_TYPE.oneWay && !payload.single_retrieval_config?.model?.provider) errorMessages = t(`${i18nPrefix}.errorMsg.fieldRequired`, { field: t('common.modelProvider.systemReasoningModel.key') }) return { isValid: !errorMessages, errorMessage: errorMessages, } } ``` Make sure to review these settings and error messages to identify and resolve the issue <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/knowledge-base/knowledge-and-documents-maintenance.md)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/knowledge-retrieval/default.ts)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@jnc-nj commented on GitHub (Jun 20, 2024):

Got it.

@jnc-nj commented on GitHub (Jun 20, 2024): Got it.
Author
Owner

@chunbaisikio commented on GitHub (Jun 25, 2024):

when I use Api to create a knowledge base,Can I change the permission using api?

@chunbaisikio commented on GitHub (Jun 25, 2024): when I use Api to create a knowledge base,Can I change the permission using api?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4205