Skip to main content

ACL LOAD

Syntax

ACL LOAD <MERGE | REPLACE>

Module

acl

Categories

admin dangerous slow

Description

Reloads the rules from the configured ACL config file. When 'MERGE' is passed, users from config file who share a username with users in memory will be merged. When 'REPLACE' is passed, users from config file who share a username with users in memory will replace the user in memory.

Examples

Load ACL config:

db, err := sugardb.NewSugarDB()
if err != nil {
log.Fatal(err)
}
// Load config and merge with currently loaded ACL config
ok, err := db.ACLLoad(sugardb.ACLLoadOptions{Merge: true})

// Load config and replace currently loaded ACL config
ok, err := db.ACLLoad(sugardb.ACLLoadOptions{Replace: true})`