You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
UI not providing proper error message while moving name space from one project to another project.
While moving a name space from proj1 to proj2, the webhook validation is happening and throwing a n/w error if there is a authorization issue. In this case UI is on same move screen and not providing proper error message to the user. Just the button is change from Move to Error and after 2 seconds it went back to Move. Also, the screen shows the name space moved to a different project and it not came back till user refresh the screen.
To Reproduce
Provision rancher
Create a Downstream cluster
Create a Standard User (user1)
Create a project : "proj-read" (Add user1 as readonly)
Create a Name Space (testns1)
Create a project : "proj-write" (Add user1 as Owner)
Create a Name Space (testns2)
Login with user1
From UI Try to move testns2 to the project "proj-read" OR
From UI Try to move testns1 to the project "proj-write"
Check for the behavior
Result
User is on the same move popup screen and the button(Move)change to Error and there is NO error message on the screen
In next 2 seconds the Error buttom changed to Move
On the UI the name space got moved to the other project but after a screen refresh the name space did not moved
Network call failed with 403 error
{"type":"error","links":{},"code":"Unauthorized","message":"admission webhook "rancher.cattle.io.namespaces" denied the request: Unauthorized","status":403,"type":"error"}
Expected Result
User should get appropriate error message on the screen
The Name Space should not move to the other project (User no need to refresh)
Additional context
Before this change there is no errors while moving the name spaces and UI may not handle the error cases.
Screenshots
The text was updated successfully, but these errors were encountered:
I tried to investigate this issue, as I see it I have the Namespace object that gets updated with label and annotation and then saves the Namespace object (which makes a call to the API)
But because the same object is presented on the table using the same annotation that gets updated it changes in render before the save call is made and fails... https://github.com/rancher/dashboard/blob/master/shell/components/MoveModal.vue#L63
Setup
Describe the bug
UI not providing proper error message while moving name space from one project to another project.
While moving a name space from proj1 to proj2, the webhook validation is happening and throwing a n/w error if there is a authorization issue. In this case UI is on same move screen and not providing proper error message to the user. Just the button is change from Move to Error and after 2 seconds it went back to Move. Also, the screen shows the name space moved to a different project and it not came back till user refresh the screen.
To Reproduce
Result
{"type":"error","links":{},"code":"Unauthorized","message":"admission webhook "rancher.cattle.io.namespaces" denied the request: Unauthorized","status":403,"type":"error"}
Expected Result
Additional context
Before this change there is no errors while moving the name spaces and UI may not handle the error cases.
Screenshots
The text was updated successfully, but these errors were encountered: