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

Display View button if user can list roles #50872

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

avatus
Copy link
Contributor

@avatus avatus commented Jan 8, 2025

This fixes a regression that caused users who could list/read roles but NOT edit them to be unable to view the details of the role.

This PR will change the text to "view details" if the user can only view and not edit.

The edit button in the role editor already has logic to prevent and tell the user they do not have permissions to edit, so no further changes need to be made there.

fixes #50767

This fixes a regression that caused users who could list/read roles but
NOT edit them to be unable to view the details of the role.

This PR will change the text to "view details" if the user can _only_
view and not edit.

The edit button in the role editor already has logic to prevent and tell
the user they do not have permissions to edit, so no further changes
need to be made there.
@ryanclark
Copy link
Contributor

This seems fine but also introduces a new side effect, if someone was to have edit permissions but not view permissions (for whatever reason), the button would now be hidden. Not sure how much that matters

@avatus
Copy link
Contributor Author

avatus commented Jan 8, 2025

, if someone was to have edit permissions but not view permissions

i thought about this, but they wont be able to list/view any roles to begin with, so there isnt even a spot for the edit button to exist. so i dont think its something we need to worry about

@avatus avatus added this pull request to the merge queue Jan 8, 2025
Merged via the queue into master with commit 62dbb2c Jan 8, 2025
43 of 44 checks passed
@avatus avatus deleted the avatus/fix_roles_buttons branch January 8, 2025 17:54
@public-teleport-github-review-bot

@avatus See the table below for backport results.

Branch Result
branch/v16 Create PR
branch/v17 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Teleport Role permissions behaves differently in UI compared to CLI in Teleport 17.1.3
3 participants