MCPcopy Create free account
hub / github.com/Macmod/godap / getNormalPermsForm

Function getNormalPermsForm

tui/ace.go:295–312  ·  view source on GitHub ↗

Forms

(mask uint32, checkedFull func(bool), checkedRight func(bool, uint32))

Source from the content-addressed store, hash-verified

293
294// Forms
295func getNormalPermsForm(mask uint32, checkedFull func(bool), checkedRight func(bool, uint32)) *tview.Form {
296 form := NewXForm()
297
298 form.AddCheckbox("Full control", false, checkedFull)
299
300 for _, rightName := range normalRightsVals {
301 rightMask := normalRights[rightName]
302 curRightMask := rightMask
303 form.AddCheckbox(
304 rightName,
305 mask&rightMask != 0,
306 func(checked bool) {
307 checkedRight(checked, curRightMask)
308 })
309 }
310
311 return form.SetItemPadding(0)
312}
313
314func getObjectPermsForm(object int, objectRight int, selectedObject func(string, int), selectedRight func(string, int)) *XForm {
315 form := NewXForm().

Callers 1

loadAceEditorFormFunction · 0.85

Calls 2

AddCheckboxMethod · 0.95
NewXFormFunction · 0.85

Tested by

no test coverage detected