Skip to content

Commit

Permalink
Error message on all teams related pages
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli committed Sep 25, 2023
1 parent b752289 commit 41ae82f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Symfony\Component\HttpKernel\KernelEvents;

/**
* Validates that Apigee X Team is enabled on Team list page.
* Validates that Apigee X Team is enabled on every Team page request.
*/
class ValidateApigeeXTeamEnabledSubscriber implements EventSubscriberInterface {

Expand Down Expand Up @@ -76,7 +76,7 @@ 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')) && ($current_route === 'entity.team.collection')) {
if (($current_route = $event->getRequest()->get('_route')) && (strpos($current_route, 'team') !== false)) {
$organization = $this->orgController->load($this->connector->getOrganization());
if ($organization && $this->orgController->isOrganizationApigeeX()) {
if ($organization->getAddonsConfig() || TRUE === $organization->getAddonsConfig()->getMonetizationConfig()->getEnabled()) {
Expand Down

0 comments on commit 41ae82f

Please sign in to comment.