Monotone-Parent: f36908690fb1287e17d7bb0eb4155ddc4c6f6a55

Monotone-Revision: 3ea5e4c3ab43c68fb675c5144a1c3378da620a48

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-08-22T06:44:27
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-08-22 06:44:27 +00:00
parent a0de2d52f7
commit a1bda982f2
9 changed files with 66 additions and 23 deletions
+22
View File
@@ -204,6 +204,12 @@
return folder;
}
- (void) setComponentAddressBook: (SOGoContactFolder *) _componentAddressBook
{
ASSIGN (componentAddressBook, _componentAddressBook);
}
- (NSString *) addressBookDisplayName
{
NSString *fDisplayName;
@@ -595,6 +601,8 @@
SOGoContactGCSEntry *contact;
id result;
NSString *jsRefreshMethod;
SoSecurityManager *sm;
NSException *ex;
contact = [self clientObject];
card = [contact vCard];
@@ -604,6 +612,20 @@
[self _saveSnapshot];
[contact save];
if (componentAddressBook && componentAddressBook != [self componentAddressBook])
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_DeleteObjects
onObject: componentAddressBook
inContext: context])
{
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: componentAddressBook
inContext: context])
ex = [contact moveToFolder: componentAddressBook];
}
}
if ([[[[self context] request] formValueForKey: @"nojs"] intValue])
result = [self redirectToLocation: [self applicationPath]];
else