-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(permissions) Add platform privilege for editing global home page #14081
Conversation
🔴 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. |
Bundle ReportChanges will increase total bundle size by 2.27MB (11.52%) ⬆️
Affected Assets, Files, and Routes:view changes for bundle: datahub-react-web-esmAssets Changed:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
9c16166
to
7a1e560
Compare
There was a problem hiding this 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
mockOpContext, PoliciesConfig.MANAGE_HOME_PAGE_TEMPLATES_PRIVILEGE)) | ||
.thenReturn(false); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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.