mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
dataprovider: add custom command and/or HTTP notifications on users add, update and delete
This way custom logic can be implemented for example to create a UNIX user as asked in #58
This commit is contained in:
@@ -101,10 +101,10 @@ func (t *Transfer) Close() error {
|
||||
elapsed := time.Since(t.start).Nanoseconds() / 1000000
|
||||
if t.transferType == transferDownload {
|
||||
logger.TransferLog(downloadLogSender, t.path, elapsed, t.bytesSent, t.user.Username, t.connectionID, t.protocol)
|
||||
executeAction(operationDownload, t.user.Username, t.path, "")
|
||||
go executeAction(operationDownload, t.user.Username, t.path, "")
|
||||
} else {
|
||||
logger.TransferLog(uploadLogSender, t.path, elapsed, t.bytesReceived, t.user.Username, t.connectionID, t.protocol)
|
||||
executeAction(operationUpload, t.user.Username, t.path, "")
|
||||
go executeAction(operationUpload, t.user.Username, t.path, "")
|
||||
}
|
||||
}
|
||||
metrics.TransferCompleted(t.bytesSent, t.bytesReceived, t.transferType, t.transferError)
|
||||
|
||||
Reference in New Issue
Block a user