#124. 페이지 모듈에 열람/관리 권한 추가 및 이를 위해서 zbxe module 설정에 permission 속성 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2601 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-09-18 05:30:25 +00:00
parent dc24001d46
commit ce4afeaa13
16 changed files with 229 additions and 24 deletions

View file

@ -301,6 +301,7 @@
if(!count($xml_obj->module)) return; ///< xml 내용중에 module 태그가 없다면 오류;;
$grants = $xml_obj->module->grants->grant; ///< 권한 정보 (없는 경우도 있음)
$permissions = $xml_obj->module->permissions->permission; ///< 권한 대행 (없는 경우도 있음)
$actions = $xml_obj->module->actions->action; ///< action list (필수)
$default_index = $admin_index = '';
@ -323,6 +324,21 @@
}
}
// 권한 허용 정리
if($permissions) {
if(is_array($permissions)) $permission_list = $permissions;
else $permission_list[] = $permissions;
foreach($permission_list as $permission) {
$action = $permission->attrs->action;
$target = $permission->attrs->target;
$info->permission->{$action} = $target;
$buff .= sprintf('$info->permission->%s = \'%s\';', $action, $target);
}
}
// actions 정리
if($actions) {
if(is_array($actions)) $action_list = $actions;