Skip to content

Addressbooks should be check for uid conccurency before accepting a vcard #11387

@skjnldsv

Description

@skjnldsv

Like calendars:

$q = $this->db->getQueryBuilder();
$q->select($q->createFunction('COUNT(*)'))
->from('calendarobjects')
->where($q->expr()->eq('calendarid', $q->createNamedParameter($calendarId)))
->andWhere($q->expr()->eq('uid', $q->createNamedParameter($extraData['uid'])));
$result = $q->execute();
$count = (int) $result->fetchColumn();
$result->closeCursor();
if ($count !== 0) {
throw new \Sabre\DAV\Exception\BadRequest('Calendar object with uid already exists in this calendar collection.');
}

  • New db column
  • Migration path

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions