コード例 #1
0
 protected function _checkReadPermisions(Application\Model\ListResultModel $list)
 {
     $supplServicess = $list->getItems();
     if ($supplServicess !== null) {
         $result = array();
         foreach ($supplServicess as $key => $supplServices) {
             try {
                 $this->_helper->allowed('read', $supplServices);
                 $this->_helper->filterNotAllowedFields('read_field', $supplServices);
                 $result[] = $supplServices;
             } catch (AppEx\ForbiddenException $e) {
                 $list->setCount($list->getCount() - 1);
             }
         }
         $list->setItems($result);
     }
     return $list;
 }
コード例 #2
0
 protected function _checkReadRights(Application\Model\ListResultModel $list)
 {
     $sims = $list->getItems();
     $result = array();
     foreach ($sims as $key => $sim) {
         try {
             $this->_helper->allowed('read', $sim);
             $result[] = $sim;
         } catch (ForbiddenException $e) {
             $list->setCount($list->getCount() - 1);
         }
     }
     $list->setItems($result);
     return $list;
 }