浏览代码

added missing method in AccessGroup

Piotr Labudda 8 年之前
父节点
当前提交
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