Security::module('testmodule','view')
课程如下:
class Security extends Model {
function module($module,$action) {
if(Session::get($module[$action])==1)
return true;
else
return false;
}
}
会话已加载:
[testmodule] => Array ( [add] => 0 [edit] => 0 [view] => 0 [update] => 0 [activation] => 0 [delete] => 0 [print] => 0 )
问题是,我仍然能够查看应该限制的数据。我该如何纠正这个问题。我需要更多信息
答案 0 :(得分:1)
你如何处理结果
Security::module('testmodule','view')
?
你只是检查是真还是假?
此外,您的函数定义是动态的,但您对“模块”函数的方法调用是静态的。