-
Notifications
You must be signed in to change notification settings - Fork 74
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
🛂 Hide some menus depending on member permissions #3886
🛂 Hide some menus depending on member permissions #3886
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.
Why does this branch come from bye_bye_webpacker
? couldn't this be done over master
or ruby-3.1
Also, could you please add a description to the PR?
e649177
to
fb51af4
Compare
fb51af4
to
27c0e3a
Compare
c5eb5ca
to
2116578
Compare
bdde485
to
68ca266
Compare
f5a85af
to
3e149ee
Compare
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.
I tried this locally, these are my findings:
- https://issues.redhat.com/browse/THREESCALE-11237
- Scenario:
- Member with Access & query analytics
- Two Products, two backends
- The first product has two backends, the second product has no backends
- Result
- Giving it access to any product will show the dashboard tab for all backends
- Giving it access to no product will hide the backend widget
- In no case I can see only the backend widget with no product widget
- This behaves exactly the same in master and in this PR
- Scenario:
- https://issues.redhat.com/browse/THREESCALE-11357
- Scenario:
- Same permissions as in the issue (check)
- Two Products, two backends
- The first product has two backends, the second product has no backends
- Result
- "Create" buttons appearing in the dashboard
- I reproduced it in master, but can't reproduce it in this PR, so it's fixed 👍
- Product -> Integration -> Backend can attempt to create a backend
- I reproduced this in master but also in this PR, so it's not fixed
- "Create" buttons appearing in the dashboard
- Scenario:
- Tests
- I don't know whether we have tests for all the scenarios described in the Jira issues. I guess not, otherwise they would have failed. It would be good to add such tests
From my previous comment:
I tried this again and got the same results. |
3e149ee
to
c11367d
Compare
I tried this again:
Works for me 👍
This still fails for me:
There's an "Add a backend button", when clicking it, the screens to create backends auto-complete for existing backends: And I can create the backend correctly. I think it would be better to just not show the "Add a backend button" at all. Also, even if the screen loads and the existing backends are auto-completed, trying to create a backend should fail |
d38f086
to
7f7450d
Compare
@jlledom However, this is not creating a new backend. It is simply adding an existing backend to a product. |
Is that supposed to be allowed? In that case, OK |
9a7b89b
to
3cc09fc
Compare
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.
I didn't review the code itself carefully enough, but I think the behavior is now reasonable and fixes the three related JIRAs.
Fixes:
Updated UI:
Member with zero permissions will see:
Member with Access & query analytics will see:
Member with Create, read, update and delete attributes, metrics, mapping rules, etc. will see:
Member with Create, read, update and delete accounts / applications will see:
Member with settings will see:
Member with customer billing will see:
Member with developer portal will see: