-
Notifications
You must be signed in to change notification settings - Fork 134
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
Get Rbac permissions #554
Get Rbac permissions #554
Conversation
…to get-rbac-permissions
Codecov Report
@@ Coverage Diff @@
## master #554 +/- ##
=======================================
Coverage 60.42% 60.42%
=======================================
Files 45 45
Lines 801 801
Branches 147 147
=======================================
Hits 484 484
Misses 260 260
Partials 57 57 |
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.
When you are using next links you are essentially doing sequential requests, that can resolve into long promises. When you are going to use Promise.all
each request is fired at one point and it waits for everyone to finish. There is no catch clause, so you should update the code with that.
@karelhala I wasn't aware of the rbac api client. Thank you for pointing it out! I just tweaked your suggestion a little bit, so that it fetches the correct count for permissions. |
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.
Looking good! I checked it locally and it returns correct number of permissions and such. Really nice!
Thanks for checking it locally! Appreciate it! |
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 think we should clear this localStorage variable on user logout.
@karelhala thoughts?
@PanSpagetka was working on some self clearing localstorage enhancements. |
…ghts-chrome into get-rbac-permissions
I tried quite a few things regarding the async tests without any luck. I will give it another try tomorrow. Let me know if you have any suggestions @karelhala @ryelo |
Just added the test. Let me know if it needs to be improved. |
…ghts-chrome into get-rbac-permissions
Jira: Here
Let me know what needs changing here! Also, not sure if I did the tests right! 😄