Skip to content

Approver without object read cannot open the live record or attachments under review #39485

Backlog

Description

@objectstack-fleet

repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4cxiJF5PkqquFk98Bh7

Problem

Split from the #39406 ruling (option E, analysis #39406 (comment)). E lets an approver see the submitted snapshot. An approver whose permission sets do not grant read on the object still cannot open the live record or its attachments from the approval request. The #26180 ruling and PR #26397 point in different directions on whether that approver should.

Choice

Whether an approver gains read on the record (and its attachments) under review for the life of the request, or stays limited to the served snapshot. The four-axis analysis is owed on this card.

Area: workflow

Activity

  1. added
    priority:p2
    needs-user-decision
    area:workflow
    domain:server
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-elon-musk · os-elon-musk · session_016WV4d1EmrT9nkiXCRc8o9b

    Decision analysis — #39485: does the pending approver's read of the record reach an approver who holds no read on the object?

    维护者速读

    • 问题:审批人没有这类单据的查看权限时,只能看到提交时的内容,点不开单据本身,也下载不了合同这类附件;把「提交人的上级」设为审批人的新公司,第一张带附件的审批就会碰到。此前已经定过「待审期间审批人可以看这一条单据」,但落地只做了一半:只照顾到本来就有这类单据权限、只是看不到这一条的人。
    • 选项:按原裁决补齐(待审期间审批人能打开这一条单据及其附件和评论,批完即收回,同类的其他单据一条也看不到,约 1 个 PR);维持现状并把口径改成「审批人只看提交内容」(附件打不开,想看只能由管理员给整类单据授权,0 个 PR);只放开附件(能下载文件,看不到单据现状,约 2 个 PR,要多养一套放行规则);给每条流程加一个可配开关(2 个以上 PR,此前已定过不加新配置)。
    • 推荐:按原裁决补齐,因为批合同却打不开合同文件等于盲批,钉钉、飞书的审批人一向能打开表单里的附件;而且只开这一条、批完收回,比让管理员给整类单据授权开得小得多。
    • 不定会怎样:审批人看得到字段却打不开附件,管理员只能给每个可能当审批人的上级开整类单据的查看权限,否则审批人照旧盲批。

    Served-tier: CONTRACT_REVIEW_TIER
    Analysed-by: session_016WV4d1EmrT9nkiXCRc8o9b

    Background

    Ruling 6429330267 on #26180 (letter A) gave the pending approver a read of the one record a request is about. PR #26397 (+1049/−2, 12 files) landed it as one more arm of the record-sharing filter and wrote down a narrowing the ruling does not contain: 「the approver still needs read on the object itself, as for any record share」 (PR body, Acceptance notes; repeated in the three changelogs). The ruling on #39406's design-time half (record 7399225992, option E of analysis 7398609383) then settled the page: an approver without object read is shown the submitted snapshot. That analysis named this card as the gap E leaves: the live record, its attachments and its files stay closed to that approver.

    Is the ruling ambiguous, or did the PR under-deliver? Neither word fits exactly; the reading is this:

    • The ruling's operative sentence is unqualified: 「each resolved person on the current step's slate (and the override holder) may read the one record the request is about」. It lists its bounds (read only, one record, only while pending, no new key) and "holds read on the object" is not among them.
    • The ruling's stated reason for rejecting snapshot-only (its letter C) is 「a copy of the data in the request, attachments still out of reach」. Under the landed narrowing an approver without object read is in exactly that rejected state.
    • The ruling never mentions object-level permission in either direction. Its measured case (plugin-approvals: the approver a step waits on gets no read of the record it is about — "无法打开此记录" on the request they must decide #26180: the record URL answered 「未找到记录」, a row-level answer) and the landed test (every user holds allowRead on the fixture object) are both the "holds the object, misses the row" case. The PR delivered that case in full.
    • The narrowing was disclosed, not hidden: Acceptance notes, changesets, and a contract-tier review PASS (6431927981) plus seat ACCEPT (6432091174). It was never put to the maintainer. The ruling asked for a fork only if a declarable switch became necessary, so nothing forced the question back.

    So: the ruling's words cover this approver; the implementation chose a narrower reading on its own and said so; no maintainer decision ever chose the narrow reading. That is why this is a decision card and not plain execution, and also why the default (spec and ruling over implementation) points at completing it.

    Governing text

    • Ruling 6429330267 on plugin-approvals: the approver a step waits on gets no read of the record it is about — "无法打开此记录" on the request they must decide #26180, quoted above. Also: 「no children beyond what the record page reads for a reader (attachments only as ADR-0104's download authorization inherits the parent read); the grant exists only while the step is pending and ends when the step resolves; explain names it」 and 「no new metadata key, no app declaration」.
    • packages/plugins/plugin-approvals/src/payload-redaction.ts:55 (seam of PR fix(approvals): apply the subject object's field-level read controls to the payload snapshot at serve time #11039 under ruling 5377367175): 「An approver routinely has no read grant on the object under approval at all — that is the normal shape of an approval」. The platform's own text calls this card's approver the normal case.
    • ADR-0104 D3 wave 2, step 2: 「Governed download — read authorisation derived from the one owning record」.
    • packages/core/src/security/readable-parent-ids.ts:14-25: one evaluator decides parent readability for comments, activity, attachments and mail, 「so a record can never be readable under one gate and unreadable under another — ⛔ do not hand-copy this probe into a gate」.
    • ADR-0090 D12 (ruling of record 6663849489) as landed at security-plugin-authz-middleware.ts:1314-1328: 「One admission beside the grant」, confined to an id IN <covered> scope. The only landed case of a read admitted without an object grant, and the shape the first option below would reuse.
    • ADR-0106 object-level visibility amendment (6787890900) and its approvals exception (6840464379): a caller who may not read an object gets no definition of it; the exception was 「declared by the owning plugin, not as a name list in the gate」.
    • SKILL.md 〈升级与决策〉: 「spec 声明 > 实现 > 文档面;声明而未兑现是实现缺口,补实现或退役」; decision-analysis.md: 「契约迁就实现、分期半量(缺陷除外)⛔ 不荐」, 「安全/权限边界与破坏性难逆动作恒在人工地板」; meta-criterion ② (one operation, two implementations: the governed side wins).
    • Searches: git grep -n -iE 'approver.{0,80}(read|see|view|permission)' origin/main -- AGENTS.md docs/adr/0019-approval-as-flow-node.md docs/adr/0043-actionable-approval-links.md docs/adr/0044-approval-send-back-for-revision.md → 0 hits. ADR-0155 names the approval arm as a sibling of the sharing filter (lines 162-163) and says nothing on object admission. No ADR states whether an approval overrides a missing object grant.

    Protocol statement

    No option but the last changes what a metadata author can write. Options one to three are Clause-②: no, Metadata-protocol: none. The first changes a runtime security boundary (who is admitted to read a row of an object their permission sets do not grant). The fourth adds an authorable key (Clause-②: yes (widening), Metadata-protocol: added).

    Premises, each with its re-check (origin/main 5c2a41a)

    1. The landed grant is row-level only. git show origin/main:packages/plugins/plugin-approvals/CHANGELOG.md | grep -n 'still needs read on the object itself' → line 3007.
    2. The object grant is asked before any row filter, and exactly one admission stands beside it, for another object. git show origin/main:packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts | grep -n 'delegatedUnitScope = await delegatedUnitReadScope' → line 1328; git grep -n -i 'pendingApprover' origin/main -- packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts packages/plugins/plugin-security/src/security-plugin-object-admission.ts → 0 hits.
    3. The landed test never exercises an approver without object read. git show origin/main:packages/qa/dogfood/test/approval-pending-approver-record-read.dogfood.test.ts | grep -n 'allowRead: true' → line 112 (the baseline set every fixture user holds).
    4. Attachments and field-owned files follow the caller's read of the owning record, through one evaluator. git show origin/main:packages/services/service-storage/src/storage-service-plugin.ts | grep -n "can READ the file's parent record" → line 1913; git show origin/main:packages/core/src/security/readable-parent-ids.ts | grep -n 'object-level CRUD decide' → line 17.
    5. The snapshot is the whole submitted record minus internal fields, served by field-level rules without an object-level gate. git show origin/main:packages/plugins/plugin-approvals/src/approval-service.ts | grep -n 'private snapshotRecord' → line 13067; git show origin/main:packages/plugins/plugin-approvals/src/payload-redaction.ts | grep -n 'does not gate on OBJECT-level' → line 55.
    6. An agent acting on behalf of an approver gets no approval read. git show origin/main:packages/plugins/plugin-sharing/src/sharing-service.ts | grep -n 'context.onBehalfOf?.userId) return NO_APPROVAL_GRANTS' → line 947.
    7. Position and team literals grant nobody; the slate is the pending-approver index, rewritten on every slate change. git show origin/main:packages/plugins/plugin-approvals/src/pending-approver-read-grant.ts | sed -n 19,37p.

    Premises 2 and 4 are code readings. No test on main pins "pending approver without object read is refused the record and its files"; nothing was run in a browser for this analysis.

    1. The question in one sentence

    A manager asked to approve a contract can read the fields that were submitted but cannot open the contract itself or download the file attached to it, unless an administrator has separately given them access to all documents of that kind: should being the pending approver be enough to open that one document?

    2. Options × real cost × effort

    What is built What the customer sees Effort
    A Honour the ruling in full While a step is pending, the people the landed grant already names are admitted to read that one record even when no permission set grants them the object. The admission is confined to the vouched record ids (it must AND with them, never fall through to the object's ordinary sharing answer), reads only, no export. Attachments, field-owned files, comments and activity follow through the one parent evaluator with no storage change. The record's definition is served to them while a request is pending, so the page draws typed fields. explain keeps naming the request. The manager opens the contract from the request, reads its current state, downloads the attached file, reads its comment thread. Other contracts stay invisible. The moment the step resolves, all of it closes again. The administrator grants nothing. domain:server · 1 PR, contract-review tier · precedents: #31142 (+287/−29, 8 files: one scoped admission beside the grant answered identically by the read door, the object-read answer, the read filter and explain) and #26397 (+1049/−2, 12 files: the grant itself with its tests). M to L. A ui follow-up only if the request page's record link needs one: not measured.
    B Keep row-level; amend the ruling Nothing. A ruling record on #26180 states that the snapshot is the approver's view and that the live record needs an object grant. The manager reads the submitted fields (after the page fix now in flight) and cannot open the record or any file on it. An administrator who wants more gives the approver's permission set read on the whole object; on an object whose rows are readable org-wide that opens every row, permanently. 0 code PRs; one ruling record and a docs sentence.
    C Attachments only The download door admits the pending approver to files owned by, or attached to, the record under request, without admitting a read of the record; the request page lists them. The manager reads the submitted fields and can download the contract file. They cannot see the record's current state or its comments. domain:server 1 PR + domain:ui 1 PR · 无先例 for a download admitted without a read of the owning record on an application object (nearest landed: #22697, +1251/−65, 8 files, a delegate verdict for file metadata on an object that declares a delegate; a different mechanism).
    D A per-flow switch A declared key on the approval step ("approver may open the record"), enforced as A when on. Each app author decides per process; default off leaves today's behaviour. domain:spec + domain:server · at least 2 PRs · 无先例. Ruling 6429330267 already excluded it: 「no new metadata key, no app declaration」.

    Effort gap: B is zero code and A is one M to L PR, well over 3×. The readings on ① are not close (see below), so the gap does not weigh, and it is named here as the template requires.

    3. What each option means in business terms

    • A: the folder travels with the approval. Whoever is asked to sign gets the one folder on their desk, with its enclosures, and hands it back when they have signed.
    • B: the approver gets a photocopy of the cover sheet. To see the enclosures they need a key to the whole filing room.
    • C: the photocopy plus the enclosures, handed over by a second clerk with his own rulebook.
    • D: every department writes its own policy on whether the folder travels.

    4. The four axes, argued from the business

    • ① 项目长远合理性: A. End state in two years: being the pending approver of a document is by itself enough to open that document and what is attached to it, for as long as the decision is pending, and nothing else of its kind; administrators never widen object-wide access to make approvals workable. That is how the mainstream is modelled, from memory and not re-read for this analysis: DingTalk and Feishu approvals (the approver always opens the form and every file on it), Salesforce approval processes (the request page shows the fields the administrator chose, and the approver is expected to reach the record), ServiceNow approvals (the approval record summarises the task and the approver opens it read-only), Dynamics and Power Automate approvals (the request carries the details and links the item). A adds a second admission beside the object grant (today there is one, for business units), which is contract growth and is counted against it; in exchange it removes a standing divergence, because the server already hands this person every submitted value while refusing them the document those values came from. B settles the divergence by rewriting the ruling to match the code, which the rules name as not recommendable, and its only remedy for customers is an object-wide grant: a wider opening than A, and permanent. C puts a second rule for file bytes beside the one evaluator the platform insists on. D adds a permanent authorable key for a choice already ruled.
    • ② 实际业务拉动: no production customer exists. The pull is two measured walkthroughs: plugin-approvals: the approver a step waits on gets no read of the record it is about — "无法打开此记录" on the request they must decide #26180 (hotclm, two personas, a contract approved without opening it) and approvals: an approver without read on the object sees a blank request page, and nothing warns when the flow is saved #39406 (a new company whose approver is the submitter's manager, the default, on an object the manager's sets do not mention). The second is this card's exact case and every new company with a restricted object meets it on its first approval. The specific pain is the attached file: an approval of a contract, a quote or an expense claim is a decision about a document. Nobody has asked for C or D by name.
    • ③ 防 AI 犯错: under A an app whose author forgot to grant approvers the object still yields a workable approval, so the mistake cannot be made; under B the mistake is silent until an approver complains, and the obvious repair an AI author would write is an object-wide read for managers. A's own failure mode is the dangerous one and must be said plainly: if the admission were composed wrongly it would leak silently (other rows of the object), not refuse loudly. That is a reason for the pins listed under execution, not for another letter. B fails loud (the approver is refused), C can fail silently in either direction because two rules answer one question.
    • ④ 创业阶段不扩散: A declares nothing and adds no gate; its permanent cost is one more admission arm in the security path, with its tests. B is the cheapest today and exports the cost to every customer's administrator. C adds a second rule to keep in step forever. D adds a key, which is a permanent obligation, against 「每个已声明的键都是永久义务」.

    Prior rulings read: approver,object,read,open,live,record,attachments,review → 459 hits; ADR-0030 Decision §2, ADR-0099 D3, ADR-0139 D4, ADR-0146 D11, ADR-0150 D2, ADR-0155 D1 (named by the script on title terms; read, none answers whether an approval admits a read without an object grant), plus ADR-0090 D12 (6663849489), ADR-0104 D3, the ADR-0106 amendment (6787890900) and its approvals exception (6840464379), rulings 6429330267 (#26180), 5377367175 (#10749) and 7399225992 (#39406); thread: none; repo: objectstack-ai/objectstack

    5. Who reads what under each option (human floor)

    This is a permission boundary. It is on the human floor: no seat may choose it, and nothing below is a licence to build before the maintainer answers.

    Who the grant names today (unchanged by any option): each person on the current step's slate, matched by user id or by the e-mail of their own account; a person routed onto the slot by an out-of-office delegation or a reassignment (they are then on the slate, and the person who left it is not); the override holder, for pending requests of their own organization. Not named: a position or team that resolved to nobody; anyone in another organization, the platform administrator included; an agent acting on behalf of an approver; a voter who has already voted on a multi-voter step (they leave the slate when they vote); the submitter.

    The record Other rows of the object Attachments and files on the record Comments, activity Related records After the step resolves
    Today, approver holds the object current values, field rules apply only what ordinary sharing gives yes, while pending yes, while pending only objects they hold back to ordinary sharing; the snapshot stays on the request
    Today, approver lacks the object refused; the submitted snapshot only (all submitted fields except those explicitly hidden or masked for them) none refused refused none snapshot stays on the request
    A current values, field rules apply; includes edits made after submission none yes, while pending yes, while pending none unless they hold that object; lookup names of objects they do not hold stay unresolved all of it closes at the next read; the snapshot stays
    B as "lacks the object" today none, unless the administrator grants the object, then whatever sharing gives, permanently refused refused none n/a
    C snapshot only none file bytes yes, while pending refused none file access closes; the snapshot stays

    Three things under A that the maintainer should know before choosing it:

    • The override holder is in the ruling's words. Under A an organization administrator who holds the override reads every record that has a pending request in their organization, including records of objects no permission set gives them. They can already decide those requests and are already served the snapshots, so the new disclosure is the live values, the files and the comment thread. Recommended: keep as ruled.
    • Field security still decides which fields appear, but an approver whose sets do not mention the object has no field entries, so they see every field that is not explicitly hidden or masked. That is the same set the snapshot already gives them.
    • A file already downloaded stays downloaded, and a download link minted while the step was pending may outlive it by its expiry window. The length of that window was not measured.

    6. Recommendation

    A. Honour the ruling in full, in one PR, with the conditions under execution.

    • Not B: it amends a standing ruling to match what the code happened to do, leaves the approver in the state the ruling rejected when it turned down snapshot-only, and makes an object-wide grant the only way out. It is the cheapest and the loudest on failure; neither moves ①.
    • Not C: it serves the strongest need (the file) but creates a second authorization rule for the same bytes, against the single-evaluator rule and meta-criterion ②, and costs more PRs than A.
    • Not D: already excluded by ruling 6429330267; a key with no caller asking for it.

    No staging is proposed: A is one admission arm and splitting it (record first, files later) would ship the half the ruling rejected.

    Self-check: 只看①选 A;②③④ 是否翻转:否.

    Confidence gaps (none changes the recommendation):

    • Premises 2 and 4 are read from code, not run. The first step after a ruling for A is the red test.
    • Whether the approver measured on hotclm in plugin-approvals: the approver a step waits on gets no read of the record it is about — "无法打开此记录" on the request they must decide #26180 held read on the contract object was not re-measured; the row-level reading rests on the not-found answer quoted in that card and on the landed fixture.
    • The reference-platform sentence is from memory, not from vendor documentation read in this session.
    • Serving the object's definition to the approver while a request is pending may also surface the object in their navigation for that period; whether it does, and whether that is wanted, was not measured. If it is not wanted the definition stays withheld and the page keeps drawing the snapshot as ruled on approvals: an approver without read on the object sees a blank request page, and nothing warns when the flow is saved #39406.
    • Whether the request page renders file fields of the snapshot as download links today was not checked; under B those links would be refused.
    • Download-link expiry after the step resolves: not measured.
    • The comment thread and activity feed of the record become readable under A. The ruling's bound 「what the record page reads for a reader」 covers them, but the maintainer may read that more narrowly; if so, say so in the ruling and the admission is confined to the record and its files.

    Post-ruling execution

    • If A: the seat files the execution card in domain:server (p2, security, area:workflow), Clause-②: no, Metadata-protocol: none, review at the contract-review tier, Ruling-ref: this card's ruling record and 6429330267. The dev first writes the red test on a real boot: an approver whose permission sets do not mention the object is refused the record and its attachment on main. If that test is green on main the premise is false: report a fork, build nothing. Then one admission beside the object grant, one judgment asked by the read door, the object-read answer, the read filter and explain (the fix(plugin-security): canReadObject, getReadFilter and security/explain answer the delegated business-unit read as the read door does #31142 shape), fed by the approvals service's existing answer; no new key. Pins the PR owes, each at the HTTP level: the approver reads the record and downloads its attachment while pending; another row of the same object is not found, on a private object and on an org-wide readable one; list, count and aggregate return only the vouched rows; write and export are refused; a stranger, a voter who has voted, an on-behalf-of agent and a caller from another organization get nothing; after approve, reject and reassignment the previous approver is refused the record and the file. The changelog sentence 「the approver still needs read on the object itself」 is corrected in the same PR's changeset. No fallback to B or C if a pin cannot be met: fork.
    • If B: the seat records the amendment on plugin-approvals: the approver a step waits on gets no read of the record it is about — "无法打开此记录" on the request they must decide #26180 (the snapshot is the approver's view; the live record and its files need an object grant), adds the sentence to the approvals docs page through the docs lane, and closes this card. No code.
    • If C: two cards (domain:server, then domain:ui), contract-review tier on the first; the server card must state which rule wins when the download door and the record read disagree.
    • If D: a spec card first (Clause-②: yes (widening), Metadata-protocol: added), which reopens ruling 6429330267's 「no new metadata key」 and needs that said in the ruling.

    Related

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:workflowdomain:serverneeds-user-decisionpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions