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

@@ -157,6 +157,13 @@ class BaseExporter:
"""
raise NotImplementedError() # NOQA
def available_for_user(self, user) -> bool:
"""
Allows to do additional checks whether an exporter is available based on the user who calls it. Note that
``user`` may be ``None`` e.g. during API usage.
"""
return True
class OrganizerLevelExportMixin:
@property