mirror of
https://github.com/nextcloud/server.git
synced 2026-11-25 15:16:20 +01:00
When sharing is disabled for a user, their home storage loses the share permission, so validateMoveOrCopy() refuses to move or copy any of their files into a folder that has a shared ancestor, even when source and target are covered by the same share and no new recipient gains access. The new unit and integration tests for moves within such a share fail until this is fixed. Tests for moves that do expose the file to new recipients (a share not covering the source, a reshare by a recipient, a received share) document the behavior that has to be kept. Refs: https://github.com/nextcloud/server/issues/65433 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
42 lines
1.5 KiB
PHP
42 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
use Behat\Behat\Context\Context;
|
|
|
|
require __DIR__ . '/autoload.php';
|
|
|
|
/**
|
|
* Features context.
|
|
*/
|
|
class SharingContext implements Context {
|
|
use WebDav;
|
|
use Trashbin;
|
|
use AppConfiguration;
|
|
use CommandLine;
|
|
use Activity;
|
|
|
|
protected function resetAppConfigs() {
|
|
$this->deleteServerConfig('core', 'shareapi_default_permissions');
|
|
$this->deleteServerConfig('core', 'shareapi_default_internal_expire_date');
|
|
$this->deleteServerConfig('core', 'shareapi_internal_expire_after_n_days');
|
|
$this->deleteServerConfig('core', 'internal_defaultExpDays');
|
|
$this->deleteServerConfig('core', 'shareapi_enforce_links_password');
|
|
$this->deleteServerConfig('core', 'shareapi_default_expire_date');
|
|
$this->deleteServerConfig('core', 'shareapi_expire_after_n_days');
|
|
$this->deleteServerConfig('core', 'link_defaultExpDays');
|
|
$this->deleteServerConfig('core', 'shareapi_allow_federation_on_public_shares');
|
|
$this->deleteServerConfig('files_sharing', 'outgoing_server2server_share_enabled');
|
|
$this->deleteServerConfig('core', 'shareapi_allow_view_without_download');
|
|
$this->deleteServerConfig('files_sharing', 'update_cutoff_time');
|
|
$this->deleteServerConfig('core', 'shareapi_exclude_groups');
|
|
$this->deleteServerConfig('core', 'shareapi_exclude_groups_list');
|
|
|
|
$this->runOcc(['config:system:delete', 'share_folder']);
|
|
}
|
|
}
|