-
-
Notifications
You must be signed in to change notification settings - Fork 658
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: deletion validation didnt account for groups #4441
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/services/access-service.ts
Outdated
throw new RoleInUseError( | ||
'Role is in use by more than one user. You cannot delete a role that is in use without first removing the role from the users.', | ||
'Role is in use by one or more users or groups. You cannot delete a role that is in use without first removing the role from the users and groups.', |
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.
two ifs here and different error messages would probably make this easier to debug for the user
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.
Or just a simple users(0) or groups(23)
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 @gardleopard! good feedback! I like the simple solution as it gives you overview of both regardless of which was the trigger. This is also part of an improvement of the UI that gives you an overview of usage before you attempt deleting
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.
Great, added a comment about the message that can potentially share more information, but approving anyway:)
About the changes
Fixes an issue where project role deletion validation didn't validate against project roles being connected to groups