Skip to content
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

Fix: Make deployment toggles visible but disabled for deployments when a user does not have update deployment permissions #2692

Conversation

zhen0
Copy link
Member

@zhen0 zhen0 commented Aug 27, 2024

Currently we hide action items from users who do not have permission to take the relevant actions. This includes hiding the deployment schedule toggle from a user who does not have permission to update a deployment. However, the toggle shows information as well as an action.

This PR updates the different deployment toggles to allow a toggle to convey information about a deployment's/schedule's status and instead disables the toggle so a user without permissions cannot update the deployment. It also updates the related tooltip to advise the user they don't have permission to update the deployment.

Current - A user with Runner permissions can see that their deployment has two schedules but can not tell that one has been disabled:
image

This PR - A user with Runner permissions can see that a schedule is disabled but can not update it:
image

This PR is separate from the deployment status updates in #2645 and is aimed only at making status more visible for users who do not have permissions to take action.

Resolves PrefectHQ/prefect#15071

…have update permissions and update tooltip language to explain permissions restriction
@zhen0 zhen0 marked this pull request as ready for review August 27, 2024 21:44
@zhen0 zhen0 requested a review from a team as a code owner August 27, 2024 21:44
@zhen0 zhen0 changed the title Make deployment toggles visible but disabled for deployments when a user does not have update deployment permissions Fix: Make deployment toggles visible but disabled for deployments when a user does not have update deployment permissions Aug 27, 2024
Copy link
Contributor

@znicholasbrown znicholasbrown left a comment

Choose a reason for hiding this comment

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

lovely improvement

@zhen0 zhen0 merged commit 812a057 into main Aug 27, 2024
2 checks passed
@zhen0 zhen0 deleted the jenny/oss-5475-runner-role-should-be-able-to-view-individual-schedule branch August 27, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants