mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-15 00:12:43 +09:00
현재 모듈이 아닌 특정 모듈의 유저 권한을 체크하는 <permission> 옵션 추가
This commit is contained in:
parent
3f33194f94
commit
a258a3cec8
2 changed files with 104 additions and 33 deletions
|
|
@ -845,10 +845,16 @@ class moduleModel extends module
|
|||
{
|
||||
$action = $permission->attrs->action;
|
||||
$target = $permission->attrs->target;
|
||||
$check = $permission->attrs->check ?: 'module_srl';
|
||||
$check_array = isset($permission->attrs->check_array) ? $permission->attrs->check_array : '';
|
||||
|
||||
$info->permission->{$action} = $target;
|
||||
$info->permission_check->{$action}->key = $check;
|
||||
$info->permission_check->{$action}->array = $check_array;
|
||||
|
||||
$buff[] = sprintf('$info->permission->%s = \'%s\';', $action, $target);
|
||||
$buff[] = sprintf('$info->permission_check->%s->key = \'%s\';', $action, $check);
|
||||
$buff[] = sprintf('$info->permission_check->%s->array = \'%s\';', $action, $check_array);
|
||||
}
|
||||
}
|
||||
// for admin menus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue