fix #528
parent
12e59b4a83
commit
5b707c656e
|
|
@ -310,6 +310,9 @@ func (b *Browser) switchNamespaceCmd(evt *tcell.EventKey) *tcell.EventKey {
|
||||||
|
|
||||||
auth, err := b.App().factory.Client().CanI(ns, b.GVR(), client.MonitorAccess)
|
auth, err := b.App().factory.Client().CanI(ns, b.GVR(), client.MonitorAccess)
|
||||||
if !auth {
|
if !auth {
|
||||||
|
if err == nil {
|
||||||
|
err = fmt.Errorf("current user can't access namespace %s", ns)
|
||||||
|
}
|
||||||
b.App().Flash().Err(err)
|
b.App().Flash().Err(err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue