@@ -73,6 +73,11 @@ def __init__(self, channel):
7373 request_serializer = pirogue__admin__api_dot_access__pb2 .PermissionChanges .SerializeToString ,
7474 response_deserializer = pirogue__admin__api_dot_access__pb2 .UserAccess .FromString ,
7575 )
76+ self .MyUserAccess = channel .unary_unary (
77+ '/pirogue.admin.access.Access/MyUserAccess' ,
78+ request_serializer = google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
79+ response_deserializer = pirogue__admin__api_dot_access__pb2 .UserAccess .FromString ,
80+ )
7681
7782
7883class AccessServicer (object ):
@@ -181,6 +186,15 @@ def SetUserAccessPermissions(self, request, context):
181186 context .set_details ('Method not implemented!' )
182187 raise NotImplementedError ('Method not implemented!' )
183188
189+ def MyUserAccess (self , request , context ):
190+ """
191+ Get user access details given the authentication token used by the caller of this method.
192+ Returns the caller UserAccess.
193+ """
194+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
195+ context .set_details ('Method not implemented!' )
196+ raise NotImplementedError ('Method not implemented!' )
197+
184198
185199def add_AccessServicer_to_server (servicer , server ):
186200 rpc_method_handlers = {
@@ -239,6 +253,11 @@ def add_AccessServicer_to_server(servicer, server):
239253 request_deserializer = pirogue__admin__api_dot_access__pb2 .PermissionChanges .FromString ,
240254 response_serializer = pirogue__admin__api_dot_access__pb2 .UserAccess .SerializeToString ,
241255 ),
256+ 'MyUserAccess' : grpc .unary_unary_rpc_method_handler (
257+ servicer .MyUserAccess ,
258+ request_deserializer = google_dot_protobuf_dot_empty__pb2 .Empty .FromString ,
259+ response_serializer = pirogue__admin__api_dot_access__pb2 .UserAccess .SerializeToString ,
260+ ),
242261 }
243262 generic_handler = grpc .method_handlers_generic_handler (
244263 'pirogue.admin.access.Access' , rpc_method_handlers )
@@ -437,3 +456,20 @@ def SetUserAccessPermissions(request,
437456 pirogue__admin__api_dot_access__pb2 .UserAccess .FromString ,
438457 options , channel_credentials ,
439458 insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
459+
460+ @staticmethod
461+ def MyUserAccess (request ,
462+ target ,
463+ options = (),
464+ channel_credentials = None ,
465+ call_credentials = None ,
466+ insecure = False ,
467+ compression = None ,
468+ wait_for_ready = None ,
469+ timeout = None ,
470+ metadata = None ):
471+ return grpc .experimental .unary_unary (request , target , '/pirogue.admin.access.Access/MyUserAccess' ,
472+ google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
473+ pirogue__admin__api_dot_access__pb2 .UserAccess .FromString ,
474+ options , channel_credentials ,
475+ insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
0 commit comments