Knowledge base settings - an error occurs when setting visibility permissions for some team members #21114

Closed
opened 2026-02-21 20:10:49 -05:00 by yindo · 2 comments
Owner

Originally created by @XiaoCC on GitHub (Dec 17, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Knowledge base settings - an error occurs when setting visibility permissions for some team members

✔️ Expected Behavior

Set member permissions correctly

Actual Behavior

2 validation errors for DatasetUpdatePayload partial_member_list.0 Input should be a valid string [type=string_type, input_value={'user_id': 'asdasdsadasdxxxxx', 'role': 'admin'}, input_type=dict] For further information visit

Originally created by @XiaoCC on GitHub (Dec 17, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Knowledge base settings - an error occurs when setting visibility permissions for some team members ### ✔️ Expected Behavior Set member permissions correctly ### ❌ Actual Behavior 2 validation errors for DatasetUpdatePayload partial_member_list.0 Input should be a valid string [type=string_type, input_value={'user_id': 'asdasdsadasdxxxxx', 'role': 'admin'}, input_type=dict] For further information visit
yindo added the 🐞 buggood first issue labels 2026-02-21 20:10:49 -05:00
yindo closed this issue 2026-02-21 20:10:49 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 17, 2025):

The validation error happens because the backend expects partial_member_list to be an array of user ID strings, not objects with user_id and role properties. For example, you should send:

{
  "permission": "partial_members",
  "partial_member_list": ["user-id-1", "user-id-2"]
}

not

{
  "permission": "partial_members",
  "partial_member_list": [
    {"user_id": "user-id-1", "role": "admin"},
    {"user_id": "user-id-2", "role": "member"}
  ]
}

Make sure your frontend collects and sends only the user ID strings in partial_member_list. If you switch away from partial sharing, clear the selected member IDs to avoid sending stale data. Also, ensure the permission value matches exactly (partial_members, only_me, all_team) between frontend and backend. All layers (modal, handler, API service, backend) must pass the correct fields and formats through, or the backend will reject the request with a validation error. See the relevant discussion and code examples here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 17, 2025): <!-- Answer --> The validation error happens because the backend expects `partial_member_list` to be an array of user ID strings, not objects with `user_id` and `role` properties. For example, you should send: ```json { "permission": "partial_members", "partial_member_list": ["user-id-1", "user-id-2"] } ``` not ```json { "permission": "partial_members", "partial_member_list": [ {"user_id": "user-id-1", "role": "admin"}, {"user_id": "user-id-2", "role": "member"} ] } ``` Make sure your frontend collects and sends only the user ID strings in `partial_member_list`. If you switch away from partial sharing, clear the selected member IDs to avoid sending stale data. Also, ensure the permission value matches exactly (`partial_members`, `only_me`, `all_team`) between frontend and backend. All layers (modal, handler, API service, backend) must pass the correct fields and formats through, or the backend will reject the request with a validation error. See the [relevant discussion and code examples here](https://github.com/langgenius/dify/discussions/27752). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/06ad2db6-683c-4864-9705-f36f8e5ebf31?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20validation%20error%20happens%20because%20the%20backend%20expects%20%60partial_member_list%60%20to%20be%20an%20array%20of%20user%20ID%20strings%2C%20not%20objects%20with%20%60user_id%60%20and%20%60role%60%20properties.%20For%20example%2C%20you%20should%20send%3A%0A%0A%60%60%60json%0A%7B%0A%20%20%22permission%22%3A%20%22partial_members%22%2C%0A%20%20%22partial_member_list%22%3A%20%5B%22user-id-1%22%2C%20%22user-id-2%22%5D%0A%7D%0A%60%60%60%0A%0Anot%0A%0A%60%60%60json%0A%7B%0A%20%20%22permission%22%3A%20%22partial_members%22%2C%0A%20%20%22partial_member_list%22%3A%20%5B%0A%20%20%20%20%7B%22user_id%22%3A%20%22user-id-1%22%2C%20%22role%22%3A%20%22admin%22%7D%2C%0A%20%20%20%20%7B%22user_id%22%3A%20%22user-id-2%22%2C%20%22role%22%3A%20%22member%22%7D%0A%20%20%5D%0A%7D%0A%60%60%60%0A%0AMake%20sure%20your%20frontend%20collects%20and%20sends%20only%20the%20user%20ID%20strings%20in%20%60partial_member_list%60.%20If%20you%20switch%20away%20from%20partial%20sharing%2C%20clear%20the%20selected%20member%20IDs%20to%20avoid%20sending%20stale%20data.%20Also%2C%20ensure%20the%20permission%20value%20matches%20exactly%20%28%60partial_members%60%2C%20%60only_me%60%2C%20%60all_team%60%29%20between%20frontend%20and%20backend.%20All%20layers%20%28modal%2C%20handler%2C%20API%20service%2C%20backend%29%20must%20pass%20the%20correct%20fields%20and%20formats%20through%2C%20or%20the%20backend%20will%20reject%20the%20request%20with%20a%20validation%20error.%20See%20the%20%5Brelevant%20discussion%20and%20code%20examples%20here%5D%28https%3A//github.com/langgenius/dify/discussions/27752%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29796)
Author
Owner

@crazywoola commented on GitHub (Dec 17, 2025):

It seems to be the same problem https://github.com/langgenius/dify/pull/29552

@crazywoola commented on GitHub (Dec 17, 2025): It seems to be the same problem https://github.com/langgenius/dify/pull/29552
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21114