Implemented ACL tests using test suites and server cleanup functions.

This commit is contained in:
Kelvin Clement Mwinuka
2024-06-01 01:08:36 +08:00
parent 393700b71d
commit fdb3b87362
3 changed files with 2519 additions and 2455 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -241,8 +241,8 @@ func (user *User) UpdateUser(cmd []string) error {
user.IncludedCategories = []string{}
user.ExcludedCategories = []string{"*"}
}
// If resetkeys is provided, reset all keys that the user can access
if strings.EqualFold(str, "resetkeys") {
// If resetkeys or nokeys is provided, reset all keys that the user can access.
if slices.Contains([]string{"resetkeys", "nokeys"}, str) {
user.IncludedReadKeys = []string{}
user.IncludedWriteKeys = []string{}
user.NoKeys = true