11import json
22import msgpack
3- from typing import Optional
3+ from typing import Optional , Set
44from jsonschema import ValidationError
55
66from event_model import DocumentNames , schema_validators
77from fastapi import APIRouter , Depends , HTTPException , Request , Security
88import pydantic
99from 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+ )
1117from tiled .server .dependencies import get_entry , get_root_tree
1218from 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