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