|
|
@@ -59,7 +59,12 @@ class ModuleVoter extends Voter
|
|
|
/** @var Organization $organization */
|
|
|
$organization = $currentAccess->getOrganization();
|
|
|
|
|
|
- return $this->isOrganizationHaveThisModule($organization, $module);
|
|
|
+ if (!$this->isOrganizationHaveThisModule($organization, $module)) {
|
|
|
+ throw new AccessDeniedHttpException(
|
|
|
+ sprintf("The organization doesn't have the module '%s'", $module)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/**
|