Sync: forbid sync access to existing templates
This commit is contained in:
parent
7edc5f37b3
commit
f65e880aaa
|
@ -130,6 +130,19 @@ class Sync
|
||||||
$dba = $db->getDbAdapter();
|
$dba = $db->getDbAdapter();
|
||||||
$dba->beginTransaction();
|
$dba->beginTransaction();
|
||||||
foreach ($objects as $object) {
|
foreach ($objects as $object) {
|
||||||
|
if ($object->isTemplate()) {
|
||||||
|
if ($object->hasBeenModified()) {
|
||||||
|
throw new \Exception(
|
||||||
|
sprintf(
|
||||||
|
'Sync is not allowed to modify template "%s"',
|
||||||
|
$object->object_name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($object->hasBeenLoadedFromDb() && $rule->purge_existing === 'y') {
|
if ($object->hasBeenLoadedFromDb() && $rule->purge_existing === 'y') {
|
||||||
/*
|
/*
|
||||||
// TODO: Check against ALL sources
|
// TODO: Check against ALL sources
|
||||||
|
|
Loading…
Reference in New Issue