Disallow editing and deleting when in readonly mode
parent
bc434dcfc8
commit
f4511079b9
|
|
@ -370,11 +370,13 @@ func (b *Browser) refreshActions() {
|
||||||
if b.app.ConOK() {
|
if b.app.ConOK() {
|
||||||
b.namespaceActions(aa)
|
b.namespaceActions(aa)
|
||||||
|
|
||||||
if client.Can(b.meta.Verbs, "edit") {
|
if !b.app.Config.K9s.GetReadOnly() {
|
||||||
aa[ui.KeyE] = ui.NewKeyAction("Edit", b.editCmd, true)
|
if client.Can(b.meta.Verbs, "edit") {
|
||||||
}
|
aa[ui.KeyE] = ui.NewKeyAction("Edit", b.editCmd, true)
|
||||||
if client.Can(b.meta.Verbs, "delete") {
|
}
|
||||||
aa[tcell.KeyCtrlD] = ui.NewKeyAction("Delete", b.deleteCmd, true)
|
if client.Can(b.meta.Verbs, "delete") {
|
||||||
|
aa[tcell.KeyCtrlD] = ui.NewKeyAction("Delete", b.deleteCmd, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue