1 |
5082
|
daigle
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Michael Daigle
|
5 |
|
|
* Copyright: 2009 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
|
|
* '$Author: leinfelder $'
|
10 |
|
|
* '$Date: 2009-04-02 14:20:05 -0800 (Thu, 02 Apr 2009) $'
|
11 |
|
|
* '$Revision: 4893 $'
|
12 |
|
|
*
|
13 |
|
|
* This program is free software; you can redistribute it and/or modify
|
14 |
|
|
* it under the terms of the GNU General Public License as published by
|
15 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
16 |
|
|
* (at your option) any later version.
|
17 |
|
|
*
|
18 |
|
|
* This program is distributed in the hope that it will be useful,
|
19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
|
|
* GNU General Public License for more details.
|
22 |
|
|
*
|
23 |
|
|
* You should have received a copy of the GNU General Public License
|
24 |
|
|
* along with this program; if not, write to the Free Software
|
25 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
|
|
*
|
27 |
|
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28 |
|
|
* convert an XML file showing the resultset of a query
|
29 |
|
|
* into an HTML format suitable for rendering with modern web browsers.
|
30 |
|
|
-->
|
31 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
32 |
|
|
|
33 |
|
|
<xsl:output method="html" />
|
34 |
|
|
<xsl:param name="sessid" />
|
35 |
|
|
<xsl:param name="qformat">default</xsl:param>
|
36 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
37 |
|
|
<xsl:param name="contextURL" />
|
38 |
|
|
<xsl:param name="servletURL" />
|
39 |
|
|
<xsl:param name="workflowname" />
|
40 |
|
|
<xsl:param name="docid" />
|
41 |
|
|
|
42 |
|
|
<xsl:template match="/">
|
43 |
|
|
|
44 |
|
|
<div class="content-subsection">
|
45 |
|
|
<div class="content-subsection-header-emphasis">Access Rules</div>
|
46 |
|
|
<div class="change-access-row">
|
47 |
|
|
<div class="col_label access_order_col">Access Order</div>
|
48 |
|
|
<div class="col_label access_type_col">Access Type</div>
|
49 |
|
|
<div class="col_label principal_col">Principal</div>
|
50 |
|
|
<div class="col_label permissions_col">Permission</div>
|
51 |
|
|
</div>
|
52 |
|
|
<xsl:choose>
|
53 |
|
|
<xsl:when test="acl/resource/@order = 'allowFirst'">
|
54 |
|
|
<xsl:for-each select="acl/resource/allow/principal">
|
55 |
|
|
<div class="access_info_text access_order_col">allowFirst</div>
|
56 |
|
|
<div class="access_info_text access_type_col">allow </div>
|
57 |
|
|
<div class="access_info_text principal_col">
|
58 |
|
|
<xsl:value-of select="."/>
|
59 |
|
|
</div>
|
60 |
|
|
<div class="permissions_col">
|
61 |
|
|
<xsl:for-each select="../permission">
|
62 |
|
|
<div class="permission_element"><xsl:value-of select="."/></div>
|
63 |
|
|
</xsl:for-each>
|
64 |
|
|
</div><br/>
|
65 |
|
|
</xsl:for-each>
|
66 |
|
|
<xsl:for-each select="acl/resource/deny/principal">
|
67 |
|
|
<div class="access_info_text access_order_col">allowFirst</div>
|
68 |
|
|
<div class="access_info_text access_type_col">deny </div>
|
69 |
|
|
<div class="access_info_text principal_col">
|
70 |
|
|
<xsl:value-of select="."/>
|
71 |
|
|
</div>
|
72 |
|
|
<div class="permissions_col">
|
73 |
|
|
<xsl:for-each select="../permission">
|
74 |
|
|
<div class="permission_element"><xsl:value-of select="."/></div>
|
75 |
|
|
</xsl:for-each>
|
76 |
|
|
</div>
|
77 |
|
|
</xsl:for-each>
|
78 |
|
|
</xsl:when>
|
79 |
|
|
|
80 |
|
|
<xsl:when test="count(acl/resource/@order[denyFirst]) > 0">
|
81 |
|
|
<xsl:for-each select="acl/resource/allow/principal">
|
82 |
|
|
<div class="access_info_text access_order_col">denyFirst</div>
|
83 |
|
|
<div class="access_info_text access_type_col">allow </div>
|
84 |
|
|
<div class="access_info_text principal_col">
|
85 |
|
|
<xsl:value-of select="."/>
|
86 |
|
|
</div>
|
87 |
|
|
<div class="permissions_col">
|
88 |
|
|
<xsl:for-each select="../permission">
|
89 |
|
|
<div class="permission_element"><xsl:value-of select="."/></div>
|
90 |
|
|
</xsl:for-each>
|
91 |
|
|
</div>
|
92 |
|
|
</xsl:for-each>
|
93 |
|
|
<xsl:for-each select="acl/resource/deny/principal">
|
94 |
|
|
<div class="access_info_text access_order_col">denyFirst</div>
|
95 |
|
|
<div class="access_info_text access_type_col">deny </div>
|
96 |
|
|
<div class="access_info_text principal_col">
|
97 |
|
|
<xsl:value-of select="."/>
|
98 |
|
|
</div>
|
99 |
|
|
<div class="permissions_col">
|
100 |
|
|
<xsl:for-each select="../permission">
|
101 |
|
|
<div class="permission_element"><xsl:value-of select="."/></div>
|
102 |
|
|
</xsl:for-each>
|
103 |
|
|
</div>
|
104 |
|
|
</xsl:for-each>
|
105 |
|
|
</xsl:when>
|
106 |
|
|
</xsl:choose>
|
107 |
|
|
</div><br/>
|
108 |
|
|
<div class="content-subsection">
|
109 |
|
|
<div class="content-subsection-header-emphasis">Add Access Rule</div>
|
110 |
|
|
<div class="change-access-row">
|
111 |
|
|
<div class="col_label access_order_col">Access Order</div>
|
112 |
|
|
<div class="col_label access_type_col">Access Type</div>
|
113 |
|
|
<div class="col_label principal_col">Principal</div>
|
114 |
|
|
<div class="col_label permissions_col">Permission</div>
|
115 |
|
|
</div>
|
116 |
|
|
|
117 |
|
|
<div class="change-access-row">
|
118 |
|
|
<form name="addAccess" action="{$servletURL}" id="addAccess" onsubmit="setPermission(this)">
|
119 |
|
|
<input name="action" value="setaccess" type="hidden" />
|
120 |
|
|
<input name="qformat" value="sanparks" type="hidden" />
|
121 |
|
|
<input name="forwardto" value="changeAccess.jsp" type="hidden" />
|
122 |
|
|
<input name="permission" id="permission" type="hidden" />
|
123 |
|
|
<input name="docid" value="{$docid}" type="hidden" />
|
124 |
|
|
<input name="workflowid" value="{$docid}" type="hidden" />
|
125 |
|
|
<input name="workflowname" value="{$workflowname}" type="hidden" />
|
126 |
|
|
|
127 |
|
|
<select class="access_order_col" name="permOrder" id="permOrder">
|
128 |
|
|
<option value="allowFirst">Allow First</option>
|
129 |
|
|
<option value="denyFirst">Deny First</option>
|
130 |
|
|
</select>
|
131 |
|
|
<select class="access_type_col" name="permType" id="permType">
|
132 |
|
|
<option value="allow">Allow</option>
|
133 |
|
|
<option value="deny">Deny</option>
|
134 |
|
|
</select>
|
135 |
|
|
<input class="principal_col" name="principal" id="principal" type="text" />
|
136 |
|
|
<div class="permissions_col">
|
137 |
|
|
<input type="checkbox" name="permission_read_checkbox" id="permission_read_checkbox">Read</input>
|
138 |
|
|
<input type="checkbox" name="permission_write_checkbox" id="permission_write_checkbox">Write</input>
|
139 |
|
|
<input type="checkbox" name="permission_chmod_checkbox" id="permission_chmod_checkbox">Chmod</input>
|
140 |
|
|
<input type="checkbox" name="permission_all_checkbox" id="permission_all_checkbox">All</input>
|
141 |
|
|
</div>
|
142 |
|
|
|
143 |
|
|
<br/>
|
144 |
|
|
<input class="access-submit-button" value="Add" type="submit"/>
|
145 |
|
|
|
146 |
|
|
</form>
|
147 |
|
|
</div>
|
148 |
|
|
</div>
|
149 |
|
|
|
150 |
|
|
</xsl:template>
|
151 |
|
|
|
152 |
|
|
</xsl:stylesheet>
|