Skip to content

Decision: separate the record axis from the field axis — View All / Modify All stop voting on fields, a read-only viewAllFields bit carries the admin channel (end state, v19) #34365

Open
3 of 5 issues completed

Description

@objectstack-fleet

triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

Ruled: 6912661484 · letter A · 2026-11-16T09:29Z

Filing gate: ② a decision the maintainer made in the triage seat's thread, recorded so the design has one home. Origin: the review of PR #34082 (the View All half of #33828). The maintainer asked for a fresh end-state assessment that is not bound by earlier rulings. The assessment checked mainstream platforms on the web, and the maintainer agreed to the result below.

Related: #33828 (p1, open) · PR #34082 (Tier H, awaiting maintainer) · objectstack-ai/hotcrm#2481 · ADR-0066 D2 ⑧ (the notes of 2026-11-02 and 2026-11-15) and ⑦ (muting).

维护者速读

  • 定了什么:权限分三层,各管一件事:

    • 表权限:能不能用这张表;
    • 记录范围:能看谁的记录;
    • 字段:能看哪些列。

    "查看全部记录"(View All)和"修改全部记录"(Modify All)以后只管记录,不再自动让字段可读或可改。需要看全部字段的角色,用一个新的只读开关 viewAllFields。

  • 不变的:

    • 字段默认可见,开发者只为例外写字段设置,不用逐个授权;
    • 权限集之间仍然取最宽;
    • 平台自带的管理员体验不变,因为内置管理员权限集会带上 viewAllFields。
  • 为什么:

    • 现在一个权限集的 View All 会让另一个权限集隐藏的字段重新可见,hotcrm#2481 就是这类问题。
    • 主流平台的表级"看全部"都不会解开字段限制:Salesforce、Dataverse、ServiceNow、Odoo 都是这样。
    • Salesforce 在 2025 年专门加了只读的 "View All Fields",这正是本方案的先例。
  • 怎么走:

    1. 先合并 fix(core, plugin-security, lint)!: a permission set's own field-mask row binds its own holders over that set's View All vote #34082;
    2. 下一个小版本只加不改;
    3. 19 大版本切换行为。切换时自动转换,现有应用行为保持不变。
  • 两个拍板点:

    • viewAllFields 只给可读,不给可编辑;
    • 工资、身份证号这类字段,引导开发者用字段能力门(requiredPermissions),不要只靠权限集里的隐藏。

    两点都已同意。

Ruling

The maintainer ruled in the triage seat's thread on 2026-11-16, verbatim: 「同意,立决策卡」.

That reply answers the full proposal below and both decision points, as proposed:

  • (1) viewAllFields is read-only;
  • (2) sensitive fields are steered to the field capability gate.

Earlier in the same thread, the maintainer asked for the assessment 「不考虑我的裁决」. The ruling therefore sets the end state. It changes no behaviour before the steps below land.

The model

Axis 1: object permission. allowRead, allowCreate, allowEdit and allowDelete decide whether the caller can use the object at all. Unchanged.

Axis 2: record scope. viewAllRecords and modifyAllRecords widen which records the caller reaches, and nothing else. In the end state they cast no field vote: superuserFieldVote stops existing as a field-vote source.

Axis 3: fields.

  • Default-visible stays. ADR-0066 ⑧ block-list posture: a field no set names follows the object grant. Developers write rows only for exceptions.
  • Union across sets stays: the most permissive answer wins.
  • Inside one set, specific beats general. A set's own explicit field row is its whole say on that field, and beats any "all" bit on the same set. This generalises the rule fix(core, plugin-security, lint)!: a permission set's own field-mask row binds its own holders over that set's View All vote #34082 lands for View All.
  • A set that grants the object but names no field casts no field vote. It cannot re-open a field another set hides. This is already the behaviour; it becomes a stated rule.
  • The new object-permission bit viewAllFields: true casts a read vote on every field of the object, including fields added later. It casts no edit vote. Edits come from the default (a field no set names), or from explicit editable: true rows. Muting/deny remains ADR-0066 ⑦'s layer and is not built here.

Sensitivity tiers (author guidance).

  • Ordinary fields: nothing to write.
  • Role-dependent fields: fields rows in permission sets.
  • High-sensitivity fields: salary, ID numbers and similar. Use the field-level requiredPermissions AND-gate (ADR-0066 D3), plus maskingRule where a partial value is needed. No permission set can re-open these. Lint and the authoring rules should steer authors to it for these fields.

Metadata examples

Illustrative field names. Only viewAllFields is new; every other key exists today.

// Consultant: reads every account (duplicate checks) but not the payment roll-up.
{ name: 'sales_consultant',
  objects: { crm_account: { allowRead: true, viewAllRecords: true } },   // records only
  fields:  { 'crm_account.collected_total': { readable: false } } }
// End state: still hidden even if the holder also has another set with View All
// on crm_account, because View All no longer votes on fields.

// Manager: all records, all fields readable, but one field read-only.
{ name: 'sales_manager',
  objects: { crm_account: { allowRead: true, allowEdit: true,
             viewAllRecords: true, modifyAllRecords: true, viewAllFields: true } },
  fields:  { 'crm_account.credit_limit': { readable: true } } }   // own row beats own "all" bit: read-only

// Finance: an explicit grant re-opens a field another set hides (union).
{ name: 'finance',
  objects: { crm_account: { allowRead: true, viewAllRecords: true } },
  fields:  { 'crm_account.collected_total': { readable: true },
             'crm_account.credit_limit':    { readable: true, editable: true } } }

// High-sensitivity: declared on the field itself; no set re-opens it.
salary:    { type: 'currency', requiredPermissions: ['hr.view_compensation'] },
id_number: { type: 'text', requiredPermissions: ['hr.view_identity'], maskingRule: { /* … */ } },
// granted by:  { name: 'hr_specialist', systemPermissions: ['hr.view_compensation'], … }

// Built-in admin sets gain the bit on the wildcard entry, so admins see no change.
objects: { '*': { /* existing bits */ viewAllRecords: true, modifyAllRecords: true, viewAllFields: true } }

Staged path

  1. Now. Land PR fix(core, plugin-security, lint)!: a permission set's own field-mask row binds its own holders over that set's View All vote #34082 as it is: own row beats own View All.
  2. Next minor (additive only).
    • Add viewAllFields to ObjectPermissionSchema (packages/spec/src/security/permission.zod.ts).
    • Make the field merges honour it: getFieldPermissions and buildEffectiveFieldPermissions.
    • Put it on admin_full_access and organization_admin (packages/plugins/plugin-security/src/objects/default-permission-sets.ts).
    • At this step it duplicates today's votes, so nothing behaves differently.
    • New lint warning: "this set's View All / Modify All re-opens a field another set hides".
    • os explain names which channel opened a field.
  3. v19 (major).
    • viewAllRecords and modifyAllRecords stop voting on fields.
    • One ADR-0087 mechanical conversion adds viewAllFields: true to every object entry that carries either bit. Behaviour is kept verbatim, and authors remove the bit where it isn't wanted.
    • One semantic upgrade-guide entry.
    • security-superuser-field-mask-inert retires.
    • After conversion, the only remaining behaviour change is "Modify All plus the same set's own editable: false / readable: false row". Lint already names that case.
  4. hotcrm.

Checks before implementation

  • No field-row wildcard exists on main. Field rows are keyed object.field only. So viewAllFields cannot be replaced by an existing spelling, and the new bit is needed.
  • Every place that enumerates the superuser bits must learn the new one, or it becomes an over-grant or a false refusal. At least:
    • packages/plugins/plugin-security/src/agent-ceiling-clamp.ts
    • packages/plugins/plugin-security/src/delegated-admin-gate.ts
    • the no-wall admin-set derivation in default-permission-sets.ts
    • the roll-up visibility lint (packages/lint/src/validate-rollup-source-visibility.ts)
    • the access explanation.
  • Clause-② / metadata protocol. Step 2 widens the authorable surface with a new key. Step 3 is a semantic change carrying a mechanical conversion. Each step declares this in its own PR.
  • ADR text. ADR-0066 D2 ⑧ gets a new note at step 2, and the end-state note at step 3. Governed text: Tier H at each step.

Mainstream reference (checked 2026-11-16)

  • Salesforce. View All / Modify All were renamed "View All Records" / "Modify All Records". They bypass sharing, not field-level security. "View All Fields" is a separate object permission that grants visibility to every field, including future ones (Trailhead, Spring '25 and Winter '26). Field security there is allow-list shaped.
  • Dataverse. Columns are visible by default. A secured column is closed to everyone not in a column-security profile; table privileges do not open it. "Column-level security doesn't apply for users who have the system administrator role." (Microsoft Learn, column-level security).
  • ServiceNow. A field with no field ACL follows the table.* ACL. A field ACL is not overridden by the table or wildcard ACL. Admin override can be turned off per ACL.
  • Odoo. Fields are visible to anyone with model access unless the field declares groups.

Sub-issues

Sub-issues

3 of 5 Issues completed
Loading 5 sub-issues

Activity

  1. added
    priority:p2
    needs-user-decision
    domain:server
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Maintainer ruling · 2026-11-16T09:32Z

    The maintainer ruled in the triage seat's thread at 2026-11-16T09:29Z, verbatim: 「同意,立决策卡」.

  3. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    2026-11-17T08:33Z Label residue cleared. This card was ruled on 2026-11-16T09:29Z (record 6912661484, 「同意,立决策卡」); the needs-user-decision label was left behind. It moves to pm:queue in this stroke: the ruling says the implementation cards are cut from this card after PR #34082 merges, and #34082 merged at 2026-11-16T21:40Z, so cutting them is the next step. No new ruling.

  4. added
    pm:queue
    and removed
    needs-user-decision
    on Nov 17, 2026
  5. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibzFAE8YRsK8YCDAeLL

    2026-11-21T11:29Z Implementation cards cut from this ruled card (ruling 6912661484), per its staged path. PR #34082 merged 2026-11-16T21:40Z and the ADR wording follow-up PR #34483 merged 2026-11-17T03:02Z, so step 1 is done. All five are linked here as sub-issues, carry area:data only, and leave domain, queue and grade to triage (each body suggests p2).

    Step Card What Blocked-by Behaviour change
    2 #36050 viewAllFields spec key, both field merges, built-in admin sets, every super-user-bit reader, ADR-0066 D2 ⑧ step-2 note — none (duplicates today's votes)
    2 #36051 os explain names the channel that opened a field #36050 none
    2 #36052 lint warning: one set's View All / Modify All re-opens a field another set hides; steers high-sensitivity fields to requiredPermissions #36050 none (warning)
    2 #36053 skills: teach the three axes, viewAllFields, sensitivity tiers (the Skills-docs: follow-up #36050 owes) #36050 none
    3 #36055 v19 major: View All / Modify All stop voting on fields, ADR-0087 conversion, security-superuser-field-mask-inert retires #36050, #36052 yes — built only on the maintainer's go-ahead, ships in v19

    Step 4 (hotcrm): the hide rows hotcrm#2481 needed have landed (hotcrm#2481 closed). The sales_manager explicit-rows clean-up is owed only after the v19 conversion; #36055 files it when it lands.

    Next: seat 7 builds #36050 first (additive, no behaviour change). This card stays open as the parent until #36055 lands.

  6. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-tesla · session_01L9qibzFAE8YRsK8YCDAeLL

    2026-11-21T14:11Z Pointer. Seat 7 stops taking new cards (maintainer, verbatim, via the seat: 「你已经不需要接新卡了,这些任务处理完就下班」). Card thread c-34365 finishes #36050 only: PR #36085 is L1 ACCEPT (7063599142) and L2 PASS (7063858938) on head 68d5bb9762, handed to seat 7 for the Tier H approval. #36051, #36052 (now also carries the security-wildcard-vama arm), #36053 (now also carries the review's teaching items) and #36055 stay in the queue unclaimed for a later seat; #36055 still needs the maintainer's go-ahead before it is built.

  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As8wf3DSPRevwNnYLcM

    Pointer · 2026-11-25T23:10Z: step 3 (#36055, the v19 switch) has the maintainer's go-ahead, ruled on #36055 (option A 「现在开工,进 19.0」, 2026-11-25T23:04Z). Seat 7 claims and dispatches it now.

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:datadomain:serverpm:queuepriority:p2security

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions