Обновление клиента

This commit is contained in:
root
2026-03-05 13:40:40 +00:00
parent 34bcd34979
commit b8905de237
4147 changed files with 748711 additions and 7 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Support;
use OCA\Support\Subscription\SubscriptionAdapter;
use OCP\Capabilities\ICapability;
use OCP\IConfig;
class Capabilities implements ICapability {
public function __construct(
protected readonly SubscriptionAdapter $adapter,
protected readonly IConfig $config,
) {
}
/**
* @return array{
* support?: array{
* hasValidSubscription: bool,
* desktopEnterpriseChannel: string
* },
* }
*/
#[\Override]
public function getCapabilities(): array {
if (!$this->adapter->hasValidSubscription()) {
return [];
}
return [
'support' => [
'hasValidSubscription' => true,
'desktopEnterpriseChannel' => $this->config->getSystemValueString('desktopEnterpriseChannel', 'enterprise'),
],
];
}
}