Skip to content

Commit

Permalink
Merge pull request #1519 from nextcloud/fix/contacts-disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl authored Mar 5, 2024
2 parents 21031b0 + 40ff7f7 commit 135ff71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Dashboard/TeamDashboardWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use OCA\Circles\Service\CircleService;
use OCA\Circles\Service\ConfigService;
use OCA\Circles\Service\FederatedUserService;
use OCP\App\IAppManager;
use OCP\Dashboard\IAPIWidgetV2;
use OCP\Dashboard\IButtonWidget;
use OCP\Dashboard\IConditionalWidget;
Expand All @@ -50,6 +51,7 @@ public function __construct(
private FederatedUserService $federatedUserService,
private ConfigService $configService,
private IUserSession $userSession,
private IAppManager $appManager,
private LoggerInterface $logger,
) {
}
Expand Down Expand Up @@ -155,6 +157,7 @@ private function getTeamPage(): string {
}

public function isEnabled(): bool {
return $this->configService->getAppValueBool(ConfigService::FRONTEND_ENABLED);
return $this->appManager->isEnabledForUser('contacts') &&
$this->configService->getAppValueBool(ConfigService::FRONTEND_ENABLED);
}
}

0 comments on commit 135ff71

Please sign in to comment.