manifest: add access_policies key and guided access-policies command - #307
Merged
Conversation
Adds the access_policies config key — a JSON array of allow/deny statements that supersedes disabled_features and can scope a rule to documents by Purview sensitivity label. The build script recognizes the key (warn-only shape check for a JSON array), manifest.md documents it alongside disabled_features, and a new access-policies command walks the admin through fetching label GUIDs, choosing statements, and the matching rules to explain before shipping.
The build script now parses access_policies and warns on each statement that fails the grammar — bad effect, unknown resource or identifier type, an operator the identifier type does not support (a GUID takes only equals | exists), an empty identifiers array, a blank action slug. These are the shapes the add-in drops silently, so the build is the only place they get caught; an unparseable value is fatal. Docs: add a statement-grammar reference and the full feature-slug list to access-policies.md, sync the disabled_features table in manifest.md with all four slugs, add the missing access_policies field to bootstrap.md, and fix the parent-label prefix example to include the " - " separator.
mwshortt
approved these changes
Aug 4, 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.
access_policiesis a JSON array of allow/deny statements that supersedesdisabled_features— same off-switch, plus aresourcethat scopes a rule to documents matching a Purview sensitivity label. This adds the config key with structural validation, documents it inmanifest.md, and adds a guided/access-policiescommand that walks the admin from label GUIDs to a finished array.The validator warns on exactly the shapes the add-in drops silently at runtime, so the build is the only place they're caught. Docs also gain a grammar reference + slug tables (
access-policies.md,manifest.md) and the missingaccess_policiesfield inbootstrap.md.Test plan
node build-manifest.mjs office out.xml … access_policies='[…]'→ value baked into the taskpane URL, URL-encoded; valid statements produce no warnings.warn:naming the statement/identifier: guid +startsWith;equals: ""; emptyidentifiers; blank action slug; non-stringdescription; badeffect/type; two operators; top-level object. Invalid JSON → exit 1.python3 scripts/check.py→ 0 issues.