Skip to content

feat(gooddata-api-client): add missing workspace permissions - #1834

Merged
jeskepetr merged 1 commit into
gooddata:masterfrom
jeskepetr:PJE/F1-2924
Sep 29, 2026
Merged

jeskepetr merged 1 commit into
gooddata:masterfrom
jeskepetr:PJE/F1-2924

Conversation

@jeskepetr

@jeskepetr jeskepetr commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes F1-2924.

CREATE_VISUALIZATION (implied by ANALYZE) and CREATE_COMPUTED_ATTRIBUTE (implied by MANAGE) exist in the backend permission hierarchy but were missing from the workspace-permission enums in the generated client. Because both are implied, the workspace meta permissions of every ANALYZE/MANAGE user contains them, so reading a workspace failed deserialization. Declarative permissions and permission assignments containing them could not be read either, and a grant using them could not be built.

Same approach as the CREATE_METRIC change (1c1ae20):

  • Hand edit — schemas/gooddata-metadata-client.json: both values added to the seven workspace-permission enums in backend order (… CREATE_METRIC, CREATE_VISUALIZATION, CREATE_COMPUTED_ATTRIBUTE, VIEW), and the x-gdc-security-info of POST /entities/workspaces/{id}/visualizationObjects switched from ANALYZE to CREATE_VISUALIZATION.
  • Generated by make api-client-local — the merged schemas/gooddata-api-client.json and five model files.

No gooddata-sdk change is needed; it passes permission strings through. The computed-attributes endpoint guarded by CREATE_COMPUTED_ATTRIBUTE is not in the specs yet and is left for a full re-download. I checked every other permission enum (organization, data source, dashboard/object, user, user group) against gdc-nas master, and they all match.

Test plan

  • Constructing JsonApiWorkspaceOutMeta, DeclarativeSingleWorkspacePermission, DeclarativeWorkspaceHierarchyPermission and WorkspacePermissionAssignment with the new values succeeds
  • make -C packages/gooddata-sdk format lint type-check
  • TEST_ENVS=py314 make -C packages/gooddata-sdk test — 572 passed, 2 skipped, 3 xfailed

Risk

low — additive enum values in the generated client; no request shapes change.

🤖 Generated with Claude Code

The backend permission hierarchy now includes CREATE_VISUALIZATION
(implied by ANALYZE) and CREATE_COMPUTED_ATTRIBUTE (implied by MANAGE),
but the specs this client generates from predate both. Because the
values are implied, the workspace meta permissions of every ANALYZE or
MANAGE user contain them, so reading a workspace failed client-side
validation even when nobody was granted either permission explicitly.
Declarative permissions and permission assignments that contain them
could not be read, and a grant using them could not be built.

Adds both values to the seven workspace-permission enums in the
metadata spec, in backend order, and switches the security info of
POST /entities/workspaces/{id}/visualizationObjects to
CREATE_VISUALIZATION, then regenerates. The computed-attributes endpoint
guarded by CREATE_COMPUTED_ATTRIBUTE is not in the specs yet and is
left for a full re-download, so this delta stays limited to the enums.

jira: F1-2924
risk: low
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.19%. Comparing base (b57834c) to head (0e6c832).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1834   +/-   ##
=======================================
  Coverage   83.19%   83.19%           
=======================================
  Files         330      330           
  Lines       21931    21931           
=======================================
  Hits        18246    18246           
  Misses       3685     3685           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeskepetr
jeskepetr merged commit 6848b82 into gooddata:master Sep 29, 2026
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants