小编jbd*_*jbd的帖子

使用ABAC/XACML,您如何保护报告/大型结果集中的资源?

人们如何在运行报告时使用方法,甚至只是从数据库中选择多个记录?

例如,如果您有一个政策规定:

医生只能在医院看病人

显然,实现它的有效方法是在查询(where hospital = XXX)中包含一个过滤器,但这似乎与ABAC的主体打破,因为它将规则引入SQL本身.

我知道公理化提供,显然基于rules--为你过滤器反向查询机制,但我的系统有很多复杂的SQL,将不得不重构相当多与此有关的工作.

其他人如何处理这个问题?

authorization access-control xacml alfa abac

6
推荐指数
1
解决办法
557
查看次数

迭代在php中的数组,但在迭代期间添加到/从数组中删除

在PHP中,我该怎么做:

$test = array(1,2,3,4);

$i=0;
While (!empty($test)) {

  //do something with $test[i];

  //remove  $test[$i]; 
  unset($test[$i]);

}
Run Code Online (Sandbox Code Playgroud)

谢谢

php arrays

3
推荐指数
2
解决办法
3404
查看次数

ColdFusion mixin导致"例程不能被多次声明".

[注意:在cfcs中包含代码通常是不好的做法,(请参阅下面的答案),所以请考虑这只是研究]

总而言之,我有一个类和一个子类以及一个被子类覆盖的方法.当我在子类中对方法进行硬编码时,一切正常,当我使用cfinclude将它包含在伪构造函数中时,mixin样式,我得到一个"例程不能多次声明".错误.

这看起来非常简单.我想念的是什么:这个混合?

父类:

<cfcomponent >
    <cffunction name="hola" hint="i am the parent method">
        <cfreturn "hola - parent">
    </cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

儿童班:

<cfcomponent extends="mixinTestParent">
    <!---   this would work, successfully overridding parent method
    <cffunction name="hola" hint="i am the child method">
        <cfreturn "hola - child">
    </cffunction>--->

    <cfinclude template="mixinTestInc.cfm">

    <cffunction name="init" access="public" returntype="any" output="false">
        <cfreturn this>
    </cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)

包括:

<cffunction name="hola" hint="i am the child method" access="public">
        <cfreturn "hola - child">
    </cffunction> 
Run Code Online (Sandbox Code Playgroud)

亚军:

<cfset test = new mixinTestChild().init()>
<cfdump var="#test.hola()#">
Run Code Online (Sandbox Code Playgroud)

提前致谢!!

coldfusion mixins

3
推荐指数
1
解决办法
1623
查看次数

标签 统计

abac ×1

access-control ×1

alfa ×1

arrays ×1

authorization ×1

coldfusion ×1

mixins ×1

php ×1

xacml ×1