Skip to content

Commit

Permalink
Merge branch 'release-7.7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jun 8, 2022
2 parents 6a319af + 234def0 commit 7379ee1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions model/Copy/ServiceProvider/CopyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use oat\generis\model\DependencyInjection\ContainerServiceProviderInterface;
use oat\taoDacSimple\model\Copy\Service\DacSimplePermissionCopier;
use oat\taoDacSimple\model\DataBaseAccess;
use oat\taoMediaManager\model\TaoMediaOntology;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

use function Symfony\Component\DependencyInjection\Loader\Configurator\service;
Expand Down Expand Up @@ -64,5 +65,30 @@ public function __invoke(ContainerConfigurator $configurator): void
service(DacSimplePermissionCopier::class),
]
);

if ($this->isMediaManagerInstalled()) {
$services
->get(ClassCopier::class . '::ASSETS')
->call(
'withPermissionCopier',
[
service(DacSimplePermissionCopier::class),
]
);

$services
->get(InstanceCopier::class . '::ASSETS')
->call(
'withPermissionCopier',
[
service(DacSimplePermissionCopier::class),
]
);
}
}

private function isMediaManagerInstalled(): bool
{
return interface_exists(TaoMediaOntology::class);
}
}

0 comments on commit 7379ee1

Please sign in to comment.