diff --git a/code/controller/WidgetContentControllerExtension.php b/code/controller/WidgetContentControllerExtension.php index f28947a..3fdfb5e 100644 --- a/code/controller/WidgetContentControllerExtension.php +++ b/code/controller/WidgetContentControllerExtension.php @@ -63,6 +63,10 @@ class WidgetContentControllerExtension extends Extension user_error('No widget found', E_USER_ERROR); } + if (!$widget->canView()) { + return Security::permissionFailure(); + } + return $widget->getController(); } }