Exporters: Give access to authentication infos and allow empty permissions (#5979)

* Exporters: Give access to authentication infos

* Allow exporters to have empty permission

* Use a protocol
This commit is contained in:
Raphael Michel
2026-04-02 15:44:36 +02:00
committed by GitHub
parent 84e12fea32
commit d411c36414
5 changed files with 50 additions and 8 deletions

View File

@@ -229,7 +229,7 @@ class Device(LoggedModel):
"""
return self._organizer_permission_set() if self.organizer == organizer else set()
def has_event_permission(self, organizer, event, perm_name=None, request=None) -> bool:
def has_event_permission(self, organizer, event, perm_name=None, request=None, session_key=None) -> bool:
"""
Checks if this token is part of a team that grants access of type ``perm_name``
to the event ``event``.
@@ -238,6 +238,7 @@ class Device(LoggedModel):
:param event: The event to check
:param perm_name: The permission, e.g. ``event.orders:read``
:param request: This parameter is ignored and only defined for compatibility reasons.
:param session_key: This parameter is ignored and only defined for compatibility reasons.
:return: bool
"""
has_event_access = (self.all_events and organizer == self.organizer) or (