JMAP Registry API implementation - part 8
This commit is contained in:
@@ -39,6 +39,7 @@ impl<T: SessionStream> SessionData<T> {
|
||||
session_id: session.session_id,
|
||||
mailboxes: Mutex::new(vec![]),
|
||||
state: access_token.state().into(),
|
||||
remote_addr: session.remote_addr,
|
||||
access_token,
|
||||
in_flight,
|
||||
};
|
||||
|
||||
@@ -67,6 +67,7 @@ pub struct SessionData<T: SessionStream> {
|
||||
pub mailboxes: parking_lot::Mutex<Vec<Account>>,
|
||||
pub stream_tx: Arc<tokio::sync::Mutex<WriteHalf<T>>>,
|
||||
pub state: AtomicU32,
|
||||
pub remote_addr: IpAddr,
|
||||
pub in_flight: Option<InFlight>,
|
||||
}
|
||||
|
||||
@@ -194,7 +195,9 @@ impl<T: SessionStream> SessionData<T> {
|
||||
self.server
|
||||
.access_token(self.account_id)
|
||||
.await
|
||||
.and_then(|inner| AccessToken::renew(inner, self.access_token.credential_id()))
|
||||
.and_then(|inner| {
|
||||
AccessToken::renew(inner, self.access_token.credential_id(), self.remote_addr)
|
||||
})
|
||||
.caused_by(trc::location!())
|
||||
}
|
||||
|
||||
@@ -211,6 +214,7 @@ impl<T: SessionStream> SessionData<T> {
|
||||
state: self.state,
|
||||
in_flight: self.in_flight,
|
||||
access_token: self.access_token,
|
||||
remote_addr: self.remote_addr,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,7 +375,8 @@ impl<T: SessionStream> Session<T> {
|
||||
// Invalidate ACLs
|
||||
data.server
|
||||
.invalidate_caches(CacheInvalidation::AccessToken(acl_account_id).into())
|
||||
.await;
|
||||
.await
|
||||
.imap_ctx(&arguments.tag, trc::location!())?;
|
||||
|
||||
trc::event!(
|
||||
Imap(trc::ImapEvent::SetAcl),
|
||||
|
||||
Reference in New Issue
Block a user