diff --git a/modules/apigee_edge_teams/apigee_edge_teams.install b/modules/apigee_edge_teams/apigee_edge_teams.install
index b8e6ebfe..e2f1cf21 100644
--- a/modules/apigee_edge_teams/apigee_edge_teams.install
+++ b/modules/apigee_edge_teams/apigee_edge_teams.install
@@ -56,21 +56,6 @@ function apigee_edge_teams_requirements($phase) {
'severity' => REQUIREMENT_ERROR,
];
}
- } else {
- // Edge company APIs are not supported in Apigee Hybrid orgs.
- if ($organization && !OrganizationFeatures::isCompaniesFeatureAvailable($organization)) {
- $url = [
- ':url' => 'https://cloud.google.com/apigee/docs/api-platform/get-started/compare-apigee-products#unsupported-apis',
- ];
- $message = ($phase == 'runtime') ?
- t("The Apigee Edge Teams module functionality is not available for your org and should be uninstalled, because Edge company APIs are not supported for Apigee Hybrid orgs.", $url) :
- t("The Apigee Edge Teams module functionality is not available for your org because Edge company APIs are not supported for Apigee Hybrid orgs.", $url);
- $requirements['apigee_edge_teams_not_supported'] = [
- 'title' => t('Apigee Edge Teams'),
- 'description' => $message,
- 'severity' => REQUIREMENT_ERROR,
- ];
- }
}
}
catch (\Exception $exception) {
diff --git a/modules/apigee_edge_teams/src/EventSubscriber/ValidateApigeeXTeamEnabledSubscriber.php b/modules/apigee_edge_teams/src/EventSubscriber/ValidateApigeeXTeamEnabledSubscriber.php
index 6c26b9ee..361f566a 100644
--- a/modules/apigee_edge_teams/src/EventSubscriber/ValidateApigeeXTeamEnabledSubscriber.php
+++ b/modules/apigee_edge_teams/src/EventSubscriber/ValidateApigeeXTeamEnabledSubscriber.php
@@ -29,28 +29,28 @@
/**
* Validates that Apigee X Team is enabled on every Team page request.
*/
-class ValidateApigeeXTeamEnabledSubscriber implements EventSubscriberInterface {
+final class ValidateApigeeXTeamEnabledSubscriber implements EventSubscriberInterface {
/**
* The SDK connector service.
*
* @var \Drupal\apigee_edge\SDKConnectorInterface
*/
- private $connector;
+ private SDKConnectorInterface $connector;
/**
* The organization controller service.
*
* @var \Drupal\apigee_edge\Entity\Controller\OrganizationControllerInterface
*/
- protected $orgController;
+ protected OrganizationControllerInterface $orgController;
/**
* The messenger service.
*
* @var \Drupal\Core\Messenger\MessengerInterface
*/
- protected $messenger;
+ protected MessengerInterface $messenger;
/**
* ValidateApigeeXTeamEnabledSubscriber constructor.
@@ -76,11 +76,11 @@ public function __construct(SDKConnectorInterface $sdk_connector, OrganizationCo
*/
public function validateApigeexTeamEnabled(RequestEvent $event) {
/** @var \Symfony\Component\Routing\Route $current_route */
- if (($current_route = $event->getRequest()->get('_route')) && (strpos($current_route, 'team') !== FALSE)) {
+ if (($current_route = $event->getRequest()->get('_route')) && (strpos($current_route, 'entity.team') !== FALSE || strpos($current_route, 'settings.team') !== FALSE)) {
$organization = $this->orgController->load($this->connector->getOrganization());
if ($organization && $this->orgController->isOrganizationApigeeX()) {
if ($organization->getAddonsConfig() || TRUE === $organization->getAddonsConfig()->getMonetizationConfig()->getEnabled()) {
- $this->messenger->addError('The Teams module functionality is not available for monetization enabled org on Apigee X / Hybrid and should be uninstalled');
+ $this->messenger->addError('The Teams module functionality is not available for monetization enabled org on Apigee X / Hybrid and should be uninstalled.');
}
}
}