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