Skip to content

feat(permissions) Add platform privilege for editing global home page #14081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025

Conversation

chriscollins3456
Copy link
Collaborator

@chriscollins3456 chriscollins3456 commented Jul 15, 2025

This PR adds the platform privilege for whether or not you can manage the global home page. Specifically, this controls whether you can create/editdelete global templates or global modules. This will also be used in the UI later for controlling who can see the edit button for editing a global global templates for the rest of folk.

@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment labels Jul 15, 2025
Copy link

alwaysmeticulous bot commented Jul 15, 2025

🔴 Meticulous spotted visual differences in 18 of 1331 screens tested: view and approve differences detected.

Meticulous evaluated ~10 hours of user flows against your PR.

Last updated for commit 9c16166. This comment will update as new commits are pushed.

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Jul 15, 2025
Copy link

codecov bot commented Jul 15, 2025

Bundle Report

Changes will increase total bundle size by 2.27MB (11.52%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
datahub-react-web-esm 21.99MB 2.27MB (11.52%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 2.27MB 18.36MB 14.11% ⚠️
assets/index-*.css 433 bytes 609.33kB 0.07%

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Base automatically changed from cc--ch-506-delete-page-module to master July 16, 2025 15:08
Copy link
Collaborator

@asikowitz asikowitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple questions but approving to unblock

@@ -40,7 +42,10 @@ public CompletableFuture<DataHubPageModule> get(DataFetchingEnvironment environm
PageModuleScope scope = input.getScope();
com.linkedin.datahub.graphql.generated.PageModuleParamsInput paramsInput = input.getParams();

// TODO: check permissions if the scope is GLOBAL
if (input.getScope().equals(PageModuleScope.GLOBAL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does global scope mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global means it's available for all users to use on their templates. we will eventually have a more rich UI/library of modules to choose from, but for now global custom modules will be the ones that you can add to your personal widget today

Comment on lines +230 to +231
mockOpContext, PoliciesConfig.MANAGE_HOME_PAGE_TEMPLATES_PRIVILEGE))
.thenReturn(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this work when the user doesn't have permissions? And vice versa below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is because these tests are deleting PERSONAL modules, the check for those is to check if you personally created them - that's the case for the one below

@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Jul 18, 2025
@chriscollins3456 chriscollins3456 merged commit a1345ef into master Jul 18, 2025
37 of 38 checks passed
@chriscollins3456 chriscollins3456 deleted the cc--ch-510-template-module-permissions branch July 18, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment pending-submitter-merge product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants