Quantum: add az quantum workspace user list command - #10215
Quantum: add az quantum workspace user list command#10215Konstantin Averkiev (kaverkiev) wants to merge 22 commits into
az quantum workspace user list command#10215Conversation
|
Hi Konstantin Averkiev (@kaverkiev), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
az quantum workspace user list command
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR adds a new az quantum workspace user list command to the Quantum extension to enumerate Azure RBAC role assignments relevant to an Azure Quantum workspace, with optional inclusion of inherited (parent-scope) assignments, and updates tests/help/versioning accordingly.
Changes:
- Added
quantum workspace user listcommand wired to a newlist_usersoperation and atransform_userstable transformer. - Introduced
--include-inheritedsupport and updated help text for the new command. - Added unit tests + a live scenario check; bumped extension version and updated
HISTORY.rst.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/quantum/setup.py | Bumps extension version to 1.0.0b21. |
| src/quantum/HISTORY.rst | Adds release notes entry for the new workspace user list command. |
| src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py | Adds unit tests for scope/flags/transformer and a live scenario assertion for listing users. |
| src/quantum/azext_quantum/operations/workspace.py | Implements list_users() using role assignment listing + filtering. |
| src/quantum/azext_quantum/commands.py | Adds transform_users and registers az quantum workspace user list. |
| src/quantum/azext_quantum/_params.py | Adds --include-inherited argument; updates --role help to cover list behavior. |
| src/quantum/azext_quantum/_help.py | Adds help + examples for quantum workspace user list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
🤖 PR Validation —⚠️ Review suggested
Summary
Adds az quantum workspace user list to list the users (user principals) with access to an Azure Quantum workspace. To match the Azure Quantum portal, only user principals are listed — groups and service principals are excluded. Supports --role (defaults to Quantum Workspace Data Contributor) and --include-inherited (to also include access inherited from the parent resource group/subscription).
Details
Lists Azure RBAC role assignments scoped to the workspace.
Supports --assignee, --assignee-object-id, and --role filters (reuses the existing workspace user params).
Adds an opt-in --include-inherited flag to also surface access inherited from the parent resource group and subscription (assignments granted above the workspace scope).
Testing
New unit tests: scope construction, --include-inherited pass-through, and table transformer.
Added a live user list check to the test_workspace_user scenario.
Manually verified against a live workspace (default vs --include-inherited).
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.