2019-08-26 07:11:09 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2019-08-26 07:11:09 -04:00
|
|
|
/**
|
2024-05-10 09:09:14 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-08-26 07:11:09 -04:00
|
|
|
*/
|
|
|
|
|
use Behat\Behat\Context\Context;
|
|
|
|
|
use Behat\Behat\Context\SnippetAcceptingContext;
|
|
|
|
|
|
2025-11-26 10:13:47 -05:00
|
|
|
require __DIR__ . '/autoload.php';
|
2019-08-26 07:11:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Features context.
|
|
|
|
|
*/
|
|
|
|
|
class SharingContext implements Context, SnippetAcceptingContext {
|
2020-12-29 13:48:38 -05:00
|
|
|
use WebDav;
|
|
|
|
|
use Trashbin;
|
2019-08-26 07:11:09 -04:00
|
|
|
use AppConfiguration;
|
2020-05-28 14:52:11 -04:00
|
|
|
use CommandLine;
|
2025-03-18 10:16:45 -04:00
|
|
|
use Activity;
|
2019-08-26 07:11:09 -04:00
|
|
|
|
2020-04-10 08:19:56 -04:00
|
|
|
protected function resetAppConfigs() {
|
2020-11-12 05:51:37 -05:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_default_permissions');
|
2020-11-12 05:52:53 -05:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_default_internal_expire_date');
|
|
|
|
|
$this->deleteServerConfig('core', 'shareapi_internal_expire_after_n_days');
|
|
|
|
|
$this->deleteServerConfig('core', 'internal_defaultExpDays');
|
2021-03-18 06:41:10 -04:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_enforce_links_password');
|
2020-11-12 05:52:53 -05:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_default_expire_date');
|
|
|
|
|
$this->deleteServerConfig('core', 'shareapi_expire_after_n_days');
|
|
|
|
|
$this->deleteServerConfig('core', 'link_defaultExpDays');
|
2025-05-12 12:40:35 -04:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_allow_federation_on_public_shares');
|
2025-01-22 13:35:06 -05:00
|
|
|
$this->deleteServerConfig('files_sharing', 'outgoing_server2server_share_enabled');
|
2025-06-25 02:49:14 -04:00
|
|
|
$this->deleteServerConfig('core', 'shareapi_allow_view_without_download');
|
2022-11-15 03:57:44 -05:00
|
|
|
|
|
|
|
|
$this->runOcc(['config:system:delete', 'share_folder']);
|
2020-04-10 08:19:56 -04:00
|
|
|
}
|
2019-08-26 07:11:09 -04:00
|
|
|
}
|