execute provider events also for plugin auth

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-09-06 19:17:31 +02:00
parent 3b5fba2eec
commit fd6126134e
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -4487,6 +4487,7 @@ func doExternalAuth(username, password string, pubKey []byte, keyboardInteractiv
webDAVUsersCache.swap(&user, password)
}
cachedUserPasswords.Add(user.Username, password, user.Password)
executeAction(operationUpdate, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
}
return user, err
}
@ -4494,6 +4495,7 @@ func doExternalAuth(username, password string, pubKey []byte, keyboardInteractiv
if err != nil {
return user, err
}
executeAction(operationAdd, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
return provider.userExists(user.Username, "")
}
@ -4559,6 +4561,7 @@ func doPluginAuth(username, password string, pubKey []byte, ip, protocol string,
webDAVUsersCache.swap(&user, password)
}
cachedUserPasswords.Add(user.Username, password, user.Password)
executeAction(operationUpdate, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
}
return user, err
}
@ -4566,6 +4569,7 @@ func doPluginAuth(username, password string, pubKey []byte, ip, protocol string,
if err != nil {
return user, err
}
executeAction(operationAdd, ActionExecutorSelf, "", actionObjectUser, user.Username, "", &user)
return provider.userExists(user.Username, "")
}