mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 15:10:23 +00:00
execute provider events also for plugin auth
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
3b5fba2eec
commit
fd6126134e
1 changed files with 4 additions and 0 deletions
|
@ -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, "")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue