mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-12 11:55:09 +00:00
Monotone-Parent: ea72255819157346b8579f8e17c6e9fb6c5c0d34
Monotone-Revision: a1294497e9f6ed0ee90d2f695f0735f2eb1ced11 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-10T21:44:25 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
#include <math.h>
|
||||
|
||||
#import <NGObjWeb/SoObject.h>
|
||||
#import <NGObjWeb/SoPermissions.h>
|
||||
#import <NGObjWeb/SoSecurityManager.h>
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
@@ -36,6 +38,7 @@
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
#import <SoObjects/SOGo/SOGoContentObject.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentsFolder.h>
|
||||
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
|
||||
|
||||
#import <SoObjects/Appointments/SOGoComponentOccurence.h>
|
||||
@@ -230,7 +233,36 @@
|
||||
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
[[self clientObject] saveComponent: event];
|
||||
NSString *newCalendar;
|
||||
SOGoAppointmentFolder *thisFolder, *newFolder;
|
||||
SOGoAppointmentFolders *parentFolder;
|
||||
SOGoAppointmentObject *co;
|
||||
SoSecurityManager *sm;
|
||||
NSException *ex;
|
||||
|
||||
co = [self clientObject];
|
||||
[co saveComponent: event];
|
||||
|
||||
newCalendar = [self queryParameterForKey: @"moveToCalendar"];
|
||||
if ([newCalendar length])
|
||||
{
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
||||
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user