Skip to content

Commit

Permalink
Fixing bugs introduced in last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
Macmod committed Feb 27, 2024
1 parent 133f796 commit a2adffc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
46 changes: 24 additions & 22 deletions ace.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,33 +72,35 @@ func loadIntoCache(source map[string]string, reverse map[string]string, values *
}
}

func loadSchemaVars() {
// Get classes and attributes
classes, attrs, err := lc.FindSchemaClassesAndAttributes()
if err == nil {
for key, val := range classes {
sdl.ClassGuids[key] = val
}
func loadSchemaVars(includeCurSchema bool) {
if includeCurSchema {
// Get classes and attributes
classes, attrs, err := lc.FindSchemaClassesAndAttributes()
if err == nil {
for key, val := range classes {
sdl.ClassGuids[key] = val
}

for key, val := range attrs {
// Are property sets being included here?
sdl.AttributeGuids[key] = val
for key, val := range attrs {
// Are property sets being included here?
sdl.AttributeGuids[key] = val
}
}
}

// Get extended rights
extendedRights, err := lc.FindSchemaControlAccessRights("(validAccesses=256)")
if err == nil {
for key, val := range extendedRights {
sdl.ExtendedGuids[key] = val
// Get extended rights
extendedRights, err := lc.FindSchemaControlAccessRights("(validAccesses=256)")
if err == nil {
for key, val := range extendedRights {
sdl.ExtendedGuids[key] = val
}
}
}

// Get validated writes
validatedWriteRights, err := lc.FindSchemaControlAccessRights("(validAccesses=8)")
if err == nil {
for key, val := range validatedWriteRights {
sdl.ValidatedWriteGuids[key] = val
// Get validated writes
validatedWriteRights, err := lc.FindSchemaControlAccessRights("(validAccesses=8)")
if err == nil {
for key, val := range validatedWriteRights {
sdl.ValidatedWriteGuids[key] = val
}
}
}

Expand Down
6 changes: 2 additions & 4 deletions dacl.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ var (
groupPrincipal string
)

func initDaclPage(loadSchema bool) {
func initDaclPage(includeCurSchema bool) {
loadRightVars()
if loadSchema {
loadSchemaVars()
}
loadSchemaVars(includeCurSchema)

objectNameInputDacl = tview.NewInputField()
objectNameInputDacl.
Expand Down

0 comments on commit a2adffc

Please sign in to comment.