(targetDN string, groupDN string)
| 31 | ) |
| 32 | |
| 33 | func openRemoveMemberFromGroupForm(targetDN string, groupDN string) { |
| 34 | currentFocus := app.GetFocus() |
| 35 | |
| 36 | confirmText := fmt.Sprintf( |
| 37 | "Do you really want to remove this member from this group?\nMember: %s\nGroup: %s", |
| 38 | targetDN, groupDN, |
| 39 | ) |
| 40 | |
| 41 | promptModal := tview.NewModal(). |
| 42 | SetText(confirmText). |
| 43 | AddButtons([]string{"No", "Yes"}). |
| 44 | SetDoneFunc(func(buttonIndex int, buttonLabel string) { |
| 45 | if buttonLabel == "Yes" { |
| 46 | err := lc.RemoveMemberFromGroup(targetDN, groupDN) |
| 47 | if err != nil { |
| 48 | handleLDAPError(err) |
| 49 | } else { |
| 50 | updateLog(fmt.Sprintf("Member %s removed from group %s", targetDN, groupDN), "green") |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | app.SetRoot(appPanel, true).SetFocus(currentFocus) |
| 55 | }) |
| 56 | |
| 57 | app.SetRoot(promptModal, true).SetFocus(promptModal) |
| 58 | } |
| 59 | |
| 60 | func updateMaxDepth() { |
| 61 | depthStr := depthInput.GetText() |
no test coverage detected