public function isAllowed($type)
{
$currentUser = \Pimcore\Tool\Admin::getCurrentUser();
//everything is allowed for admin
if ($currentUser->isAdmin()) {
return true;
}
return $this->getDao()->isAllowed($type, $currentUser);
}