Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

allowed_for

shared.auth.allowed_for

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Inside (1)
SymbolFileResolved by
authauth.pysame file
shared.auth.allowed_forbackend/app/shared/auth.py, lines 126–133Open source
def allowed_for(principal: Principal, method: str, path: str) -> bool:    if principal.is_admin:        return True    if method in ("GET", "HEAD", "OPTIONS"):        return True    if method != "POST":        return False    return path in READ_ONLY_POST_PATHS or path.startswith(READ_ONLY_POST_PREFIXES)

What the index recorded

Signature
def allowed_for(principal: Principal, method: str, path: str) -> bool:
File
backend/app/shared/auth.py
Lines
126–133
Parser
python-ast
Git blob
c77f24b3d7406a6b302764a8fc5e475c40480e60
Call sites
1 named, 0 resolved, 1 left unlinked
Outside this subset
1 more edges reach code outside the graph shown here

Read it on GitHub at this commit