diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index f6451d069..22adabff2 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -664,7 +664,7 @@ [address appendFormat: @"%@ <%@>", cn, email]; else [address appendString: email]; - + url = [NSString stringWithFormat: @"%@/Mail/compose?mailto=%@", [self userFolderPath], address]; } @@ -680,13 +680,25 @@ NSString *objectId, *method, *uri; id result; SOGoContactGCSFolder *co; + SoSecurityManager *sm; co = [self clientObject]; objectId = [co globallyUniqueObjectId]; if ([objectId length] > 0) { - method = [NSString stringWithFormat:@"%@/%@.vcf/editAsContact", - [co soURL], objectId]; + sm = [SoSecurityManager sharedSecurityManager]; + if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles + onObject: co + inContext: context]) + { + method = [NSString stringWithFormat: @"%@/%@.vcf/editAsContact", + [co soURL], objectId]; + } + else + { + method = [NSString stringWithFormat: @"%@/Contacts/personal/%@.vcf/editAsContact", + [self userFolderPath], objectId]; + } uri = [self completeHrefForMethod: method]; result = [self redirectToLocation: uri]; } diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index 8bb4715c6..2c9bbcb39 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -73,7 +73,7 @@ pageName = "UIxContactsListView"; }; newcontact = { - protectedBy = "Add Documents, Images, and Files"; + protectedBy = ""; pageName = "UIxContactEditor"; actionName = "new"; }; @@ -111,7 +111,7 @@ protectedBy = ""; pageName = "UIxContactsListView"; }; - new = { + newcontact = { protectedBy = ""; pageName = "UIxContactEditor"; actionName = "new"; diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 58f30badb..9b464ab49 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -34,7 +34,8 @@ function newEvent(sender, type) { var roles = folder.readAttribute("roles"); if (roles) { roles = roles.split(",") - if ($(roles).indexOf("PublicModifier") < 0) + if ($(roles).indexOf("Owner") < 0 && + $(roles).indexOf("PublicModifier") < 0) folderID = "/personal"; } var urlstr = ApplicationBaseURL + folderID + "/new" + type; @@ -44,7 +45,7 @@ function newEvent(sender, type) { if (hour) params.push("hm=" + hour); if (params.length > 0) - urlstr += "?" + params.join("&"); + urlstr += "?" + params.join("&"); log("newEvent: " + urlstr); window.open(urlstr, "", "width=490,height=470,resizable=0"); return false; /* stop following the link */