Skip to content

Grant indirect read on Privacy Notice tables in Privacy Notice Impl. - #9838

Merged
onbuyuka merged 1 commit into
mainfrom
private/onbuyuka/privacynotice-indirect-perms
Jul 30, 2026
Merged

Grant indirect read on Privacy Notice tables in Privacy Notice Impl.#9838
onbuyuka merged 1 commit into
mainfrom
private/onbuyuka/privacynotice-indirect-perms

Conversation

@onbuyuka

@onbuyuka onbuyuka commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Least-privilege companion to the platform change microsoft.ghe.com/bic/BC-Platform!45667, which adds InherentPermissions = rX (indirect read) to the Privacy Notice (2000000237) and Privacy Notice Approval (2000000238) system tables.

Privacy Notice Impl.CheckPrivacyNoticeApprovalState reads Privacy Notice and — via the Enabled/Disabled FlowFields — Privacy Notice Approval. In service / Copilot / MCP sessions the capability check runs before a company is opened, so role permissions resolve to None and the read is denied (NavPermissionException 18023807) for any non-SUPER user, even though the entitlement allows Read.

Change

Add indirect read to the codeunit's Permissions property so the platform's inherent rX can be promoted to the direct read that Get()/CalcFields require:

Permissions = tabledata Company = r,
              tabledata "Privacy Notice" = rim,        // was: im
              tabledata "Privacy Notice Approval" = r; // new

This is the classic Permissions property (indirect grants), not the [InherentPermissions] attribute — the attribute can't reference platform tables (AL0720).

Why this split (least privilege)

The alternative was direct inherent read (RX) on the platform tables alone — a single-repo fix, but it grants direct read to everyone. We chose indirect (rX) on the platform side so only objects that explicitly declare indirect read (like this one) can read the tables, keeping least privilege. The cost is this paired change.

Dependency

Requires the platform PR to ship first (or together) — indirect read here is a no-op without the platform tables' InherentPermissions = rX.

Validation

Reproduced on a local PlatformCore NST with a non-SUPER user (D365 BASIC) hitting the Copilot capability path (18023807 on 2000000237). With the platform rX change + this indirect-read change published, the capability check succeeds.

Work item: AB#644260

Companion to the platform change that adds InherentPermissions = rX to the
Privacy Notice (2000000237) and Privacy Notice Approval (2000000238) system
tables. With indirect inherent read on the tables, the codeunit that reads
them must also declare indirect read so the check can promote it to the
direct read required by Get()/CalcFields.

Privacy Notice Impl.CheckPrivacyNoticeApprovalState reads Privacy Notice and,
via the Enabled/Disabled FlowFields, Privacy Notice Approval. In service /
Copilot sessions the capability check runs before a company is opened, so
role permissions resolve to None and the read was denied (18023807) for
non-SUPER users. Adding indirect read (r) to the Permissions property lets
the platform's inherent rX satisfy the read without granting broad direct
access (least privilege).

AB#644260

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dcbe1b6f-71db-4e4a-8f16-b3167e0c4373
@github-actions github-actions Bot added AL: System Application Integration GitHub request for Integration area labels Jul 29, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 29, 2026
@onbuyuka onbuyuka changed the title Grant indirect read on Privacy Notice tables in Privacy Notice Impl. (AB#644260) Grant indirect read on Privacy Notice tables in Privacy Notice Impl. Jul 29, 2026
@onbuyuka
onbuyuka marked this pull request as ready for review July 29, 2026 22:23
@onbuyuka
onbuyuka requested a review from a team July 29, 2026 22:23
@onbuyuka
onbuyuka enabled auto-merge July 29, 2026 22:25
@onbuyuka
onbuyuka added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit d66fa8d Jul 30, 2026
329 of 337 checks passed
@onbuyuka
onbuyuka deleted the private/onbuyuka/privacynotice-indirect-perms branch July 30, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: System Application Integration GitHub request for Integration area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants