mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-08 01:45:08 +00:00
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:
@@ -138,6 +138,16 @@
|
||||
return item;
|
||||
}
|
||||
|
||||
- (SOGoAppointmentFolder *) componentCalendar
|
||||
{
|
||||
return componentCalendar;
|
||||
}
|
||||
|
||||
- (void) setComponentCalendar: (SOGoAppointmentFolder *) _componentCalendar
|
||||
{
|
||||
ASSIGN (componentCalendar, _componentCalendar);
|
||||
}
|
||||
|
||||
/* actions */
|
||||
- (NSCalendarDate *) newStartDate
|
||||
{
|
||||
@@ -236,7 +246,6 @@
|
||||
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
NSString *newCalendar;
|
||||
SOGoAppointmentFolder *thisFolder, *newFolder;
|
||||
SOGoAppointmentFolders *parentFolder;
|
||||
SOGoAppointmentObject *co;
|
||||
@@ -246,25 +255,21 @@
|
||||
co = [self clientObject];
|
||||
[co saveComponent: event];
|
||||
|
||||
newCalendar = [self queryParameterForKey: @"moveToCalendar"];
|
||||
if ([newCalendar length])
|
||||
if (componentCalendar)
|
||||
{
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
thisFolder = [co container];
|
||||
if (![sm validatePermission: SoPerm_DeleteObjects
|
||||
onObject: thisFolder
|
||||
inContext: context])
|
||||
{
|
||||
parentFolder = [[self container] container];
|
||||
newFolder = [[thisFolder container] lookupName: newCalendar
|
||||
inContext: context
|
||||
acquire: NO];
|
||||
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
||||
onObject: newFolder
|
||||
inContext: context])
|
||||
ex = [co moveToFolder: newFolder];
|
||||
}
|
||||
if (componentCalendar != thisFolder)
|
||||
if (![sm validatePermission: SoPerm_DeleteObjects
|
||||
onObject: thisFolder
|
||||
inContext: context])
|
||||
{
|
||||
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
||||
onObject: componentCalendar
|
||||
inContext: context])
|
||||
ex = [co moveToFolder: componentCalendar];
|
||||
}
|
||||
}
|
||||
|
||||
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
|
||||
|
||||
Reference in New Issue
Block a user