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

🐞 Handle fetching from inventory for users without a full namespaces access role #1307

Merged

Conversation

sgratch
Copy link
Collaborator

@sgratch sgratch commented Aug 14, 2024

Reference: #1293

Handle providers fetching from inventory for logged users with limited namespace roles (not kubeadmin), who can only list their namespaces content and don't have get permissions to all namespaces.

Before the fix, when such a user tried to fetch providers inventory data (i.e. display the providers list), regardless to current namespace, the "inventory server is not reachable" error was always displayed and inventory data fetching failed.

After this fix, such a user that tries to fetch inventory data under his permitted namespace(s), will succeed to do that and no error is displayed.

Before:

Screenshot from 2024-08-18 14-38-01

After

Screenshot from 2024-08-18 14-35-00

@sgratch sgratch requested a review from yaacov August 14, 2024 09:08
@yaacov yaacov added the bug Categorizes issue or PR as related to a bug. label Aug 14, 2024
@yaacov yaacov added this to the 2.6.4 milestone Aug 14, 2024
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch 3 times, most recently from 431ff47 to 9fdf819 Compare August 21, 2024 07:52
@sgratch
Copy link
Collaborator Author

sgratch commented Aug 21, 2024

I addressed all of the above.
In addition, I handled the page header's error messages since it didn't work for k8s fetching errors and since we added few error types for the inventory fetching.

Screenshots for example:

Screenshot from 2024-08-20 17-13-43

Screenshot from 2024-08-20 22-02-14

@sgratch sgratch requested a review from yaacov August 21, 2024 08:00
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch 2 times, most recently from c7fd8a0 to 42c88ec Compare August 22, 2024 15:19
Copy link
Member

Choose a reason for hiding this comment

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

this changes where moved to #1310

@yaacov yaacov modified the milestones: 2.6.4, 2.6.5 Aug 27, 2024
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch from 42c88ec to 61d9e44 Compare August 28, 2024 12:59
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch 4 times, most recently from 4506a7b to 8bb7e83 Compare August 29, 2024 13:40
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch from 8bb7e83 to 00551d2 Compare August 29, 2024 14:02
…to list all namespaces

Reference: kubev2v#1293

Handle providers fetching from inventory for users with limited namespace roles, who can only list their namespaces content
and don't have get permissions to all namespaces.

Before the fix, when those users tried to fetch providers inventory data, regarldess to
current namespace, the "inventory server is not reachable" error was always displayed.

After this fix, those users will not fetch all namepsaces but only
ones which they allow to list. So the fetching should now succeed and no
error should be displayed.

Signed-off-by: Sharon Gratch <[email protected]>
@sgratch sgratch force-pushed the handle-non-all-ns-users-fetching-from-inventory branch from 00551d2 to cc5f48d Compare August 29, 2024 14:10
Copy link

@yaacov
Copy link
Member

yaacov commented Sep 3, 2024

cypress test fail addressed by: #1317

@yaacov yaacov merged commit 7e85021 into kubev2v:main Sep 3, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants