diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 6887055c..6b1df282 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -41,4 +41,4 @@ jobs: run: composer i - name: Lint - run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) + run: PHP_CS_FIXER_IGNORE_ENV=1 composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) diff --git a/appinfo/info.xml b/appinfo/info.xml index 476a5ffe..329d1f33 100755 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,7 +9,7 @@ Guests accounts can be created from the share menu by entering either the recipients email or name and choosing "create guest account", once the share is created the guest user will receive an email notification about the mail with a link to set their password. Guests users can only access files shared to them and cannot create any files outside of shares, additionally, the apps accessible to guest accounts are whitelisted.]]> - 3.0.1 + 3.1.0 agpl Nextcloud @@ -26,7 +26,7 @@ Guests users can only access files shared to them and cannot create any files ou https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/settings.png https://raw.githubusercontent.com/nextcloud/guests/master/screenshots/dropdown.png - + OCA\Guests\Command\ListCommand diff --git a/lib/AppConfigOverwrite.php b/lib/AppConfigOverwrite.php index 66ce8fd7..dbf419be 100644 --- a/lib/AppConfigOverwrite.php +++ b/lib/AppConfigOverwrite.php @@ -24,7 +24,8 @@ namespace OCA\Guests; use OC\AppConfig; -use OC\DB\ConnectionAdapter; +use OCP\IDBConnection; +use Psr\Log\LoggerInterface; class AppConfigOverwrite extends AppConfig { @@ -32,10 +33,11 @@ class AppConfigOverwrite extends AppConfig { private $overWrite; public function __construct( - ConnectionAdapter $conn, + IDBConnection $connection, + LoggerInterface $logger, array $overWrite ) { - parent::__construct($conn->getInner()); + parent::__construct($connection, $logger); $this->overWrite = $overWrite; } diff --git a/lib/RestrictionManager.php b/lib/RestrictionManager.php index 8d6fd729..cb7c4e95 100644 --- a/lib/RestrictionManager.php +++ b/lib/RestrictionManager.php @@ -33,6 +33,7 @@ use OCP\IUser; use OCP\IUserSession; use OCP\Settings\IManager; +use Psr\Log\LoggerInterface; class RestrictionManager { /** @var AppWhitelist */ @@ -119,11 +120,15 @@ public function lateSetupRestrictions(): void { $this->userBackend->setAllowListing(false); $this->server->registerService(AppConfig::class, function () { - return new AppConfigOverwrite($this->server->get(IDBConnection::class), [ - 'core' => [ - 'shareapi_only_share_with_group_members' => 'yes' + return new AppConfigOverwrite( + $this->server->get(IDBConnection::class), + $this->server->get(LoggerInterface::class), + [ + 'core' => [ + 'shareapi_only_share_with_group_members' => 'yes' + ] ] - ]); + ); }); } } diff --git a/tests/stub.php b/tests/stub.php index 208c6628..2309cbac 100644 --- a/tests/stub.php +++ b/tests/stub.php @@ -130,8 +130,15 @@ public function setUnreadCounter(string $id, int $unreadCounter): void { } class AppConfig { - public function __construct(\OC\DB\Connection $connection) { + public function __construct( + protected \OCP\IDBConnection $connection, + private \Psr\Log\LoggerInterface $logger, + ) { } + + /** + * @deprecated - use getValue*() + */ public function getValue(string $app, string $key, string $default = null): string { } }