src/ShopBundle/objects/TCMSTableEditor/TCMSShopTableEditor_ShopVoucherSeries.class.php
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;
    }
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;
    }
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 ; }
return true if the current user has the right to create codes in the shop_voucher table.

@return bool
return true if the current user has the right to create codes in the shop_voucher table .