Explorar el Código

fixed ACL::getRefTable if field not exists

Piotr Labudda hace 8 años
padre
commit
efb67e2924
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      SE/se-lib/ACL.php

+ 4 - 0
SE/se-lib/ACL.php

@@ -227,6 +227,10 @@ class ACL {
 
 		$rootAcl = self::getAclByNamespace($rootObjectNamespace);
 
+		// $item = SchemaFactory::loadDefaultObject('SystemObject')->getItem($rootObjectNamespace, [ 'propertyName' => '*,field' ]);
+		if (!($rootAcl instanceof AntAclBase)) throw new Exception("Ref allowed only for AntAcl objects");
+		$fieldInfo = $rootAcl->_getField($childName); // throws Exception if field not exists
+
 		$refConfig = RefConfig::fetch($rootObjectNamespace, $childName);
 
 		// TODO: CASE: Obj: A, B not installed, Ref: A->B; Install A / cannot install Ref A->B / require install B first / then go back and reinstall A