STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
directory.py
Go to the documentation of this file.
1"""Who an engine design can be shared with: the team roster.
2
3A thin binding of :mod:`stardesign.directory` to this app's user tree. That
4module documents where the roster comes from, why it is a union of the auth
5service's login records and the shared volume, and why the outbound call to auth
6is not an SSRF hole.
7"""
8
9from fastapi import Request
10
11from stardesign import directory as _shared
12
13from backend import userdata
14
15TTL_SECONDS = _shared.TTL_SECONDS
16
17
18def roster(request: Request) -> list[dict]:
19 """Everyone a design can be shared with: ``[{email, name}]``, sorted."""
20 return _shared.roster(request, userdata.store)
21
22
23def display_names(request: Request) -> dict[str, str]:
24 """``slug -> display name`` for labelling design owners; ``""`` when unknown."""
25 return _shared.display_names(request, userdata.store)
list[dict] roster(Request request)
Definition directory.py:18
dict[str, str] display_names(Request request)
Definition directory.py:23