| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <document xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" |
| xmlns:xi="http://www.w3.org/2001/XInclude"> |
| <header> |
| <title>Jakarta Slide example</title> |
| <tab title="users" href="viewusers.do"/> |
| <tab title="content" href="viewcontent.do?path=${source.path}"/> |
| <tab title="properties" href="viewproperties.do?path=${source.path}"/> |
| <tab title="permissions" href="viewpermissions.do?path=${source.path}"/> |
| <tab title="locks" href="viewlocks.do?path=${source.path}"/> |
| <tab title="logout" href="logout.do"/> |
| </header> |
| <body> |
| <row> |
| <column title="Navigation"> |
| <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2" width="100%" align="center"> |
| <jx:forEach var="source" items="${source.children}"> |
| <tr> |
| <td width="100%" align="left"> |
| <a href="viewpermissions.do?path=${source.path}"> |
| ${source.name} |
| </a> |
| </td> |
| </tr> |
| </jx:forEach> |
| <jx:if test="${source.parent}"> |
| <tr> |
| <td width="100%" align="left"> |
| <br/> |
| <a href="viewpermissions.do?path=${source.parent.path}"> |
| .. |
| </a> |
| </td> |
| </tr> |
| </jx:if> |
| </table> |
| </column> |
| <column title="Permissions"> |
| <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2" width="100%" align="center"> |
| <tr> |
| <td align="left"> |
| <b>Principal</b> |
| </td> |
| <td align="left"> |
| <b>Privilege</b> |
| </td> |
| <td align="left"> |
| <b>Inheritable</b> |
| </td> |
| <td align="left"> |
| <b>Deny</b> |
| </td> |
| <td align="right"/> |
| </tr> |
| <jx:forEach var="permission" items="${permissions}"> |
| <tr> |
| <td align="left"> |
| ${permission.subjectUri} |
| </td> |
| <td align="left"> |
| ${permission.actionUri} |
| </td> |
| <td align="left"> |
| ${permission.inheritable} |
| </td> |
| <td align="left"> |
| ${permission.negative} |
| </td> |
| <td align="right"> |
| <form action="removePermission.do" method="post"> |
| <input type="hidden" name="resourcePath" value="${source.path}"/> |
| <input type="hidden" name="subject" value="${permission.subjectUri}"/> |
| <input type="hidden" name="action" value="${permission.actionUri}"/> |
| <input type="hidden" name="inheritable" value="${permission.inheritable}"/> |
| <input type="hidden" name="negative" value="${permission.negative}"/> |
| <input type="submit" name="doRemovePermission" value="Delete"/> |
| </form> |
| </td> |
| </tr> |
| </jx:forEach> |
| <tr> |
| <form action="addPermission.do" method="post"> |
| <input type="hidden" name="resourcePath" value="${source.path}"/> |
| <td align="left"> |
| <select name="subject"> |
| <option>self</option> |
| <option>owner</option> |
| <option>authenticated</option> |
| <option>unauthenticated</option> |
| <option>all</option> |
| <jx:forEach var="role" items="${roles}"> |
| <option value="${role.uri}"> |
| role: ${role.uri} |
| </option> |
| </jx:forEach> |
| <jx:forEach var="user" items="${users}"> |
| <option value="${user}"> |
| user: ${user} |
| </option> |
| </jx:forEach> |
| </select> |
| </td> |
| <td align="left"> |
| <select name="action"> |
| <option>all</option> |
| <option>default</option> |
| <jx:forEach var="privilege" items="${privileges}"> |
| <option value="${privilege}"> |
| ${privilege} |
| </option> |
| </jx:forEach> |
| </select> |
| </td> |
| <td align="left"> |
| <select name="inheritable"> |
| <option>false</option> |
| <option>true</option> |
| </select> |
| </td> |
| <td align="left"> |
| <select name="negative"> |
| <option>false</option> |
| <option>true</option> |
| </select> |
| </td> |
| <td align="right"> |
| <input type="submit" name="doAddPermission" value="Add/Modify"/> |
| </td> |
| </form> |
| </tr> |
| </table> |
| </column> |
| </row> |
| </body> |
| </document> |