giantswarm / happa

Web user interface for Giant Swarm – Beyond managed Kubernetes
https://www.giantswarm.io/
Apache License 2.0
21 stars 5 forks source link

Fetch permissions for new organizations #4571

Closed gusevda closed 9 months ago

gusevda commented 9 months ago

What does this PR do?

After a new organization is created we do not refresh user's permissions. This causes a problem when a user selects the newly created organization and sees a lacking permissions note for "Launch new cluster" button.

Screenshot 2024-01-22 at 10 18 52

In this PR I fixed this bug - once an organization is being created (or deleted) I refetch all the permissions.

In addition to this fix we decided that it makes sense to display a warning after organization creation that some permissions can be not set up yet. This message is being displayed during first 5 minutes after organization creation.

Screenshot 2024-01-22 at 17 59 26

Any background context you can provide?

Closes https://github.com/giantswarm/roadmap/issues/2945.

gusevda commented 9 months ago

@marians thank you for the review. As we decided to additionally display a message during 5 minutes after organization creation, I added another commit here. See the updated screenshot in the description.