remove config allowing to immediately delete contacts (as it's required for sync)

This commit is contained in:
Ralf Becker 2021-05-18 14:02:51 +02:00
parent 97e6908509
commit 2d24362f8f
3 changed files with 5 additions and 11 deletions

View File

@ -920,14 +920,10 @@ class addressbook_groupdav extends Api\CalDAV\Handler
'addressbook-multiget' => Api\CalDAV::mkprop('supported-report',array(
Api\CalDAV::mkprop('report',array(
Api\CalDAV::mkprop(Api\CalDAV::CARDDAV,'addressbook-multiget',''))))),
);
// only advertice rfc 6578 sync-collection report, if "delete-prevention" is switched on (deleted entries get marked deleted but not actualy deleted
if ($GLOBALS['egw_info']['server']['history'])
{
$props['supported-report-set']['sync-collection'] = Api\CalDAV::mkprop('supported-report',array(
'sync-collection' => Api\CalDAV::mkprop('supported-report',array(
Api\CalDAV::mkprop('report',array(
Api\CalDAV::mkprop('sync-collection','')))));
}
Api\CalDAV::mkprop('sync-collection',''))))),
);
return $props;
}

View File

@ -101,8 +101,7 @@
<row>
<description value="Prevent deleting of contacts"/>
<select id="newsettings[history]">
<option value="">No</option>
<option value="history">Yes, only admins can purge deleted items</option>
<option value="">Yes, only admins can purge deleted items</option>
<option value="userpurge">Yes, users can purge their deleted items</option>
</select>
</row>

View File

@ -848,10 +848,9 @@ class Contacts extends Contacts\Storage
if ($this->check_perms(Acl::DELETE,$c,$deny_account_delete))
{
if (!($old = $this->read($id))) return false;
// check if we only mark contacts as deleted, or really delete them
// already marked as deleted item and accounts are always really deleted
// we cant mark accounts as deleted, as no such thing exists for accounts!
if ($old['owner'] && $this->delete_history != '' && $old['tid'] != self::DELETED_TYPE)
if ($old['owner'] && $old['tid'] !== self::DELETED_TYPE)
{
$delete = $old;
$delete['tid'] = self::DELETED_TYPE;