[seam-commits] Seam SVN: r12378 - in modules/security/trunk/examples/seamspace/src/main/webapp: WEB-INF and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sat Apr 3 10:41:03 EDT 2010


Author: shane.bryzak at jboss.com
Date: 2010-04-03 10:41:03 -0400 (Sat, 03 Apr 2010)
New Revision: 12378

Added:
   modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/kbaseconfig.properties
   modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/kbuilderconfig.properties
Modified:
   modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/classes/seam-beans.xml
   modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/security-rules.drl
   modules/security/trunk/examples/seamspace/src/main/webapp/usermanager.xhtml
Log:
got security rules working, user manager view


Modified: modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/classes/seam-beans.xml
===================================================================
--- modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/classes/seam-beans.xml	2010-04-03 14:39:33 UTC (rev 12377)
+++ modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/classes/seam-beans.xml	2010-04-03 14:41:03 UTC (rev 12378)
@@ -7,7 +7,6 @@
        xmlns:permission="urn:java:org.jboss.seam.security.permission"
        xmlns:drools="urn:java:org.jboss.seam.drools"
        xmlns:seamspace="urn:java:org.jboss.seam.security.examples.seamspace"
-       xmlns:drools="urn:java:org.jboss.seam.drools"
        xmlns:drools-config="urn:java:org.jboss.seam.drools.config"
        xmlns:drools-qualifier="urn:java:org.jboss.seam.drools.qualifier"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
@@ -36,7 +35,7 @@
    
    <drools-config:KnowledgeBaseConfig>
    		<s:overrides/>
-   		<drools-qualifier:KBaseConfig name="security-rules-config"/>
+   		<drools-qualifier:KBaseConfig value="security-rules-config"/>
    		<drools-config:knowledgeBuilderConfig>kbuilderconfig.properties</drools-config:knowledgeBuilderConfig>
    		<drools-config:knowledgeBaseConfig>kbaseconfig.properties</drools-config:knowledgeBaseConfig>
    		<drools-config:ruleResources>
@@ -48,19 +47,23 @@
    </drools-config:KnowledgeBaseConfig>
    
    <drools:KnowledgeBaseProducer>
-   		 <s:specializes/>
-   		 <drools:produceKBase>
-   		 	<drools-qualifier:KBase name="permission-rules"/>
-   		 	<s:Inject/>
-   		 	<drools-qualifier:KBaseConfig name="security-rules-config"/>
-   		 </drools:produceKBase>
+   		<s:specializes/>
+   		<drools:produceKBase>
+   		   <drools-qualifier:KBase value="permission-rules"/>
+   		 	 <s:parameters>
+   		 	    <drools-config:KnowledgeBaseConfig>
+   		 	       <s:Inject/>
+   		 	       <drools-qualifier:KBaseConfig value="security-rules-config"/>
+   		 	    </drools-config:KnowledgeBaseConfig>
+   		 	 </s:parameters>
+      </drools:produceKBase>
    </drools:KnowledgeBaseProducer>
    
    <permission:RuleBasedPermissionResolver>
       <s:specializes/>
       <permission:securityRules>
+        <drools-qualifier:KBase value="permission-rules"/>
         <s:Inject/>
-        <drools-qualifier:KBase name="permission-rules"/>        
       </permission:securityRules>
    </permission:RuleBasedPermissionResolver>
        

Added: modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/kbaseconfig.properties
===================================================================

Added: modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/kbuilderconfig.properties
===================================================================

Modified: modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/security-rules.drl
===================================================================
--- modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/security-rules.drl	2010-04-03 14:39:33 UTC (rev 12377)
+++ modules/security/trunk/examples/seamspace/src/main/webapp/WEB-INF/security-rules.drl	2010-04-03 14:41:03 UTC (rev 12378)
@@ -8,12 +8,12 @@
 import org.jboss.seam.security.permission.RoleCheck;
 import org.jboss.seam.security.Role;
 
-import org.jboss.seam.example.seamspace.BlogComment;
-import org.jboss.seam.example.seamspace.Member;
-import org.jboss.seam.example.seamspace.MemberAccount;
-import org.jboss.seam.example.seamspace.MemberBlog;
-import org.jboss.seam.example.seamspace.MemberFriend;
-import org.jboss.seam.example.seamspace.MemberImage;
+import org.jboss.seam.security.examples.seamspace.model.BlogComment;
+import org.jboss.seam.security.examples.seamspace.model.Member;
+import org.jboss.seam.security.examples.seamspace.model.MemberAccount;
+import org.jboss.seam.security.examples.seamspace.model.MemberBlog;
+import org.jboss.seam.security.examples.seamspace.model.MemberFriend;
+import org.jboss.seam.security.examples.seamspace.model.MemberImage;
 
 # These rules allow members to manage permissions on their own images
 

Modified: modules/security/trunk/examples/seamspace/src/main/webapp/usermanager.xhtml
===================================================================
--- modules/security/trunk/examples/seamspace/src/main/webapp/usermanager.xhtml	2010-04-03 14:39:33 UTC (rev 12377)
+++ modules/security/trunk/examples/seamspace/src/main/webapp/usermanager.xhtml	2010-04-03 14:41:03 UTC (rev 12378)
@@ -11,6 +11,8 @@
     </ui:define>  
    
     <ui:define name="content">
+    
+      <f:event type="preRenderView" listener="#{userSearch.loadUsers}"/>
         
       <script type="text/javascript">
         function confirmDelete() {
@@ -26,7 +28,7 @@
   	    
         <h:dataTable 
             id="threads"
-            value="#{users}" 
+            value="#{userSearch.users}" 
             var="user" 
             styleClass="security"
             cellspacing="0"



More information about the seam-commits mailing list