Wholesale stall trading: access controls for document comparison

Review access controls for document comparison in Wholesale stall trading. Check sources, input boundaries, error handling and repeatable test evidence.

What the documents look like

Wholesale stall trading is fragmented. Bargaining happens in person, and goods move through freight forwarding rather than a scheduled distribution channel. The material set for a single deal is typically a purchase slip, a handwritten sales note, a stall lease contract, and a payment receipt. These documents are held by different parties: the stall owner, the buyer, and the freight forwarder. Records update daily and per order, and the same transaction can show different parties, quantities, or amounts across contract, sales note, and receipt.

For document comparison work, this fragmentation creates a direct access problem. Each material needs a visible range tied to the correct stall and the correct period. A retrieved document that looks similar is not the same transaction, and retrieval relevance does not establish authorization. The comparison task only works when the reviewer can see the right documents and nothing beyond them.

Constraints at the access controls step

Permission evaluation checks the individual member permission first, then takes the union of department and group permissions. The knowledge base permission is always a threshold: collection permission cannot bypass knowledge base permission. File-level permission is off by default. In the off state, collection readability matches the knowledge base, and the system does not query collection permission records. After it is turned on, each file generates a permission snapshot, and lists, details, and retrieval recall are authorized item by item against that snapshot. Retrieval recall applies file-level filtering only when authorization runs against the current member identity. A scenario that preselects a knowledge base without member-identity authorization does not filter by file. A similarity score is not a permission or entity filter, and retrieval relevance does not replace authorization.

Hypothetical paper exercise sample: Stall A signs a stall lease contract with Buyer B for stall A-12, from 1 March 2025 to 31 March 2025, at a monthly rent of 8,000 yuan. A handwritten sales note records that on 5 March, 200 boxes of potatoes were sold at 45 yuan per box. A payment receipt records that 9,000 yuan was received the same day. A draft sentence reads: "B settled all payment in full on 5 March." The questions are whether that sentence matches the materials, and who may view these three materials.

Configuration and implementation checks

Configuration itemHypothetical starting point for this exerciseHow to check
Knowledge base file-level permission switchOff stateConfirm that in the off state no collection permission records are queried and readability matches the knowledge base
Collection collaborator rolesRead permission, write permission, administratorAssign by member, member group, or organization; the submitted list is a full overwrite
Creator recordSubmitted list must contain the current creatorA list missing the creator is rejected
Retrieval authorization methodAuthorize by current member identityA preselected knowledge base without member-identity authorization does not filter by file
Permission subjectOne of member, department, groupIndividual member permission overrides the all-member group permission

Three common errors

  1. Treating retrieval relevance as a permission filter. Input the same query under an account with read permission and an account without it, then compare the visible file lists. If both return the same files, authorization is not running against member identity, and the retrieval entry point needs checking.
  2. Treating the draft sentence as proof of full settlement. Input the sales note and receipt text, then compare the receipt amount of 9,000 yuan with the sales note figure of 200 boxes × 45 yuan = 9,000 yuan. Matching amounts support that this payment was received; they do not support "all payment settled in full," because the lease contract carries a separate monthly rent of 8,000 yuan, which is a different field.
  3. Configuring a single file permission while the switch is off. Input one collaborator write operation against a file, then compare the returned result. In the off state that write is rejected with a prompt to enable first, and the enabling action must be performed by a knowledge base administrator.

How to verify the setup

  1. View the same file list with an account holding read permission and an account without it, then compare the returned entries. The check passes when the authorized account sees the target file, the unauthorized account does not, unreadable files do not occupy list positions, and pagination results remain correct.
  2. Using the three materials in the hypothetical sample, compare the draft sentence against the source text for party, period, and field. The phrase "all payment in full" is not supported; only "9,000 yuan received on 5 March" is supported by the receipt. Record the sentence as pending verification.
  3. Input a paper empty result [] and check how the downstream design handles an empty result. Do not claim that a fictional rule retrieval necessarily returns []. Record only the actually observed returned content and failure branch.