Skip to content

Commit 92cff04

Browse files
committed
Update post_document endpoint with new get_entry API
1 parent fd9ca39 commit 92cff04

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

databroker/server.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import json
22
import msgpack
3-
from typing import Optional
3+
from typing import Optional, Set
44
from jsonschema import ValidationError
55

66
from event_model import DocumentNames, schema_validators
77
from fastapi import APIRouter, Depends, HTTPException, Request, Security
88
import pydantic
99
from starlette.responses import StreamingResponse
10-
from tiled.server.authentication import check_scopes, get_current_principal, get_current_scopes, get_session_state
10+
from tiled.server.authentication import (
11+
check_scopes,
12+
get_current_access_tags,
13+
get_current_principal,
14+
get_current_scopes,
15+
get_session_state
16+
)
1117
from tiled.server.dependencies import get_entry, get_root_tree
1218
from tiled.type_aliases import Scopes
1319

@@ -88,6 +94,7 @@ async def post_documents(
8894
principal=Depends(get_current_principal),
8995
root_tree=Depends(get_root_tree),
9096
session_state: dict = Depends(get_session_state),
97+
authn_access_tags: Optional[Set[str]] = Depends(get_current_access_tags),
9198
authn_scopes: Scopes = Depends(get_current_scopes),
9299
fill: Optional[bool] = False,
93100
_=Security(check_scopes, scopes=["write:data", "write:metadata"])
@@ -98,6 +105,7 @@ async def post_documents(
98105
path,
99106
["write:data", "write:metadata"],
100107
principal,
108+
authn_access_tags,
101109
authn_scopes,
102110
root_tree,
103111
session_state,

0 commit comments

Comments
 (0)