mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
This allows the admin to control the behavior whether link shares with READ permissions should be extended to also gain SHARE permissions, allowing users (public share receivers) to add the share to their cloud. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
use Behat\Behat\Context\Context;
|
|
use Behat\Behat\Context\SnippetAcceptingContext;
|
|
|
|
require __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
|
|
/**
|
|
* Features context.
|
|
*/
|
|
class SharingContext implements Context, SnippetAcceptingContext {
|
|
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->runOcc(['config:system:delete', 'share_folder']);
|
|
}
|
|
}
|