Grant indirect read on Privacy Notice tables in Privacy Notice Impl. - #9838
Merged
Merged
Conversation
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
onbuyuka
marked this pull request as ready for review
July 29, 2026 22:23
onbuyuka
enabled auto-merge
July 29, 2026 22:25
msft-sam
approved these changes
Jul 30, 2026
darjoo
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Least-privilege companion to the platform change microsoft.ghe.com/bic/BC-Platform!45667, which adds
InherentPermissions = rX(indirect read) to thePrivacy Notice(2000000237) andPrivacy Notice Approval(2000000238) system tables.Privacy Notice Impl.CheckPrivacyNoticeApprovalStatereadsPrivacy Noticeand — via theEnabled/DisabledFlowFields —Privacy Notice Approval. In service / Copilot / MCP sessions the capability check runs before a company is opened, so role permissions resolve toNoneand 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
Permissionsproperty so the platform's inherentrXcan be promoted to the direct read thatGet()/CalcFieldsrequire:This is the classic
Permissionsproperty (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
PlatformCoreNST with a non-SUPER user (D365 BASIC) hitting the Copilot capability path (18023807on 2000000237). With the platformrXchange + this indirect-read change published, the capability check succeeds.Work item: AB#644260