File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ async def main():
283283 relation = "viewer" ,
284284 object = "document:0192ab2a-d83f-756d-9397-c5ed9f3cb69a" ,
285285 context = dict (ViewCount = 100 ),
286- correlation_id = anne_cor_id ,
286+ correlation_id = anne_cor_id , # correlation_id is an optional parameter, the SDK will insert a value if not provided.
287287 ),
288288 ClientBatchCheckItem (
289289 user = "user:bob" ,
@@ -294,8 +294,12 @@ async def main():
294294 ]
295295 )
296296 )
297- print (f"Anne allowed: { response .result [0 ].allowed } " )
298- print (f"Bob allowed: { response .result [1 ].allowed } " )
297+
298+ for result in response .result :
299+ if result .correlation_id == anne_cor_id :
300+ print (f"Anne allowed: { result .allowed } " )
301+ else :
302+ print (f"{ result .request .user } allowed: { result .allowed } " )
299303
300304 # List objects with context
301305 print ("Listing objects for access with context" )
You can’t perform that action at this time.
0 commit comments