Skip to content

Commit

Permalink
Merge pull request #5081 from dilyanpalauzov/caldav_options
Browse files Browse the repository at this point in the history
CalDAV OPTIONS: do not announce `calendar-auto-schedule` when CY:scheduling-enabled is `F`
  • Loading branch information
ksmurchison authored Oct 11, 2024
2 parents dd9c0f7 + 8465d8f commit db4250e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imap/http_caldav.c
Original file line number Diff line number Diff line change
Expand Up @@ -8202,6 +8202,13 @@ static int meth_options_cal(struct transaction_t *txn, void *params)
txn->req_tgt.path);
strarray_appendm(&txn->resp_body.links, buf_release(&link));
}
if (txn->req_tgt.allow & ALLOW_CAL_SCHED) {
struct buf temp = BUF_INITIALIZER;
if (!annotatemore_lookup_mbe(txn->req_tgt.mbentry, DAV_ANNOT_NS "<" XML_NS_CYRUS ">scheduling-enabled", "", &temp)
&& (!strcasecmp(buf_cstring(&temp), "F") || !strcasecmp(temp.s, "no")))
txn->req_tgt.allow &= ~ALLOW_CAL_SCHED;
buf_free(&temp);
};

return meth_options(txn, oparams->parse_path);
}

0 comments on commit db4250e

Please sign in to comment.