protected function AllowCreatingVoucherCodes()
    {
        $bAllowCreatingCodes = false;

        $oTargetTableConf = TdbCmsTblConf::GetNewInstance();
        /** @var $oTargetTableConf TdbCmsTblConf */
        if ($oTargetTableConf->Loadfromfield('name', 'shop_voucher')) {
            $oGlobal = TGlobal::instance();
            $bUserIsInCodeTableGroup = $oGlobal->oUser->oAccessManager->user->IsInGroups($oTargetTableConf->fieldCmsUsergroupId);
            $bHasNewPermissionOnTargetTable = ($oGlobal->oUser->oAccessManager->HasNewPermission('shop_voucher'));
            $bAllowCreatingCodes = ($bUserIsInCodeTableGroup && $bHasNewPermissionOnTargetTable);
        }

        return $bAllowCreatingCodes;
    }