Repository navigation
feat(html-documents): require staff plus organization asset access - #226
Merged
Merged
Conversation
The six private management commands stay organization-bound. The catalog now also requires staff; the server still enforces both, and public share reads are unchanged. Co-authored-by: Weimeng Chen <MikeChenWM@users.noreply.github.com>
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.
Why
Mike asked HTML document management to be staff-only, the same as the admin UI (
收束和 ui 一样), while keeping the existing organization asset checks. Museon-AI/museon#7541 (not merged) putsrequire_staffon every private HTML document route and leavesGET /api/v1/share/html/{token}andby-sluganonymous. That PR's vendored CLI catalog already marks the six private commandsstaffwithstaff_with_organization_asset_access.museon-cliownscontracts/command-catalog.json; until it says the same thing, the nextpnpm agent-cli:contract:syncwould overwrite that snapshot.Changes
No version bump. Package version and
contract_revisionstay 3.0.0.The six private commands (
+upload,+list,+share,+unshare,folder +create,+install-defaults) keeporganization_bound: true,agent_cli.access, andenforcement: museon_server. They now also setrequired_roles: ["staff"]andresource_policy: staff_with_organization_asset_access.CommandSpecalready stores those as separate fields, so the organization boundary is not dropped.The CLI does not enforce staff. A caller the CLI cannot tell is staff still sends
X-Organization-Id; a non-staff denial is the server's 403. Public customer links are not a command and are unchanged. Other domains stayorganization_member(or their existing role).contracts/command-catalog.jsonis byte-identical toapps/api/app/contracts/agent_cli_command_catalog.jsonon museon#7541 (f39a076).Tests
Main-repo sync
0b0050c1cc3766fad20ddd056612b00a90ffdfd883b0ff6a1314474679a44ae9contract_revision:3.0.0museon-climain,pnpm agent-cli:contract:syncshould reproduce that file. Do not sync from currentmuseon-climain before that, or the staff metadata is wiped. No CLI release, tag, or deploy from here.