lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject cvs commit: cocoon-lenya/src/webapp/lenya/content/info info.xsp
Date Thu, 07 Aug 2003 10:23:55 GMT
andreas     2003/08/07 03:23:55

  Modified:    src/webapp/lenya/xslt/info info.xsl
               src/webapp/lenya/content/info info.xsp
  Log:
  added SSL protection handling
  
  Revision  Changes    Path
  1.13      +16 -2     cocoon-lenya/src/webapp/lenya/xslt/info/info.xsl
  
  Index: info.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/info/info.xsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- info.xsl	4 Aug 2003 14:52:55 -0000	1.12
  +++ info.xsl	7 Aug 2003 10:23:54 -0000	1.13
  @@ -175,7 +175,21 @@
   <xsl:template match="lenya-info:permissions">
   
     <tr>
  -    <td><input type="checkbox" name="ssl"/> SSL Encryption</td>
  +    <td>
  +    	<form method="get" name="form_ssl_{@area}">
  +				<input type="hidden" name="lenya.usecase" value="info"/>
  +				<input type="hidden" name="lenya.step" value="showscreen"/>
  +				<input type="hidden" name="area" value="{@area}"/>
  +				<input type="hidden" name="change_ssl" value="true"/>
  +        <input type="checkbox" name="ssl"
  +        	onclick="document.forms.form_ssl_{@area}.submit()" value="true">
  +       		<xsl:if test="@ssl = 'true'">
  +	        	<xsl:attribute name="checked">checked</xsl:attribute>
  +       		</xsl:if>
  +        	SSL Encryption
  +        </input>
  +    	</form>
  +    </td>
   	</tr>
   	<tr>
   	<td>
  
  
  
  1.17      +27 -4     cocoon-lenya/src/webapp/lenya/content/info/info.xsp
  
  Index: info.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/content/info/info.xsp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- info.xsp	30 Jul 2003 15:03:25 -0000	1.16
  +++ info.xsp	7 Aug 2003 10:23:55 -0000	1.17
  @@ -151,7 +151,10 @@
   							RoleManager roleManager = (RoleManager)
   									<input:get-attribute module="access-control" name="role-manager" as="object"/>;
   							Role role = roleManager.getRole(roleId);
  -							PolicyHelper.manipulateCredential(objectModel, item, role, area, operations[j],
this.manager);
  +							PolicyHelper helper = new PolicyHelper();
  +							helper.setup(objectModel, this.manager, area);
  +							helper.manipulateCredential(item, role, operations[j]);
  +							helper.tearDown();
   					}
         }
         
  @@ -161,12 +164,30 @@
         
         String[] areas = { "authoring", "live" };
         for (int i = 0; i &lt; areas.length; i++) {
  +      
  +				PolicyHelper helper = new PolicyHelper();
  +				helper.setup(objectModel, this.manager, areas[i]);
  +				
  +				if (request.getParameter("change_ssl") != null &amp;&amp;
  +				    request.getParameter("area").equals(areas[i])) {
  +				    
  +						if (request.getParameter("ssl") != null) {
  +								helper.setUrlSSLProtected(true);
  +						}
  +						else {
  +								helper.setUrlSSLProtected(false);
  +						}
  +				}
  +					
           <li:permissions>
             <xsp:attribute name="area"><xsp:expr>areas[i]</xsp:expr></xsp:attribute>
             
  +          <xsp:attribute name="ssl"><xsp:expr>helper.isUrlSSLProtected()</xsp:expr></xsp:attribute>
  +          <xsp:attribute name="ancestor-ssl"><xsp:expr>helper.isAncestorSSLProtected()</xsp:expr></xsp:attribute>
  +          
             <xsp:logic>
             	
  -          CredentialWrapper[] credentials = PolicyHelper.getURICredentials(objectModel,
areas[i], manager);
  +          CredentialWrapper[] credentials = helper.getURICredentials();
             for (int j = 0; j &lt; credentials.length; j++) {
                 <li:credential type="uri">
   								<xsp:attribute name="accreditable-type"><xsp:expr>credentials[j].getType()</xsp:expr></xsp:attribute>
  @@ -177,7 +198,7 @@
                 </li:credential>
             }
             	
  -          credentials = PolicyHelper.getParentCredentials(objectModel, areas[i], manager);
  +          credentials = helper.getParentCredentials();
             for (int j = 0; j &lt; credentials.length; j++) {
                 <li:credential type="parent">
   								<xsp:attribute name="accreditable-type"><xsp:expr>credentials[j].getType()</xsp:expr></xsp:attribute>
  @@ -187,10 +208,12 @@
   								<xsp:attribute name="role-name"><xsp:expr>credentials[j].getRoleName()</xsp:expr></xsp:attribute>
                 </li:credential>
             }
  -          	
  +          
             </xsp:logic>	
             
           </li:permissions>
  +        
  +        helper.tearDown();
         }
       </xsp:logic>
      
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message