mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
eventmanager: allow to access the backup file
so it can be used in email and other actions Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1354,6 +1354,12 @@ func (r *EventRule) hasUserAssociated(providerObjectType string) bool {
|
||||
return providerObjectType == actionObjectUser
|
||||
case EventTriggerFsEvent:
|
||||
return true
|
||||
default:
|
||||
if len(r.Actions) > 0 {
|
||||
// should we allow schedules where backup is not the first action?
|
||||
// maybe we could pass the action index and check before that index
|
||||
return r.Actions[0].Type == ActionTypeBackup
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user