For the second bug, where the calendar item cannot be added via DAV, I believe the problem starts in the logic in CalendarCollection.adjustOrganizer():Here I think the simplest fix is to not do the get() lookup when the origOrganizerAddr is null, changing line 325 to:It would probably be wise for LdapProvisioning.fixupAccountName() to more gracefully handle null arguments.
Code:
ZOrganizer org = invite.getOrganizer(); String origOrganizerAddr = null; // if ORGANIZER field is unset, set the field value with authUser's email addr. if (org == null) { org = new ZOrganizer(ctxt.getAuthAccount().getName(), null); invite.setOrganizer(org); invite.setIsOrganizer(true); } else { // iCal may use alias for organizer address. Rewrite that to primary address origOrganizerAddr = org.getAddress(); Account acct = Provisioning.getInstance().get(AccountBy.name, origOrganizerAddr); if (acct != null) { String newAddr = acct.getName(); if (!origOrganizerAddr.equals(newAddr)) { org.setAddress(newAddr); invite.setIsOrganizer(acct); } } }
Code:
Account acct = (origOrganizerAddr == null) ? null : Provisioning.getInstance().get(AccountBy.name, origOrganizerAddr);
Statistics: Posted by jered — Tue Jan 02, 2024 7:57 pm