Esempio n. 1
0
 public function getAccessListItems($accessType = PermissionKey::ACCESS_TYPE_INCLUDE, $filterEntities = array())
 {
     $db = Loader::db();
     $list = parent::getAccessListItems($accessType, $filterEntities);
     foreach ($list as $l) {
         $pe = $l->getAccessEntityObject();
         if ($this->permissionObjectToCheck instanceof Page && $l->getAccessType() == PermissionKey::ACCESS_TYPE_INCLUDE) {
             $permission = 'A';
         } else {
             $permission = $db->GetOne('select permission from ' . $this->dbTableAccessList . ' where peID = ? and paID = ?', array($pe->getAccessEntityID(), $l->getPermissionAccessID()));
             if ($permission != 'N' && $permission != 'C') {
                 $permission = 'A';
             }
         }
         $l->setGroupsAllowedPermission($permission);
         if ($permission == 'C') {
             $gIDs = $db->GetCol('select gID from ' . $this->dbTableAccessListCustom . ' where peID = ? and paID = ?', array($pe->getAccessEntityID(), $l->getPermissionAccessID()));
             $l->setGroupsAllowedArray($gIDs);
         }
     }
     return $list;
 }