-
-
Notifications
You must be signed in to change notification settings - Fork 962
Change logic displaying remove ownership button #5709
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
base: master
Are you sure you want to change the base?
Change logic displaying remove ownership button #5709
Conversation
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.
Update: I came across another related issue that provides additional context.
According to the discussion there, it seems the intention is to allow owners to remove themselves. However, I still think it might make sense to restrict that behavior. For instance, if a gem has two active owners (Owner A and Owner B), either one can remove the other if needed—so the ability for someone to remove themselves may not be essential.
Would love to hear your thoughts on this and would be happy to make both changes if need be.
@@ -99,21 +99,6 @@ class OwnerTest < SystemTest | |||
assert_equal [@other_user.email], last_email.to | |||
end | |||
|
|||
test "removing last owner shows error message" do |
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.
Though the delete action button has been disabled, i would still like to see a test, maybe just a unit/functional, that verifies that that we're not allowing this action to take place.
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.
@colby-swandale I believe that there are two tests verifying this:
- functional for the DELETE endpoint
- unit for the ownership model
I updated the logic responsible for hiding the button according to the issue description.
- makes it more stable
Bumps [pghero](https://github.com/ankane/pghero) from 3.6.2 to 3.7.0. - [Changelog](https://github.com/ankane/pghero/blob/master/CHANGELOG.md) - [Commits](ankane/pghero@v3.6.2...v3.7.0) --- updated-dependencies: - dependency-name: pghero dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.28.19. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff0a06e...fca7ace) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 3.28.19 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [groupdate](https://github.com/ankane/groupdate) from 6.6.0 to 6.7.0. - [Changelog](https://github.com/ankane/groupdate/blob/master/CHANGELOG.md) - [Commits](ankane/groupdate@v6.6.0...v6.7.0) --- updated-dependencies: - dependency-name: groupdate dependency-version: 6.7.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [rack](https://github.com/rack/rack) from 3.1.15 to 3.1.16. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](rack/rack@v3.1.15...v3.1.16) --- updated-dependencies: - dependency-name: rack dependency-version: 3.1.16 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rbtrace](https://github.com/tmm1/rbtrace) from 0.5.1 to 0.5.2. - [Changelog](https://github.com/tmm1/rbtrace/blob/master/CHANGELOG) - [Commits](https://github.com/tmm1/rbtrace/commits) --- updated-dependencies: - dependency-name: rbtrace dependency-version: 0.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The following warnings were being emitted when building an image. There's not a great amount of immediate value in fixing them, but the less that is ignored, the greater the signal. ```plaintext 2 warnings found (use docker --debug to expand): - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 6) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 31) ```
Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 6.4.4 to 6.5.0. - [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases) - [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/main/NEWS.md) - [Commits](thoughtbot/factory_bot_rails@v6.4.4...v6.5.0) --- updated-dependencies: - dependency-name: factory_bot_rails dependency-version: 6.5.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…-ownership-button
Issue
There is an open issue reported as a bug.
The problem is that the
Remove
button is displayed even when a gem has only one owner. Although this case is handled gracefully - when the sole owner attempts to remove themselves, a flash error is shown with a descriptive message (see screenshot) - the presence of the button could be misleading and confusing.This is currently enforced in code by this condition.
Solution
The
Remove
button is now hidden if there is only one owner.