@@ -130,7 +130,6 @@ impl<R: RequestMessage> Response<R> {
130130#[ derive( Clone , Debug ) ]
131131pub enum Principal {
132132 User ( User ) ,
133- Impersonated { user : User , admin : User } ,
134133}
135134
136135impl Principal {
@@ -140,11 +139,6 @@ impl Principal {
140139 span. record ( "user_id" , user. id . 0 ) ;
141140 span. record ( "login" , & user. github_login ) ;
142141 }
143- Principal :: Impersonated { user, admin } => {
144- span. record ( "user_id" , user. id . 0 ) ;
145- span. record ( "login" , & user. github_login ) ;
146- span. record ( "impersonator" , & admin. github_login ) ;
147- }
148142 }
149143 }
150144}
@@ -225,14 +219,12 @@ impl Session {
225219 fn is_staff ( & self ) -> bool {
226220 match & self . principal {
227221 Principal :: User ( user) => user. admin ,
228- Principal :: Impersonated { .. } => true ,
229222 }
230223 }
231224
232225 fn user_id ( & self ) -> UserId {
233226 match & self . principal {
234227 Principal :: User ( user) => user. id ,
235- Principal :: Impersonated { user, .. } => user. id ,
236228 }
237229 }
238230}
@@ -244,10 +236,6 @@ impl Debug for Session {
244236 Principal :: User ( user) => {
245237 result. field ( "user" , & user. github_login ) ;
246238 }
247- Principal :: Impersonated { user, admin } => {
248- result. field ( "user" , & user. github_login ) ;
249- result. field ( "impersonator" , & admin. github_login ) ;
250- }
251239 }
252240 result. field ( "connection_id" , & self . connection_id ) . finish ( )
253241 }
@@ -763,7 +751,6 @@ impl Server {
763751 connection_id=field:: Empty ,
764752 user_id=field:: Empty ,
765753 login=field:: Empty ,
766- impersonator=field:: Empty ,
767754 user_agent=field:: Empty ,
768755 geoip_country_code=field:: Empty ,
769756 release_channel=field:: Empty ,
@@ -872,7 +859,6 @@ impl Server {
872859 concurrent_handlers,
873860 user_id=field:: Empty ,
874861 login=field:: Empty ,
875- impersonator=field:: Empty ,
876862 lsp_query_request=field:: Empty ,
877863 release_channel=field:: Empty ,
878864 { TOTAL_DURATION_MS } =field:: Empty ,
@@ -936,7 +922,7 @@ impl Server {
936922 }
937923
938924 match & session. principal {
939- Principal :: User ( user) | Principal :: Impersonated { user , admin : _ } => {
925+ Principal :: User ( user) => {
940926 if !user. connected_once {
941927 self . peer . send ( connection_id, proto:: ShowContacts { } ) ?;
942928 self . app_state
0 commit comments