Author: shane.bryzak(a)jboss.com
Date: 2008-05-05 05:02:56 -0400 (Mon, 05 May 2008)
New Revision: 8114
Added:
trunk/examples/seamspace/view/style/btn_newpermission.png
Modified:
trunk/examples/seamspace/resources/META-INF/security-rules.drl
trunk/examples/seamspace/view/permissionmanager.xhtml
trunk/examples/seamspace/view/style/security.css
trunk/examples/seamspace/view/template.xhtml
Log:
cosmetic, minor
Modified: trunk/examples/seamspace/resources/META-INF/security-rules.drl
===================================================================
--- trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-05-05 07:40:31 UTC
(rev 8113)
+++ trunk/examples/seamspace/resources/META-INF/security-rules.drl 2008-05-05 09:02:56 UTC
(rev 8114)
@@ -15,6 +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
+
+rule GrantImagePermissions
+ no-loop
+ activation-group "permissions"
+when
+ acct: MemberAccount()
+ image: MemberImage(mbr : member -> (mbr.memberId.equals(acct.member.memberId)))
+ check: PermissionCheck(target == image, action == "seam.grant-permission",
granted == false)
+then
+ check.grant();
+end
+
rule ViewProfileImage
no-loop
activation-group "permissions"
Modified: trunk/examples/seamspace/view/permissionmanager.xhtml
===================================================================
--- trunk/examples/seamspace/view/permissionmanager.xhtml 2008-05-05 07:40:31 UTC (rev
8113)
+++ trunk/examples/seamspace/view/permissionmanager.xhtml 2008-05-05 09:02:56 UTC (rev
8114)
@@ -41,15 +41,15 @@
columnClasses=",,enabled,action">
<h:column width="auto">
<f:facet name="header">
- Action
+ Recipient
</f:facet>
- #{permission.action}
+ #{permission.recipient}
</h:column>
<h:column width="auto">
<f:facet name="header">
- Recipient
+ Actions Allowed
</f:facet>
- #{permission.recipient}
+ #{permission.action}
</h:column>
<h:column width="auto">
<f:facet name="header">
Added: trunk/examples/seamspace/view/style/btn_newpermission.png
===================================================================
(Binary files differ)
Property changes on: trunk/examples/seamspace/view/style/btn_newpermission.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/examples/seamspace/view/style/security.css
===================================================================
--- trunk/examples/seamspace/view/style/security.css 2008-05-05 07:40:31 UTC (rev 8113)
+++ trunk/examples/seamspace/view/style/security.css 2008-05-05 09:02:56 UTC (rev 8114)
@@ -16,6 +16,15 @@
cursor: pointer;
}
+input.newpermission {
+ background: url(btn_newpermission.png) top left no-repeat;
+ height: 39px;
+ width: 113px;
+ margin: 4px 4px 4px 4px;
+ border: 0px;
+ cursor: pointer;
+}
+
input.manageusers {
display: block;
background: url(manage_users.png) top left no-repeat;
Modified: trunk/examples/seamspace/view/template.xhtml
===================================================================
--- trunk/examples/seamspace/view/template.xhtml 2008-05-05 07:40:31 UTC (rev 8113)
+++ trunk/examples/seamspace/view/template.xhtml 2008-05-05 09:02:56 UTC (rev 8114)
@@ -2,7 +2,8 @@
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:s="http://jboss.com/products/seam/taglib"
-
xmlns:h="http://java.sun.com/jsf/html">
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
@@ -17,9 +18,17 @@
<div id="header">
<div class="headerRight">
<div class="headerMenu">
- <!--s:link action="" value="SignUp"/-->
+
+ <s:fragment rendered="#{identity.loggedIn}">
+ <s:link view="/profile.xhtml" value="My Profile"
propagation="none">
+ <f:param name="name"
value="#{authenticatedMember.memberName}"/>
+ </s:link>
+ <h:outputText styleClass="divider" value=" | "/>
+ </s:fragment>
+
<s:fragment rendered="#{s:hasRole('admin')}">
- <s:link view="/security.xhtml" value="Security"
propagation="none"/><h:outputText styleClass="divider"
value=" | "/>
+ <s:link view="/security.xhtml" value="Security"
propagation="none"/>
+ <h:outputText styleClass="divider" value=" | "/>
</s:fragment>
<s:link action="#{identity.logout}" value="Log out"
rendered="#{identity.loggedIn}"/>