Commit 226a84e5 authored by Tobias Munk's avatar Tobias Munk

fixed access check for context menu items

parent a012b7e9
......@@ -46,8 +46,8 @@ class Cell extends Widget
*/
public function init()
{
\Yii::$app->trigger('registerMenuItems', new Event(['sender' => $this]));
if (\Yii::$app->user->can('widgets_crud_widget')) {
\Yii::$app->trigger('registerMenuItems', new Event(['sender' => $this]));
WidgetAsset::register(\Yii::$app->view);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment