mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
게시판/블로그/방명록등의 추가설정/권한설정/레이아웃편집등에서 관리자지정이 되거나 관리그룹으로 되면 정상적으로 관리를 할 수 있도록 기능 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3493 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b73c48ecbc
commit
19e8df6405
9 changed files with 241 additions and 26 deletions
|
|
@ -604,5 +604,26 @@
|
|||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 모듈의 정보와 회원의 정보를 받아서 관리 권한 유무를 판단
|
||||
**/
|
||||
function isModuleAdmin($module_info, $member_info) {
|
||||
$user_id = $member_info->user_id;
|
||||
$group_list = $member_info->group_list;
|
||||
|
||||
// 직접 관리자로 선택하였을 경우 확인
|
||||
if(is_array($module_info->admin_id) && in_array($user_id, $module_info->admin_id)) return true;
|
||||
|
||||
// 관리자 그룹으로 등록되어 있을 경우 확인
|
||||
$manager_group = $module_info->grants['manager'];
|
||||
if(count($group_list) && count($manager_group)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
if(in_array($group_srl, $manager_group)) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue