mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-12 19:30:35 +08:00
Added resetpass, nocommands, resetkeys and resetchannels directives in ACL DSL
This commit is contained in:
@@ -102,6 +102,9 @@ func (p Plugin) handleGetUser(ctx context.Context, cmd []string, server utils.Se
|
||||
if user.NoPassword {
|
||||
flags = append(flags, "nopass")
|
||||
}
|
||||
if user.NoKeys {
|
||||
flags = append(flags, "nokeys")
|
||||
}
|
||||
|
||||
res = res + fmt.Sprintf("\r\n+flags\r\n*%d", len(flags))
|
||||
for _, flag := range flags {
|
||||
@@ -279,6 +282,10 @@ func (p Plugin) handleList(ctx context.Context, cmd []string, server utils.Serve
|
||||
if user.NoPassword {
|
||||
s += " nopass"
|
||||
}
|
||||
// No keys
|
||||
if user.NoKeys {
|
||||
s += " nokeys"
|
||||
}
|
||||
// Passwords
|
||||
for _, password := range user.Passwords {
|
||||
if strings.EqualFold(password.PasswordType, "plaintext") {
|
||||
|
Reference in New Issue
Block a user