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:
Nicola Murino
2022-10-29 14:04:31 +02:00
parent 9a9e7d1a7f
commit 80244bd83b
7 changed files with 171 additions and 16 deletions

View File

@@ -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
}