nextcloud/apps/files_external/lib/Lib/SessionStorageWrapper.php
Robin Appelman e96a89e630 feat: add permissions mask variant that only masks one directory
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-04-09 16:19:10 +02:00

28 lines
733 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\Files_External\Lib;
use OC\Files\Storage\Wrapper\PermissionsMask;
use OCP\Constants;
use OCP\Files\Storage\IStorage;
/**
* Wrap Storage in PermissionsMask for session ephemeral use
*/
class SessionStorageWrapper extends PermissionsMask {
/**
* @param array{storage: IStorage, ...} $parameters
*/
public function __construct(array $parameters) {
// disable sharing permission
$parameters['mask'] = Constants::PERMISSION_ALL & ~Constants::PERMISSION_SHARE;
parent::__construct($parameters);
}
}