Caldav: no inbox/outbox for delegated calendars

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@495 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-04-01 23:29:05 +00:00
parent 4a22fd56d4
commit 44c4cba9fd
1 changed files with 24 additions and 27 deletions

View File

@ -524,11 +524,6 @@ public class CaldavConnection extends AbstractConnection {
actualPrincipal = session.getEmail();
}
//if (!session.getEmail().equals(principal)) {
// String message = "Invalid principal path, try /principals/users/" + session.getEmail();
// DavGatewayTray.error(message);
// sendErr(HttpStatus.SC_NOT_FOUND, message);
//} else {
CaldavResponse response = new CaldavResponse(HttpStatus.SC_MULTI_STATUS);
response.startMultistatus();
response.startResponse("/principals/users/" + principal);
@ -542,6 +537,8 @@ public class CaldavConnection extends AbstractConnection {
response.appendProperty("C:calendar-user-address-set", "<D:href>mailto:" + actualPrincipal + "</D:href>");
}
// no inbox/outbox for delegated calendars
if (session.getEmail().equals(principal)) {
if (request.hasProperty("schedule-inbox-URL")) {
response.appendProperty("C:schedule-inbox-URL", "<D:href>/users/" + actualPrincipal + "/inbox</D:href>");
}
@ -549,6 +546,7 @@ public class CaldavConnection extends AbstractConnection {
if (request.hasProperty("schedule-outbox-URL")) {
response.appendProperty("C:schedule-outbox-URL", "<D:href>/users/" + actualPrincipal + "/outbox</D:href>");
}
}
if (request.hasProperty("displayname")) {
response.appendProperty("D:displayname", actualPrincipal);
@ -560,7 +558,6 @@ public class CaldavConnection extends AbstractConnection {
response.endResponse();
response.endMultistatus();
response.close();
//}
}
public void sendFreeBusy(String body) throws IOException {