Update copy and some logic on project access dropdowns#3263
Open
charliepark wants to merge 3 commits into
Open
Update copy and some logic on project access dropdowns#3263charliepark wants to merge 3 commits into
charliepark wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes a few changes to the tooltips, buttons, and logic of the Project Access table and each row's action menu dropdown.
First, it updates the logic around whether the user actually has the permissions to make changes to the (users' / groups') permissions. If the user doesn't have the appropriate permissions, the buttons are disabled. Previously, the logic was "does the user/group being investigated currently have a project-level permission?", which doesn't quite cover the same territory and is less useful. So this PR adds a
canEditRolesattribute to check against the current user and whether they can make changes here.Second, this PR changes the verbiage of the dropdown button. For a user/group with a current project role, the menu now says "Change project role". For a user/group without a project role, it now says "Add project role".


In a case where a user has a silo role that supersedes a project role (

SILO.ADMIN,PROJECT.COLLABORATOR), the dominant role (SILO.ADMIN) will still render on the table, but the presence of the project role will set the copy to say "Change project role":(Note: The "project" in "Change/Add project role" is new, but I think an improvement to reinforce the tier of access the admin is analyzing. We might update "Delete" to say "Delete project role" to help in the same way. I'm open to thoughts on that! Similarly, we could change the dropdowns on the Fleet/Silo Access pages to say "fleet role" / "silo role")
Third, when the role has been inherited from the silo (meaning: no project role), there's no way to delete the role from the current view, so the Delete button is disabled and the tooltip now says "This role is inherited from the silo"

Fourth, a subtle change in the


change project roleform … if the user/group has a project role, that role's radio button is pre-selected in the form (which is unchanged from the current behavior). When the admin is adding a role, meaning there is not currently a project role, no radio buttons are pre-selected.(changing a role)
(adding a role)
I'm not sure I love the duplication of "project role" in the header and at the top of the radio buttons.
Closes #2963