Author: manaRH
Date: 2012-06-14 04:49:52 -0400 (Thu, 14 Jun 2012)
New Revision: 14910
Modified:
branches/enterprise/WFK-2_0/examples-ee6/seamspace/seamspace-ejb/src/main/resources/META-INF/security-rules.drl
Log:
bz #831160 fixed drools rules for satisfy strict mode in Drools 5.2.x
Modified:
branches/enterprise/WFK-2_0/examples-ee6/seamspace/seamspace-ejb/src/main/resources/META-INF/security-rules.drl
===================================================================
---
branches/enterprise/WFK-2_0/examples-ee6/seamspace/seamspace-ejb/src/main/resources/META-INF/security-rules.drl 2012-06-12
13:34:40 UTC (rev 14909)
+++
branches/enterprise/WFK-2_0/examples-ee6/seamspace/seamspace-ejb/src/main/resources/META-INF/security-rules.drl 2012-06-14
08:49:52 UTC (rev 14910)
@@ -15,6 +15,7 @@
import org.jboss.seam.example.seamspace.MemberFriend;
import org.jboss.seam.example.seamspace.MemberImage;
+
# These rules allow members to manage permissions on their own images
rule ManageImagePermissions
@@ -22,7 +23,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ image: MemberImage(mbr : member , (mbr.memberId == acct.member.memberId ))
check: PermissionCheck(target == image, action == "seam.read-permissions",
granted == false)
then
check.grant();
@@ -33,7 +34,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ image: MemberImage(mbr : member , (mbr.memberId == acct.member.memberId ))
check: PermissionCheck(target == image, action == "seam.grant-permission",
granted == false)
then
check.grant();
@@ -58,7 +59,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ image: MemberImage(mbr : member , (mbr.memberId == acct.member.memberId ))
check: PermissionCheck(target == image, action == "delete", granted ==
false)
then
check.grant();
@@ -71,7 +72,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ image: MemberImage(mbr : member , (mbr.memberId == acct.member.memberId ))
check: PermissionCheck(target == image, action == "seam.revoke-permission",
granted == false)
then
check.grant();
@@ -93,7 +94,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.isFriend(acct.member)))
+ image: MemberImage(mbr : member , (mbr.isFriend(acct.member)))
PermissionCheck(target == image, action == "view")
role: RoleCheck(name == "friends")
then
@@ -116,7 +117,7 @@
activation-group "permissions"
when
acct: MemberAccount()
- image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ image: MemberImage(mbr : member , (mbr.memberId == acct.member.memberId))
check: PermissionCheck(target == image, action == "view")
then
check.grant();
@@ -160,7 +161,7 @@
when
mbr: Member()
acct: MemberAccount(member.memberId == mbr.memberId)
- check: PermissionCheck(target.memberId == mbr.memberId, action ==
"createBlog", granted == false)
+ check: PermissionCheck( ((Member)target).memberId == mbr.memberId, action ==
"createBlog", granted == false)
then
check.grant();
end
@@ -172,7 +173,7 @@
when
mbr: Member()
acct: MemberAccount(member.memberId == mbr.memberId)
- check: PermissionCheck(target.memberId == mbr.memberId, action ==
"uploadImage", granted == false)
+ check: PermissionCheck( ((Member)target).memberId ==mbr.memberId, action ==
"uploadImage", granted == false)
then
check.grant();
end