mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-11-23 22:04:50 +02: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:
@@ -270,7 +270,7 @@ func (c Connection) handleSFTPRename(sourcePath string, targetPath string) error
|
||||
return sftp.ErrSSHFxFailure
|
||||
}
|
||||
logger.CommandLog(renameLogSender, sourcePath, targetPath, c.User.Username, c.ID, c.protocol)
|
||||
executeAction(operationRename, c.User.Username, sourcePath, targetPath)
|
||||
go executeAction(operationRename, c.User.Username, sourcePath, targetPath)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ func (c Connection) handleSFTPRemove(path string) error {
|
||||
if fi.Mode()&os.ModeSymlink != os.ModeSymlink {
|
||||
dataprovider.UpdateUserQuota(dataProvider, c.User, -1, -size, false)
|
||||
}
|
||||
executeAction(operationDelete, c.User.Username, path, "")
|
||||
go executeAction(operationDelete, c.User.Username, path, "")
|
||||
|
||||
return sftp.ErrSSHFxOk
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user