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
3
A thin binding of :mod:`stardesign.directory` to this app's user tree. That
4
module documents where the roster comes from, why it is a union of the auth
5
service's login records and the shared volume, and why the outbound call to auth
6
is not an SSRF hole.
7
"""
8
9
from
fastapi
import
Request
10
11
from
stardesign
import
directory
as
_shared
12
13
from
backend
import
userdata
14
15
TTL_SECONDS = _shared.TTL_SECONDS
16
17
18
def
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
23
def
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)
backend.directory.roster
list[dict] roster(Request request)
Definition
directory.py:18
backend.directory.display_names
dict[str, str] display_names(Request request)
Definition
directory.py:23
EngineDesign
backend
directory.py
Generated by
1.15.0