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

feat(ESSNTL-5052): Disable create group button if not authorized #1926

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

gkarat
Copy link
Contributor

@gkarat gkarat commented Jul 4, 2023

Implements https://issues.redhat.com/browse/ESSNTL-5052.

This disables "Create a new group" in the hosts addition modal if users don't have enough permissions (inventory:groups:write).

How to test

  1. Log in the account that doesn't have inventory:groups:write permission.
  2. Navigate to /inventory
  3. Find a host that is not in any group yet, and try to add to group
  4. In the modal, make sure "Create a new group" button is disabled and the tooltip is shown.

Screenshots

image

@gkarat gkarat added the enhancement New feature or request label Jul 4, 2023
@gkarat gkarat requested a review from a team as a code owner July 4, 2023 10:53
@gkarat gkarat self-assigned this Jul 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Patch coverage: 21.42% and project coverage change: -0.15 ⚠️

Comparison is base (9048690) 65.48% compared to head (d962de4) 65.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1926      +/-   ##
==========================================
- Coverage   65.48%   65.34%   -0.15%     
==========================================
  Files         147      147              
  Lines        4500     4516      +16     
  Branches     1333     1335       +2     
==========================================
+ Hits         2947     2951       +4     
- Misses       1553     1565      +12     
Impacted Files Coverage Δ
src/components/GroupsTable/GroupsTable.js 84.24% <ø> (ø)
...ryGroups/Modals/AddSelectedHostsToGroupModal.cy.js 0.00% <0.00%> (ø)
...ventoryGroups/SmallComponents/CreateGroupButton.js 100.00% <100.00%> (ø)
src/constants.js 84.33% <100.00%> (+0.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@Fewwy Fewwy left a comment

Choose a reason for hiding this comment

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

LGTM

@gkarat gkarat merged commit 82f439e into RedHatInsights:master Jul 10, 2023
@gkarat
Copy link
Contributor Author

gkarat commented Jul 10, 2023

🎉 This PR is included in version 1.31.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants