Multi-tenancy: sharing grants stay within the owner's tenant (MT-1, MT-3)

JMAP shareWith refuses a grantee outside the owner's tenant, or missing, with
invalidForeignKey naming the account. WebDAV ACL answers AllowedPrincipal and
IMAP SETACL answers as for an unknown account.
This commit is contained in:
2026-09-18 15:20:04 -07:00
parent cea8b1593b
commit bcf4a49325
8 changed files with 81 additions and 14 deletions
+2 -2
View File
@@ -101,7 +101,7 @@ impl AddressBookSet for Server {
// Validate ACLs
if !address_book.acls.is_empty() {
if let Err(err) = self.acl_validate(&address_book.acls).await {
if let Err(err) = self.acl_validate(account_id, &address_book.acls).await {
response.not_created.append(id, err.into());
continue 'create;
}
@@ -202,7 +202,7 @@ impl AddressBookSet for Server {
}
}
if has_acl_changes {
if let Err(err) = self.acl_validate(&new_address_book.acls).await {
if let Err(err) = self.acl_validate(account_id, &new_address_book.acls).await {
response.not_updated.append(id, err.into());
continue 'update;
}