mirror of
https://github.com/silverstripe/silverstripe-widgets
synced 2024-10-22 17:05:54 +02:00
added check if canView
This commit is contained in:
parent
0986537be7
commit
51eaa5f8be
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user