(event *tcell.EventKey)
| 379 | } |
| 380 | |
| 381 | func groupsKeyHandler(event *tcell.EventKey) *tcell.EventKey { |
| 382 | row, col := groupsPanel.GetSelection() |
| 383 | |
| 384 | switch event.Key() { |
| 385 | case tcell.KeyCtrlS: |
| 386 | exportCurrentGroups() |
| 387 | return nil |
| 388 | case tcell.KeyDelete: |
| 389 | selCell := groupsPanel.GetCell(row, col) |
| 390 | if selCell != nil && selCell.GetReference() != nil { |
| 391 | otherGroupDN := selCell.GetReference().(string) |
| 392 | openRemoveMemberFromGroupForm(objectDN, otherGroupDN) |
| 393 | } |
| 394 | case tcell.KeyCtrlG: |
| 395 | selCell := groupsPanel.GetCell(row, col) |
| 396 | if selCell != nil && selCell.GetReference() != nil { |
| 397 | baseDN := selCell.GetReference().(string) |
| 398 | openAddMemberToGroupForm(baseDN, true) |
| 399 | } |
| 400 | return nil |
| 401 | case tcell.KeyCtrlD: |
| 402 | selCell := groupsPanel.GetCell(row, col) |
| 403 | if selCell != nil && selCell.GetReference() != nil { |
| 404 | baseDN := selCell.GetReference().(string) |
| 405 | info.Highlight("3") |
| 406 | objectNameInputDacl.SetText(baseDN) |
| 407 | queryDacl(baseDN) |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | return event |
| 412 | } |
| 413 | |
| 414 | func membersKeyHandler(event *tcell.EventKey) *tcell.EventKey { |
| 415 | row, col := membersPanel.GetSelection() |
nothing calls this directly
no test coverage detected