Skip to content

docs: update user guide - #17358

Merged
JinHai-CN merged 20 commits into
infiniflow:mainfrom
Yannnnnnny:md
Jul 29, 2026
Merged

JinHai-CN merged 20 commits into
infiniflow:mainfrom
Yannnnnnny:md

Conversation

@Yannnnnnny

Copy link
Copy Markdown
Contributor

add model config guide word and picture
add teams guide words

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. 📖 documentation Improvements or additions to documentation labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The documentation updates replace model API-key setup with provider management guidance, revise supported providers, add team and permission guides, expand team management, and replace the Begin component reference with comprehensive Agent workflow documentation.

Changes

Model documentation

Layer / File(s) Summary
Provider setup and model configuration
docs/guides/models/llm_api_key_setup.md
Documents provider instances, connection verification, listed and custom models, model settings, and defaults.
Model usage and provider reference
docs/guides/models/llm_api_key_setup.md, docs/guides/models/supported_models.mdx
Updates model-type guidance, supported-model links, and provider URLs and entries.

Team and permissions documentation

Layer / File(s) Summary
Team management workflows
docs/guides/team/team_management.md
Adds consolidated team, membership, invitation, department, group, and resource-sharing guidance.
Permission model and sharing scope
docs/guides/team/permission_system_overview.md, docs/guides/team/sharing_scope_configuration.md
Documents permission layers, sharing scopes, collaborator authorization, and effective permission evaluation.
Resource and document permission rules
docs/guides/team/document_level_permissions.md, docs/guides/team/resource_operation_permission_rules.md
Adds operation matrices and evaluation rules for documents and supported resource types.

Agent workflow documentation

Layer / File(s) Summary
Agent chapter and lifecycle
docs/guides/agent/agent_component_reference/begin.md
Adds Agent overview, access, creation, management, embedding, canvas, and configuration guidance.
Core Agent components
docs/guides/agent/agent_component_reference/begin.md
Documents Begin, Agent, Retrieval, and Message components.
Workflow control and data utilities
docs/guides/agent/agent_component_reference/begin.md
Documents flow control, categorization, data operations, and variable utilities.

Superseded team-sharing pages are removed.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

Poem

A rabbit hops through docs so bright,
Providers bloom in guided light.
Teams share scopes, Agents flow,
Models line up row by row.
“Sniff!” says Bun—“what a tidy show!”

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description misses the required Summary section and only gives a vague one-line note. Add the required Summary section and briefly explain the purpose, scope, and context of the model and team guide updates.
Title check ❓ Inconclusive The title is related to the PR, but it is too generic to convey the main change. Use a concise title that names the main update, such as model configuration and team guide documentation.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/models/llm_api_key_setup.md`:
- Line 14: Update the supported-model guidance in the document to use one
authoritative reference, label the linked catalog as model providers rather than
a complete model list, and distinguish provider support from specific model IDs.
Remove the duplicated later reference while preserving the API-key application
guidance.
- Line 116: Clarify the moderation model’s status in the documentation: either
add it consistently to the model-type table and default-model guidance,
including the relevant configuration flow, or explicitly state that moderation
is a separate capability rather than a selectable model type. Update the
“Moderation” section and related model configuration guidance without changing
unrelated documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a7357e1c-7025-4da0-93b0-52bc330ce48a

📥 Commits

Reviewing files that changed from the base of the PR and between 742837c and 165f0ad.

⛔ Files ignored due to path filters (8)
  • docs/guides/models/image (1).png is excluded by !**/*.png
  • docs/guides/models/image (2).png is excluded by !**/*.png
  • docs/guides/models/image (3).png is excluded by !**/*.png
  • docs/guides/models/image (4).png is excluded by !**/*.png
  • docs/guides/models/image (5).png is excluded by !**/*.png
  • docs/guides/models/image-1.png is excluded by !**/*.png
  • docs/guides/models/image-2.png is excluded by !**/*.png
  • docs/guides/models/image.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • docs/guides/models/llm_api_key_setup.md

## Get model API key

RAGFlow supports most mainstream LLMs. Please refer to [Supported Models](../../guides/models/supported_models.mdx) for a complete list of supported models. You will need to apply for your model API key online. Note that most LLM providers grant newly-created accounts trial credit, which will expire in a couple of months, or a promotional amount of free quota.
RAGFlow supports most mainstream LLMs. Please refer to [Supported Models](../../guides/models/supported_models.mdx) for a complete list of supported models. You will need to apply for your model API key online.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Align the supported-model references with the target page.

The linked page is titled Model providers and describes the supported-provider catalog; it also notes that the latest model list is maintained elsewhere. Calling it a “complete list of supported models” is misleading, and the same reference is duplicated later. Use one authoritative reference and distinguish providers from model IDs.

Also applies to: 118-120

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/models/llm_api_key_setup.md` at line 14, Update the
supported-model guidance in the document to use one authoritative reference,
label the linked catalog as model providers rather than a complete model list,
and distinguish provider support from specific model IDs. Remove the duplicated
later reference while preserving the API-key application guidance.

Source: Path instructions


2. **VLM**, **ASR**, **TTS**, and **OCR**: VLM is used to understand images and image-text information. OCR recognizes text in images or scanned documents. ASR converts speech into text. TTS converts text into speech. Different model types jointly support multimodal scenarios such as image understanding, document recognition, and voice interaction.

3. **Moderation**: The moderation model is used to identify non-compliant, harmful, or sensitive content in text or images. It can review user input and model output to reduce the risk of generating or spreading non-compliant content.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Clarify moderation model support.

“Moderation model” is introduced as another model type, but it is absent from the model-type table and default-model guidance. Add it consistently to the documented configuration flow, or clarify that moderation is a separate capability rather than a selectable model type.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/models/llm_api_key_setup.md` at line 116, Clarify the moderation
model’s status in the documentation: either add it consistently to the
model-type table and default-model guidance, including the relevant
configuration flow, or explicitly state that moderation is a separate capability
rather than a selectable model type. Update the “Moderation” section and related
model configuration guidance without changing unrelated documentation.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/models/supported_models.mdx`:
- Line 27: Update the Bedrock IAM URL in the supported models documentation so
its hostname and region query use the same intended AWS region, or replace it
with a region-neutral IAM URL. Keep the link otherwise unchanged.

In `@docs/guides/team/join_or_leave_team.md`:
- Line 55: Update the invitation guidance near the team member dataset
permissions statement to align with the sharing guide: either define “update”
explicitly as the supported viewing, uploading, and parsing actions, or narrow
the wording to those documented permissions without implying broader edit
access.
- Around line 35-75: Expand the procedures in
docs/guides/team/join_or_leave_team.md lines 35-75 to include UI paths, required
roles, controls, and completion steps for inviting, removing, and leaving teams,
plus managing departments and groups. Also add complete operation,
permission-level, and configuration instructions in
docs/guides/team/document_level_permissions.md lines 16-22, and document
Enterprise sharing scopes and collaborator-permission configuration in
docs/guides/team/sharing_scope_configuration.md lines 28-34.

In `@docs/guides/team/permission_system_overview.md`:
- Line 16: Update the Team page permissions statement in the team guide to
separate owner-only actions—inviting users and removing members—from the ability
to view joined teams, which must be described as available to regular members as
well.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9313f2b7-1fa1-4b68-a307-a4c2380a62ee

📥 Commits

Reviewing files that changed from the base of the PR and between 165f0ad and 6adaf50.

📒 Files selected for processing (9)
  • docs/guides/models/llm_api_key_setup.md
  • docs/guides/models/supported_models.mdx
  • docs/guides/team/document_level_permissions.md
  • docs/guides/team/join_or_leave_team.md
  • docs/guides/team/manage_team_members.md
  • docs/guides/team/permission_system_overview.md
  • docs/guides/team/share_chat_assistant.md
  • docs/guides/team/share_knowledge_bases.md
  • docs/guides/team/sharing_scope_configuration.md
💤 Files with no reviewable changes (3)
  • docs/guides/team/share_knowledge_bases.md
  • docs/guides/team/share_chat_assistant.md
  • docs/guides/team/manage_team_members.md

Comment thread docs/guides/models/supported_models.mdx Resolved
Comment thread docs/guides/team/join_or_leave_team.md Resolved
Comment thread docs/guides/team/join_or_leave_team.md Resolved

Team member management controls who can join a team and participate in team-level collaboration.

Team owners can invite users, remove members, and view joined teams from the **Team** page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not restrict “view joined teams” to team owners.

The team guide says users can view the teams they have joined from the Team page, while this sentence makes that capability sound owner-only. Split the sentence so invitation/removal remain owner actions and viewing joined teams applies to regular members too.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/team/permission_system_overview.md` at line 16, Update the Team
page permissions statement in the team guide to separate owner-only
actions—inviting users and removing members—from the ability to view joined
teams, which must be described as available to regular members as well.

@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/agent/agent_component_reference/begin.md`:
- Around line 76-77: Remove the duplicated first-time and non-first-time import
instructions in the import procedure documentation, consolidating them into one
current procedure while preserving all necessary upload, information-entry, and
save steps.
- Around line 209-212: Update the Markdown around the quoted recommendation and
the [!NOTE] admonition so their block boundaries are unambiguous: either prefix
the note and its contents as part of one contiguous blockquote or explicitly
close the blockquote before starting the note, while preserving both messages.
- Around line 362-373: Align the Variable Assignor description with the
Supported Operations table: either add append and arithmetic operations with
their exact semantics to the table, or revise the introductory prose to mention
only Overwritten by, Set, and Clear. Keep the documentation consistent without
changing unrelated configuration guidance.
- Around line 106-112: Add blank lines immediately before and after every
Markdown table in the document, including the tables near the shown variables
and the additional referenced sections, so markdownlint MD058 passes without
changing table content.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 70786092-bd9d-4549-9dba-ea3ead369ac1

📥 Commits

Reviewing files that changed from the base of the PR and between 6adaf50 and 655e132.

📒 Files selected for processing (1)
  • docs/guides/agent/agent_component_reference/begin.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/team/document_level_permissions.md`:
- Line 196: Update the MCP remediation guidance to require the permission check
in the connection-test handler for POST /mcp/servers/<mcp_id>/test, implemented
by test_mcp, rather than in update_mcp. Keep the scope focused on protecting the
request that performs the connection test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5de9ed93-e6b6-4e9c-aefa-8006652f214d

📥 Commits

Reviewing files that changed from the base of the PR and between 655e132 and 36d2426.

📒 Files selected for processing (8)
  • docs/guides/team/document_level_permissions.md
  • docs/guides/team/join_or_leave_team.md
  • docs/guides/team/permission_system_overview.md
  • docs/guides/team/share_agents.md
  • docs/guides/team/share_memory.md
  • docs/guides/team/share_model.md
  • docs/guides/team/sharing_scope_configuration.md
  • docs/guides/team/team_management.md
💤 Files with no reviewable changes (4)
  • docs/guides/team/share_model.md
  • docs/guides/team/share_agents.md
  • docs/guides/team/share_memory.md
  • docs/guides/team/join_or_leave_team.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/guides/team/sharing_scope_configuration.md


Creating an MCP server creates a new resource and does not require an existing MCP permission. The owner permission is created after the resource is created.

Testing MCP connection is currently not strictly restricted by existing permission checks in the backend. If this behavior changes, a permission check should be added at the point where MCP permissions can be changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== locate file and relevant docs ==\n'
if [ -f "docs/guides/team/document_level_permissions.md" ]; then
  wc -l docs/guides/team/document_level_permissions.md
  sed -n '170,220p' docs/guides/team/document_level_permissions.md
else
  echo "docs/guides/team/document_level_permissions.md not found"
fi

printf '\n== search MCP permission/connection test references ==\n'
rg -n -i "mcp.*(test|connection|permission|permissions)|connection.*(test|probe)|test.*mcp" -S . --glob '!node_modules' --glob '!dist' --glob '!build' || true

printf '\n== list likely handlers/files by name ==\n'
fd -a -i "mcp|health|ping|test|connection|permission" . | sed 's#^\./##' | head -200

Repository: infiniflow/ragflow

Length of output: 50377


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== target doc ==\n'
if [ -f "docs/guides/team/document_level_permissions.md" ]; then
  wc -l docs/guides/team/document_level_permissions.md
  sed -n '180,205p' docs/guides/team/document_level_permissions.md
fi

printf '\n== narrow repository matches for MCP test/connection handlers/routes ==\n'
rg -n -i '"mcp|test.*mcp|mcp.*test|test.*connection|connection.*test' -S --glob '!*.md' --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' . | head -200
rg -n -i 'mcpConnection|testMcp|test_connection|testConnection|createMcpConnection|updateMcp|deleteMcp' -S --glob '!*.md' --glob '!node_modules/**' --glob '!dist/**' --glob '!build/**' . | head -200

printf '\n== narrow files by likely names ==\n'
git ls-files | rg -n '(^|/)(.*mcp.*|.*mc.*|test|connection|permission|route|router|api)' | head -300 || true

Repository: infiniflow/ragflow

Length of output: 44048


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== mcp_api route/handler section ==\n'
sed -n '600,720p' api/apps/restful_apis/mcp_api.py
sed -n '710,760p' api/apps/restful_apis/mcp_api.py
sed -n '760,800p' api/apps/restful_apis/mcp_api.py

printf '\n== route tests around test_mcp and permission guards ==\n'
sed -n '700,805p' test/testcases/restful_api/test_mcp_routes_unit.py
rg -n -i 'operator_permission|permission|check.*permission|test_mcp|/test' api/apps/restful_apis/mcp_api.py test/testcases/restful_api/test_mcp_routes_unit.py test/testcases/test_web_api/test_mcp_server_app/test_mcp_server_app_unit.py

Repository: infiniflow/ragflow

Length of output: 6145


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== mcp_api test endpoint and imports/top-of-function ==\n'
sed -n '1,80p' api/apps/restful_apis/mcp_api.py
sed -n '300,360p' api/apps/restful_apis/mcp_api.py
sed -n '360,460p' api/apps/restful_apis/mcp_api.py

printf '\n== compare create/update/delete/permission-related MCP handlers nearby ==\n'
sed -n '220,300p' api/apps/restful_apis/mcp_api.py
sed -n '460,570p' api/apps/restful_apis/mcp_api.py
sed -n '570,610p' api/apps/restful_apis/mcp_api.py
sed -n '290,322p' test/testcases/restful_api/test_mcp_routes_unit.py

Repository: infiniflow/ragflow

Length of output: 11119


Point the MCP remediation at the connection-test handler.

POST /mcp/servers/<mcp_id>/test performs the connection test and only checks login/request validation, while update_mcp is where MCP permissions are modified. Saying to add the check “where MCP permissions can be changed” suggests updating the update endpoint instead of protecting the actual test_mcp request.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/team/document_level_permissions.md` at line 196, Update the MCP
remediation guidance to require the permission check in the connection-test
handler for POST /mcp/servers/<mcp_id>/test, implemented by test_mcp, rather
than in update_mcp. Keep the scope focused on protecting the request that
performs the connection test.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/team/resource_operation_permission_rules.md`:
- Around line 91-97: Update the permission evaluation order in the resource
operation rules so the knowledge base owner check is evaluated before formal
team membership, or explicitly document ownership as a short-circuit override
that bypasses subsequent checks. Preserve the existing sharing, resource-level,
document-level, and operation-table checks for non-owners.
- Around line 240-255: Clarify the Search permissions documentation by
separating the intended permission matrix from current enforcement. Label the
table as intended behavior, and explicitly identify that Search list is not
ACL-connected, Search details checks only by ID, and Search Q&A, related
questions, and mind-map generation currently use creation/resource checks rather
than READ permission checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b5bc2af2-6459-4f85-8c92-c6c101edeadb

📥 Commits

Reviewing files that changed from the base of the PR and between 36d2426 and eb4f5ee.

📒 Files selected for processing (1)
  • docs/guides/team/resource_operation_permission_rules.md

Comment on lines +91 to +97
When a user performs a knowledge base or document operation, permissions are evaluated in the following order:

1. Whether the user has formally joined the team that owns the knowledge base.
2. Whether the knowledge base sharing scope allows team access.
3. Whether the user has knowledge base-level **Read**, **Write**, or **Manage** permission.
4. Whether the user has target document-level **Read**, **Write**, or **Manage** permission.
5. Whether the current operation is allowed by the permission table.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Evaluate the owner override before team membership.

This sequence starts with formal team membership, but the general rules at Lines 291-293 and docs/guides/team/permission_system_overview.md:71-85 state that owners always have all permissions. Put the owner check first, or explicitly document it as a short-circuit override, so owners cannot appear blocked by step 1.

🧰 Tools
🪛 LanguageTool

[style] ~95-~95: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...se sharing scope allows team access. 3. Whether the user has knowledge base-level **Rea...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~96-~96: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Write, or Manage permission. 4. Whether the user has target document-level **Re...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~97-~97: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Write, or Manage permission. 5. Whether the current operation is allowed by the...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/team/resource_operation_permission_rules.md` around lines 91 -
97, Update the permission evaluation order in the resource operation rules so
the knowledge base owner check is evaluated before formal team membership, or
explicitly document ownership as a short-circuit override that bypasses
subsequent checks. Preserve the existing sharing, resource-level,
document-level, and operation-table checks for non-owners.

Comment on lines +240 to +255
| Operation | No permission | Read | Write | Manage | Owner |
| --- | --- | --- | --- | --- | --- |
| Create Search | Y | Y | Y | Y | Y |
| Search list | X | Y | Y | Y | Y |
| Search details | X | Y | Y | Y | Y |
| Search Q&A | X | X | Y | Y | Y |
| Get related questions | X | X | Y | Y | Y |
| Generate mind map | X | X | Y | Y | Y |
| Edit Search | X | X | X | Y | Y |
| Delete Search | X | X | X | X | Y |

Creating Search creates a new resource and creates the owner record afterward. The Search list currently relies on the ENABLE role check and is not fully connected to ACL sharing. Search details are currently connected only by ID; changing this to a READ operation is recommended.

For Search Q&A, related questions, and mind map generation, effective use recommends a READ operation check rather than only checking whether the resource can be created.

Editing Search includes adjusting knowledge base configuration and should require manage permission. Deleting Search is recommended to be owner-only, and current behavior is generally consistent with `created_by`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Separate intended Search permissions from current enforcement.

The table says Search listing/details require Read and Q&A/mind-map operations require Write, while the prose says listing is not ACL-connected, details are checked only by ID, and Q&A should move to a READ check. This presents an intended matrix as if it were currently enforced. Either align the backend or clearly label the table as intended behavior and identify these enforcement gaps.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/team/resource_operation_permission_rules.md` around lines 240 -
255, Clarify the Search permissions documentation by separating the intended
permission matrix from current enforcement. Label the table as intended
behavior, and explicitly identify that Search list is not ACL-connected, Search
details checks only by ID, and Search Q&A, related questions, and mind-map
generation currently use creation/resource checks rather than READ permission
checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants