public function CheckRight($operate, $showTip = true) { return checkModuleRight($this->modulename, $operate, $showTip); }
function getUserOperate($user, $module, $recode = null) { $operates = getOperate(true); $enable = array(); foreach ($operates as $op) { if (checkModuleRight($user, $module, $op, false)) { $enable[] = $op; } } //处理数据可用权限 if (is_array($recode)) { $operates = getRecodeOperates($recode, $user); //处理删除:_delete表示数据可以删除,需有用户删除权限 if (in_array('_delete', $operates) && in_array('delete', $enable)) { if (!in_array('delete', $operates)) { $operates[] = 'delete'; } } $enable = array_intersect($enable, $operates); } return $enable; }