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