Просмотр исходного кода

added missing method in AccessGroup

Piotr Labudda 8 лет назад
Родитель
Сommit
4599988aa0
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      SE/se-lib/Schema/AccessGroupStorageAcl.php

+ 8 - 0
SE/se-lib/Schema/AccessGroupStorageAcl.php

@@ -43,6 +43,14 @@ class Schema_AccessGroupStorageAcl extends Core_AclBase {// Read only class
 		$fields[100002] = ['name'=>'uid', 'perms'=>'R', 'opis'=>'', 'label'=>'', 'sort_prio'=>102];
 		return $fields;
 	}
+	public function getSqlFieldName($fieldName) {
+		switch ($fieldName) {
+			case 'id': return 'ID';
+			case 'name': return 'DESC';
+			case 'uid': return 'ID';
+		}
+		throw new Exception("Unknown field '{$fieldName}' in AccessGroup (" . $this->getName() . ")");
+	}
 	public function getFieldType($fieldName) { return null; }
 
 	// TODO: replace legacy functions: isAllowed, hasFieldPerm, getFieldIdByName