mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-30 18:57:18 +00:00
feat(carddav): fix issue where only personal contacts can be synced on macOS (#1981). When , append the addressbook name as a username suffix to force macOS to treat each book as a distinct account. Usernames must not contain . Install via the provisioning profile. Closes #6033.
This commit is contained in:
@@ -102,11 +102,14 @@
|
||||
ownerUser = [SOGoUser userWithLogin: nameInContainer roles: nil];
|
||||
login = [ownerUser login];
|
||||
[self setOwner: login];
|
||||
if (![nameInContainer isEqualToString: login])
|
||||
if (![nameInContainer isEqualToString: login]
|
||||
&& [nameInContainer rangeOfString: @"!"].location == NSNotFound)
|
||||
// In case the user domain is specified in the URL but not in the user
|
||||
// login name, we remove it (user@domain => user).
|
||||
// This happens when SOGoLoginDomains is defined but
|
||||
// SOGoEnableDomainBasedUID is disabled.
|
||||
// The !book alias used by the per-addressbook CardDAV profile must be
|
||||
// preserved here so generated hrefs keep the discriminator.
|
||||
ASSIGN(nameInContainer, login);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user