[seam-commits] Seam SVN: r9806 - in trunk/examples/seamspace: resources/WEB-INF and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Dec 18 19:20:26 EST 2008
Author: shane.bryzak at jboss.com
Date: 2008-12-18 19:20:26 -0500 (Thu, 18 Dec 2008)
New Revision: 9806
Modified:
trunk/examples/seamspace/resources/META-INF/security-rules.drl
trunk/examples/seamspace/resources/WEB-INF/components.xml
trunk/examples/seamspace/resources/WEB-INF/pages.xml
trunk/examples/seamspace/view/imagepermissiondetail.xhtml
Log:
Minor
Modified: trunk/examples/seamspace/resources/META-INF/security-rules.drl
===================================================================
--- trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-12-18 23:39:36 UTC (rev 9805)
+++ trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-12-19 00:20:26 UTC (rev 9806)
@@ -15,8 +15,19 @@
import org.jboss.seam.example.seamspace.MemberFriend;
import org.jboss.seam.example.seamspace.MemberImage;
-# This rule allows members to grant permissions on their images to other users/roles
+# These rules allow members to manage permissions on their own images
+rule ManageImagePermissions
+ no-loop
+ activation-group "permissions"
+when
+ acct: MemberAccount()
+ image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ check: PermissionCheck(target == image, action == "seam.read-permissions", granted == false)
+then
+ check.grant();
+end
+
rule GrantImagePermissions
no-loop
activation-group "permissions"
@@ -28,6 +39,18 @@
check.grant();
end
+# Allow all users to read the available roles
+
+rule ReadRoles
+ no-loop
+ activation-group "permissions"
+when
+ check: PermissionCheck(target == "seam.role", action == "read", granted == false)
+ Role(name == "user")
+then
+ check.grant();
+end
+
# This rule allows a member to delete their own images
rule DeleteImage
@@ -154,17 +177,6 @@
check.grant();
end
-rule ManageImagePermissions
- no-loop
- activation-group "permissions"
-when
- img: MemberImage()
- check: PermissionCheck(target == img, action == "seam.read-permissions", granted == false)
- Role(name == "admin")
-then
- check.grant();
-end
-
rule InsertMemberBlog
no-loop
activation-group "permissions"
Modified: trunk/examples/seamspace/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/components.xml 2008-12-18 23:39:36 UTC (rev 9805)
+++ trunk/examples/seamspace/resources/WEB-INF/components.xml 2008-12-19 00:20:26 UTC (rev 9806)
@@ -53,7 +53,7 @@
</drools:rule-base>
<web:multipart-filter create-temp-files="true"
- max-request-size="1000000"
+ max-request-size="5000000"
url-pattern="*.seam"/>
<web:context-filter url-pattern="/content/*"/>
Modified: trunk/examples/seamspace/resources/WEB-INF/pages.xml
===================================================================
--- trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-12-18 23:39:36 UTC (rev 9805)
+++ trunk/examples/seamspace/resources/WEB-INF/pages.xml 2008-12-19 00:20:26 UTC (rev 9806)
@@ -6,8 +6,11 @@
<page view-id="/home.xhtml">
<navigation from-action="#{identity.login}">
- <rule if-outcome="loggedIn">
+ <!--rule if-outcome="loggedIn">
<redirect view-id="/profile.xhtml"/>
+ </rule-->
+ <rule if="#{identity.loggedIn and authenticatedMember ne null}">
+ <redirect view-id="/profile.xhtml"/>
</rule>
</navigation>
<navigation from-action="#{register.start}">
Modified: trunk/examples/seamspace/view/imagepermissiondetail.xhtml
===================================================================
--- trunk/examples/seamspace/view/imagepermissiondetail.xhtml 2008-12-18 23:39:36 UTC (rev 9805)
+++ trunk/examples/seamspace/view/imagepermissiondetail.xhtml 2008-12-19 00:20:26 UTC (rev 9806)
@@ -27,7 +27,7 @@
<h3>Recipients</h3>
<p>
- Select the roles and/or friends that you wish to grant permissions for the following image
+ Select the roles and/or friends that you wish to grant permissions to, for the following image
(Ctrl-click to select multiple):
</p>
More information about the seam-commits
mailing list