← Về thư mục
openai4s/storage/team.py
- create_team_schema · function · L103-L105 — def create_team_schema(conn: sqlite3.Connection) -> None
- create_session_owners_schema · function · L108-L110 — def create_session_owners_schema(conn: sqlite3.Connection) -> None
- hash_password · function · L113-L117 — def hash_password(password: str, salt: bytes, iterations: int | None = None) -> bytes
- token_digest · function · L120-L122 — def token_digest(token: str) -> str
- _user_row · function · L125-L133 — def _user_row(row: Any) -> dict
- validate_username · function · L149-L164 — def validate_username(username: str) -> str
- _username_key · function · L167-L170 — def _username_key(username: str) -> str
- TeamRepository · class · L173-L624 — class TeamRepository
- init · method · L176-L186 — def init( self, connection: sqlite3.Connection, lock: Any, *, clock_ms: Callable[[], int], ) -> None
- _assert_portable_username_keys · method · L188-L213 — def _assert_portable_username_keys(self) -> None
- create_user · method · L217-L289 — def create_user( self, *, username: str, password: str, role: str = "member", display_name: str | None = None, ) -> dict
- get_user · method · L291-L296 — def get_user(self, user_id: str) -> dict | None
- get_user_by_username · method · L298-L304 — def get_user_by_username(self, username: str) -> dict | None
- list_users · method · L306-L311 — def list_users(self) -> list[dict]
- count_users · method · L313-L317 — def count_users(self) -> int
- set_disabled · method · L319-L332 — def set_disabled(self, user_id: str, disabled: bool) -> bool
- set_password · method · L334-L351 — def set_password(self, user_id: str, password: str) -> bool
- verify_password · method · L353-L373 — def verify_password(self, username: str, password: str) -> dict | None
- create_auth_session · method · L377-L388 — def create_auth_session(self, user_id: str, *, ttl_s: int = SESSION_TTL_S) -> str
- resolve_auth_session · method · L390-L428 — def resolve_auth_session(self, token: str | None) -> dict | None
- revoke_auth_session · method · L430-L439 — def revoke_auth_session(self, token: str | None) -> bool
- purge_expired_sessions · method · L441-L448 — def purge_expired_sessions(self) -> int
- set_session_owner · method · L452-L473 — def set_session_owner( self, session_id: str, user_id: str, *, project_id: str | None = None, visibility: str = "project", ) -> None
- session_owner · method · L475-L489 — def session_owner(self, session_id: str) -> dict | None
- delete_session_owner · method · L491-L496 — def delete_session_owner(self, session_id: str) -> None
- set_session_visibility · method · L498-L511 — def set_session_visibility( self, session_id: str, visibility: str, *, user_id: str ) -> bool
- session_visible_to · method · L513-L544 — def session_visible_to(self, session_id: str, user: dict | None) -> bool
- session_replayable_by · method · L546-L566 — def session_replayable_by(self, session_id: str, user: dict | None) -> bool
- audit · method · L570-L596 — def audit( self, *, actor: str, action: str, delegated_by: str | None = None, user_id: str | None = None, project_id: str | None = None, target: str | None = None, detail: str | None = None, ) -> None
- list_audit · method · L598-L624 — def list_audit(self, *, limit: int = 200, action: str | None = None) -> list[dict]