-
Notifications
You must be signed in to change notification settings - Fork 24
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
Disable UI starting dataset creating jobs for unprivileged users #7753
Disable UI starting dataset creating jobs for unprivileged users #7753
Conversation
…y-allow-privilegde-user-dataset-creation-jobs
…y-allow-privilegde-user-dataset-creation-jobs
frontend/stylesheets/dark.less
Outdated
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.
I formatted this page with prettier, as biome currently does not support formatting css.
See: biomejs/biome#1285
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.
Beautiful :) See my one comment, though, as this should be added to lots of other routes, too, as far as I see.
@@ -428,6 +428,7 @@ class ReactRouter extends React.Component<Props> { | |||
<SecuredRouteWithErrorBoundary | |||
isAuthenticated={isAuthenticated} | |||
path="/datasets/upload" | |||
requiresAdminOrManagerRole |
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.
I think, this prop can be added to a few other components:
path="/users/:userId/details"
path="/users"
path="/teams"
path="/timetracking"
path="/reports/projectProgress"
path="/reports/availableTasks"
path="/tasks"
path="/tasks/create"
path="/tasks/:taskId/edit"
path="/tasks/:taskId"
path="/projects"
path="/projects/create"
path="/projects/:projectId/tasks"
path="/projects/:projectId/edit"
path="/datasets/:organizationName/:datasetName/import"
path="/datasets/:organizationName/:datasetName/edit"
path="/taskTypes"
path="/taskTypes/create"
path="/taskTypes/:taskTypeId/edit"
path="/taskTypes/:taskTypeId/tasks"
path="/taskTypes/:taskTypeId/projects"
path="/scripts/create"
path="/scripts/:scriptId/edit"
path="/scripts"
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.
Thanks for listing all other components 👍
Initially, I though that this should be added in a separate PR but doing it already here is also fine to me and might also save some time.
I'll test each route as admin and non-admin later :)
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.
I'll test each route as admin and non-admin later :)
Done, worked out as expected 👍. All pages/view listed above are available to [email protected] but not to [email protected]
…y-allow-privilegde-user-dataset-creation-jobs
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.
Excellente 🥖
* disable ui starting dataset creating jobs for non-admin/ datasetmanager users * hide materialize merger mode button instead of disabling it * check for is team manager as well (and not only admin or dataset manager roles) * re-allow merge with fallback layer for team managers * add changelog entry * add improved image to permission enforcer view / forbidden view * add manager/admin permissions required view to privileged views
This PR disables the UI elements allowing the creation of a new dataset as an output of a job for normal unprivileged users.
URL of deployed dev instance (used for testing):
Steps to test:
<host-ulr-part>/datasets/upload
should now show a 403 error pageOpen question:
TODOs:
Issues:
(Please delete unneeded items, merge only when none are left open)