mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 15:27:12 +00:00
fix(addressbook(web)): update card on save when certificate is removed
This commit is contained in:
1 parent
547d26af19
commit
c7ee4d8c19
5 files changed
+32
-6
No files matched your search
@@ -186,7 +186,11 @@
|
||||
|
||||
- (WOResponse *) removeCertificateAction
|
||||
{
|
||||
[[[self clientObject] vCard] setCertificate: nil];
|
||||
SOGoContactGCSEntry *contact;
|
||||
|
||||
contact = [self clientObject];
|
||||
[[contact vCard] setCertificate: nil];
|
||||
[contact save];
|
||||
|
||||
return [self responseWith204];
|
||||
}
|
||||
|
||||
@@ -240,6 +240,7 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||
NSCalendarDate *date;
|
||||
CardElement *element;
|
||||
id o;
|
||||
BOOL hasCertificate;
|
||||
|
||||
unsigned int i, year, month, day;
|
||||
|
||||
@@ -418,6 +419,10 @@ static Class SOGoContactGCSEntryK = Nil;
|
||||
}
|
||||
}
|
||||
|
||||
hasCertificate = [[attributes objectForKey: @"hasCertificate"] boolValue];
|
||||
if (!hasCertificate)
|
||||
[card setCertificate: nil];
|
||||
|
||||
[card cleanupEmptyChildren];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user