MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / check_collection_access

Function check_collection_access

backend/src/flashcards/services.py:187–194  ·  view source on GitHub ↗
(
    session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
)

Source from the content-addressed store, hash-verified

185
186
187def check_collection_access(
188 session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
189) -> bool:
190 statement = select(Collection).where(
191 Collection.id == collection_id, Collection.user_id == user_id
192 )
193 collection = session.exec(statement).first()
194 return collection is not None
195
196
197def get_practice_sessions(

Calls

no outgoing calls