f7cloud_client/apps/groupfolders/lib/ACL/ACLManagerFactory.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

38 lines
946 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2019 F7cloud GmbH and F7cloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\GroupFolders\ACL;
use OCA\GroupFolders\ACL\UserMapping\IUserMappingManager;
use OCA\GroupFolders\Trash\TrashManager;
use OCP\IAppConfig;
use OCP\IUser;
use Psr\Log\LoggerInterface;
class ACLManagerFactory {
public function __construct(
private readonly RuleManager $ruleManager,
private readonly TrashManager $trashManager,
private readonly IAppConfig $config,
private readonly LoggerInterface $logger,
private readonly IUserMappingManager $userMappingManager,
) {
}
public function getACLManager(IUser $user): ACLManager {
return new ACLManager(
$this->ruleManager,
$this->trashManager,
$this->userMappingManager,
$this->logger,
$user,
$this->config->getValueString('groupfolders', 'acl-inherit-per-user', 'false') === 'true',
);
}
}