mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-09 09:50:09 +08:00
Initialise default IncludedCategories to allCategories("*").
Implemented test for ACL USERS command.
This commit is contained in:
@@ -38,6 +38,9 @@ type User struct {
|
||||
|
||||
func (user *User) Normalise() {
|
||||
user.IncludedCategories = RemoveDuplicateEntries(user.IncludedCategories, "allCategories")
|
||||
if len(user.IncludedCategories) == 0 {
|
||||
user.IncludedCategories = []string{"*"}
|
||||
}
|
||||
user.ExcludedCategories = RemoveDuplicateEntries(user.ExcludedCategories, "allCategories")
|
||||
if slices.Contains(user.ExcludedCategories, "*") {
|
||||
user.IncludedCategories = []string{}
|
||||
|
Reference in New Issue
Block a user