Remove newAction from UIx{Appointment,Task}Editor

We now rely on [UIxFolderActions newguidAction]
This commit is contained in:
Francis Lachapelle
2015-06-11 15:54:09 -04:00
parent a5a2028da7
commit c29719f49d
4 changed files with 14 additions and 75 deletions
-30
View File
@@ -331,36 +331,6 @@
return self;
}
- (id <WOActionResults>) newAction
{
NSString *objectId, *method, *uri;
id <WOActionResults> result;
SOGoAppointmentFolder *co;
SoSecurityManager *sm;
co = [self clientObject];
objectId = [co globallyUniqueObjectId];
if ([objectId length])
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: co
inContext: context])
method = [NSString stringWithFormat:@"%@/%@.ics/editAsAppointment",
[co soURL], objectId] ;
else
method = [NSString stringWithFormat: @"%@/Calendar/personal/%@.ics/editAsAppointment",
[self userFolderPath], objectId];
uri = [self completeHrefForMethod: method];
result = [self redirectToLocation: uri];
}
else
result = [NSException exceptionWithHTTPStatus: 500 /* Internal Error */
reason: @"could not create a unique ID"];
return result;
}
- (void) _adjustRecurrentRules
{
iCalRecurrenceRule *rule;
-34
View File
@@ -356,40 +356,6 @@
return self;
}
- (id <WOActionResults>) newAction
{
NSString *objectId, *method, *uri;
id <WOActionResults> result;
SOGoAppointmentFolder *co;
SoSecurityManager *sm;
co = [self clientObject];
objectId = [co globallyUniqueObjectId];
if ([objectId length] > 0)
{
sm = [SoSecurityManager sharedSecurityManager];
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
onObject: co
inContext: context])
{
method = [NSString stringWithFormat:@"%@/%@.ics/editAsTask",
[co soURL], objectId];
}
else
{
method = [NSString stringWithFormat: @"%@/Calendar/personal/%@.vcf/editAsTask",
[self userFolderPath], objectId];
}
uri = [self completeHrefForMethod: method];
result = [self redirectToLocation: uri];
}
else
result = [NSException exceptionWithHTTPStatus: 500 /* Internal Error */
reason: @"could not create a unique ID"];
return result;
}
#warning this method could be replaced with a method common with UIxAppointmentEditor...
- (id <WOActionResults>) saveAction
{
-10
View File
@@ -174,16 +174,6 @@
pageName = "UIxCalUserRightsEditor";
actionName = "saveUserRights";
};
newevent = {
protectedBy = "<public>";
pageName = "UIxAppointmentEditor";
actionName = "new";
};
newtask = {
protectedBy = "<public>";
pageName = "UIxTaskEditor";
actionName = "new";
};
};
};