Add BaseExporter.available_for_user()

This commit is contained in:
Raphael Michel
2023-06-16 17:33:14 +02:00
parent 7a48cac862
commit b51ca58820
5 changed files with 23 additions and 4 deletions

View File

@@ -290,6 +290,8 @@ def scheduled_organizer_export(self, organizer: Organizer, schedule: int) -> Non
if isinstance(exporter, OrganizerLevelExportMixin):
if not schedule.owner.has_organizer_permission(organizer, exporter.organizer_required_permission):
has_permission = False
if exporter and not exporter.available_for_user(schedule.owner):
has_permission = False
_run_scheduled_export(
schedule,