Remove duplicated method
parent
77b80e27c6
commit
b4d6667f88
|
@ -34,6 +34,8 @@
|
|||
|
||||
#import <SoObjects/SOGo/SOGoUserManager.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoContentObject.h>
|
||||
#import <SoObjects/SOGo/SOGoGCSFolder.h>
|
||||
#import <SoObjects/SOGo/SOGoParentFolder.h>
|
||||
|
@ -193,9 +195,13 @@
|
|||
- (WOResponse *) renameFolderAction
|
||||
{
|
||||
WOResponse *response;
|
||||
WORequest *request;
|
||||
NSDictionary *params, *message;
|
||||
NSString *folderName;
|
||||
|
||||
folderName = [[context request] formValueForKey: @"name"];
|
||||
request = [context request];
|
||||
params = [[request contentAsString] objectFromJSONString];
|
||||
folderName = [params objectForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
{
|
||||
clientObject = [self clientObject];
|
||||
|
@ -204,8 +210,9 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
response = [self responseWithStatus: 500];
|
||||
[response appendContentString: @"Missing 'name' parameter."];
|
||||
message = [NSDictionary dictionaryWithObject: @"Missing name parameter" forKey: @"error"];
|
||||
response = [self responseWithStatus: 500
|
||||
andString: [message jsonRepresentation]];
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
@ -292,33 +292,4 @@
|
|||
return rc;
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) saveAction
|
||||
{
|
||||
SOGoContactGCSFolder *folder;
|
||||
WORequest *request;
|
||||
WOResponse *response;
|
||||
NSDictionary *params, *message;
|
||||
NSString *folderName;
|
||||
|
||||
request = [context request];
|
||||
NSLog(@"%@", [request contentAsString]);
|
||||
params = [[request contentAsString] objectFromJSONString];
|
||||
|
||||
folderName = [params objectForKey: @"name"];
|
||||
if ([folderName length] > 0)
|
||||
{
|
||||
folder = [self clientObject];
|
||||
[folder renameTo: folderName];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
{
|
||||
message = [NSDictionary dictionaryWithObject: @"Missing name parameter" forKey: @"error"];
|
||||
response = [self responseWithStatus: 500
|
||||
andString: [message jsonRepresentation]];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@end /* UIxContactFolderActions */
|
||||
|
|
|
@ -116,8 +116,8 @@
|
|||
};
|
||||
save = {
|
||||
protectedBy = "Change Permissions";
|
||||
actionClass = "UIxContactFolderActions";
|
||||
actionName = "save";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "renameFolder";
|
||||
};
|
||||
userRights = {
|
||||
protectedBy = "ReadAcls";
|
||||
|
@ -153,7 +153,7 @@
|
|||
pageName = "UIxContactEditor";
|
||||
actionName = "new";
|
||||
};
|
||||
renameFolder = {
|
||||
save = {
|
||||
protectedBy = "Change Permissions";
|
||||
actionClass = "UIxFolderActions";
|
||||
actionName = "renameFolder";
|
||||
|
@ -267,6 +267,7 @@
|
|||
view = {
|
||||
protectedBy = "Access Contents Information";
|
||||
pageName = "UIxContactView";
|
||||
actionName = "data";
|
||||
};
|
||||
edit = {
|
||||
protectedBy = "Access Contents Information";
|
||||
|
|
Loading…
Reference in New Issue