feat: add feishu question preview services

This commit is contained in:
2026-06-07 22:16:36 +08:00
parent be7fbab0a0
commit bd9b2e872e
7 changed files with 288 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
from __future__ import annotations
def can_access_batch(user, batch) -> bool:
if not user or not getattr(user, "is_authenticated", False):
return False
if getattr(user, "is_staff", False) or getattr(user, "is_superuser", False):
return True
return getattr(batch, "user_id", None) == user.pk