DYN-6107: Disable publish online option for non package owner#17200
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6107
There was a problem hiding this comment.
Pull request overview
This PR updates the Package Manager Wizard bridge layer so the wizard frontend can determine whether the current user is a package owner/maintainer and disable the Publish Online action accordingly, avoiding an error-only-on-click experience.
Changes:
- Adds
maintainersto thereceiveUpdatedPackageDetailspayload built inSendPackageUpdates. - Bumps the
PackageManagerWizardnpm package version to pull in the corresponding frontend behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/DynamoCoreWpf/Views/PackageManager/Components/PackageManagerWizard/PackageManagerWizard.xaml.cs | Extends the JSON payload sent to the wizard WebView to include maintainers from the package header. |
| src/DynamoCoreWpf/DynamoCoreWpf.csproj | Updates the wizard frontend package version to consume the new payload field. |
| payloadObj["maintainers"] = header.maintainers != null | ||
| ? JToken.FromObject(header.maintainers, jsonSerializer) | ||
| : new JArray(); |
Ensure safe payload defaults so the frontend always has a consistent shape
|
jasonstratton
left a comment
There was a problem hiding this comment.
LGTM — the Copilot fix lands correctly. Minor cosmetic notes (the pattern-match is always true given how is built, and there's a small indentation inconsistency on the ternary), but nothing that affects correctness. Ship it.
jasonstratton
left a comment
There was a problem hiding this comment.
LGTM — the Copilot fix lands correctly. Minor cosmetic notes (the payloadObj pattern-match is always true given how rootObj is built, and there is a small indentation inconsistency on the versions ternary), but nothing that affects correctness. Ship it.
|
Ha! Claude approved and added that last comment. It does not sound like me at all. Still, approved! Merging now. |



Purpose
Blocked by PackagePublishWizard#75 - the
@dynamods/dynamo-pm-wizard@0.0.28npm package must be published before this PR can build successfully.This PR aims to address DYN-6107: Pass package maintainers list to the Package Manager Wizard frontend so it can disable the "Publish Online" option for users who are not owners of the package.
Previously, when a non-owner opened the Publish Package dialog for a locally installed package, the "Publish Online" button was active but would error on click. The backend had no way to communicate ownership to the wizard frontend.
Key changes:
SendPackageUpdatesinPackageManagerWizard.xaml.csnow includes amaintainersarray (objects with_idandusername) in thereceiveUpdatedPackageDetailspayload. The data comes from thePackageHeaderalready fetched byTryGetPackageHeaderAsync- no additional network call.PackageManagerWizardnpm package version inDynamoCoreWpf.csprojto pick up the frontend changes that consume the new field.Declarations
Check these if you believe they are true
Release Notes
The Publish Online button in Package Manager is now disabled for non package owners(maintainers).
Reviewers
@DynamoDS/eidos
@jasonstratton
@johnpierson
FYIs
@dnenov