예제 #1
0
 function checkActionAllowed($sAction, $bSkipTranslatedPercentPermission = false)
 {
     if (!$bSkipTranslatedPercentPermission) {
         if ($sAction == 'view') {
             //check min translated percent and throw a special exception for distinction
             if (!$this->isActionAllowed('translate') && $this->getTranslatedPercent() < AnwComponent::globalCfgViewUntranslatedMinpercent()) {
                 throw new AnwAclMinTranslatedPercentException($this->getTranslatedPercent());
             }
         }
     }
     if (!AnwCurrentSession::isActionAllowed($this->getName(), $sAction, $this->getLang())) {
         throw new AnwAclException("permission denied on page action: " . $sAction);
     }
 }