|
|
@@ -16,9 +16,6 @@ class TestPermsStorageAcl extends Core_AclBase {
|
|
|
public function getRootTableName() { return 'TEST_PREMS'; }
|
|
|
public function getRealFieldListByIdZasob($force = false) {
|
|
|
$cols = $this->parentAcl->getRealFieldListByIdZasob();
|
|
|
- foreach ($cols as $id => $name) {
|
|
|
- if ('ID' == $name) $cols[$id] = 'id';
|
|
|
- }
|
|
|
$cols[100000] = 'File';
|
|
|
return $cols;
|
|
|
}
|
|
|
@@ -31,9 +28,6 @@ class TestPermsStorageAcl extends Core_AclBase {
|
|
|
return null;
|
|
|
}
|
|
|
public function getFieldType($colName) {
|
|
|
- switch ($colName) {
|
|
|
- case 'id': return array(); break;
|
|
|
- }
|
|
|
return null;
|
|
|
}
|
|
|
public function isAllowed($idZasob, $taskPerm, $record = null) {
|
|
|
@@ -49,7 +43,6 @@ class TestPermsStorageAcl extends Core_AclBase {
|
|
|
public function getItems($params = array()) {
|
|
|
$DBG = V::get('DBG_DS', 0, $_GET, 'int');
|
|
|
if($DBG>2){echo 'C.'.get_class($this).' L.' . __LINE__ . " getItems \$params:";print_r($params);echo "\n";}
|
|
|
- if (!empty($params['ogc:Filter'])) $params['ogc:Filter'] = str_replace('<ogc:PropertyName>id</ogc:PropertyName>', '<ogc:PropertyName>ID</ogc:PropertyName>', $params['ogc:Filter']);
|
|
|
$items = array();
|
|
|
$rawItems = $this->parentAcl->getItems($params);
|
|
|
foreach ($rawItems as $pk => $item) $items[$pk] = (array)$item;
|
|
|
@@ -92,13 +85,11 @@ class TestPermsStorageAcl extends Core_AclBase {
|
|
|
return $this->parentAcl->addItem($itemTodo);
|
|
|
}
|
|
|
public function updateItem($itemPatch) {
|
|
|
- $itemPatch['ID'] = $itemPatch['id'];
|
|
|
- unset($itemPatch['id']);
|
|
|
return $this->parentAcl->updateItem($itemPatch);
|
|
|
}
|
|
|
|
|
|
public function getGeomFieldType($fieldName) { return null; }
|
|
|
- public function getPrimaryKeyField() { return 'id'; }
|
|
|
+ public function getPrimaryKeyField() { return 'ID'; }
|
|
|
public function getID() { return 0; }
|
|
|
public function getAttributesFromZasoby() {
|
|
|
$attributes = array();// fldName => [ 'id_zasob' => int, 'label' => str, 'description' => str ]
|
|
|
@@ -113,7 +104,6 @@ class TestPermsStorageAcl extends Core_AclBase {
|
|
|
// return 'ref:p5_objects:File';
|
|
|
return true;
|
|
|
}
|
|
|
- if ('id' == $fieldName) $fieldName = 'ID';
|
|
|
return $this->parentAcl->isAllowed($fieldID = $this->parentAcl->getFieldIdByName($fieldName), $taskPerm, $record);
|
|
|
}
|
|
|
public function getXsdFieldType($fieldName) {
|