1969 |
10 Feb 06 |
nicklas |
1 |
<%-- $Id$ |
1969 |
10 Feb 06 |
nicklas |
2 |
------------------------------------------------------------------ |
5425 |
23 Sep 10 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg, Martin Svensson |
3675 |
16 Aug 07 |
jari |
Copyright (C) 2007 Martin Svensson |
1969 |
10 Feb 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
6 |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
7 |
Available at http://base.thep.lu.se/ |
1969 |
10 Feb 06 |
nicklas |
8 |
|
1969 |
10 Feb 06 |
nicklas |
9 |
BASE is free software; you can redistribute it and/or |
1969 |
10 Feb 06 |
nicklas |
10 |
modify it under the terms of the GNU General Public License |
4476 |
05 Sep 08 |
jari |
11 |
as published by the Free Software Foundation; either version 3 |
1969 |
10 Feb 06 |
nicklas |
12 |
of the License, or (at your option) any later version. |
1969 |
10 Feb 06 |
nicklas |
13 |
|
1969 |
10 Feb 06 |
nicklas |
14 |
BASE is distributed in the hope that it will be useful, |
1969 |
10 Feb 06 |
nicklas |
15 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
1969 |
10 Feb 06 |
nicklas |
16 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1969 |
10 Feb 06 |
nicklas |
17 |
GNU General Public License for more details. |
1969 |
10 Feb 06 |
nicklas |
18 |
|
1969 |
10 Feb 06 |
nicklas |
19 |
You should have received a copy of the GNU General Public License |
4510 |
11 Sep 08 |
jari |
20 |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
1969 |
10 Feb 06 |
nicklas |
21 |
------------------------------------------------------------------ |
1969 |
10 Feb 06 |
nicklas |
22 |
|
1969 |
10 Feb 06 |
nicklas |
23 |
@author Nicklas |
1969 |
10 Feb 06 |
nicklas |
24 |
@version 2.0 |
1969 |
10 Feb 06 |
nicklas |
25 |
--%> |
5426 |
24 Sep 10 |
nicklas |
26 |
<%@ page pageEncoding="UTF-8" session="false" |
1969 |
10 Feb 06 |
nicklas |
27 |
import="net.sf.basedb.core.SessionControl" |
1969 |
10 Feb 06 |
nicklas |
28 |
import="net.sf.basedb.core.DbControl" |
1969 |
10 Feb 06 |
nicklas |
29 |
import="net.sf.basedb.core.SystemItems" |
1969 |
10 Feb 06 |
nicklas |
30 |
import="net.sf.basedb.core.Item" |
1969 |
10 Feb 06 |
nicklas |
31 |
import="net.sf.basedb.core.ItemContext" |
1969 |
10 Feb 06 |
nicklas |
32 |
import="net.sf.basedb.core.Permission" |
1969 |
10 Feb 06 |
nicklas |
33 |
import="net.sf.basedb.core.Group" |
1969 |
10 Feb 06 |
nicklas |
34 |
import="net.sf.basedb.core.Quota" |
1969 |
10 Feb 06 |
nicklas |
35 |
import="net.sf.basedb.core.User" |
1969 |
10 Feb 06 |
nicklas |
36 |
import="net.sf.basedb.core.Role" |
1969 |
10 Feb 06 |
nicklas |
37 |
import="net.sf.basedb.core.Directory" |
3535 |
28 Jun 07 |
martin |
38 |
import="net.sf.basedb.core.ExtendedProperties" |
3535 |
28 Jun 07 |
martin |
39 |
import="net.sf.basedb.core.ExtendedProperty" |
1969 |
10 Feb 06 |
nicklas |
40 |
import="net.sf.basedb.core.PermissionDeniedException" |
1969 |
10 Feb 06 |
nicklas |
41 |
import="net.sf.basedb.core.PluginDefinition" |
1969 |
10 Feb 06 |
nicklas |
42 |
import="net.sf.basedb.core.ItemQuery" |
1969 |
10 Feb 06 |
nicklas |
43 |
import="net.sf.basedb.core.ItemResultList" |
1969 |
10 Feb 06 |
nicklas |
44 |
import="net.sf.basedb.core.Include" |
1969 |
10 Feb 06 |
nicklas |
45 |
import="net.sf.basedb.core.query.Orders" |
1969 |
10 Feb 06 |
nicklas |
46 |
import="net.sf.basedb.core.query.Hql" |
1969 |
10 Feb 06 |
nicklas |
47 |
import="net.sf.basedb.core.plugin.GuiContext" |
1969 |
10 Feb 06 |
nicklas |
48 |
import="net.sf.basedb.core.plugin.Plugin" |
1969 |
10 Feb 06 |
nicklas |
49 |
import="net.sf.basedb.clients.web.Base" |
2386 |
15 Jun 06 |
martin |
50 |
import="net.sf.basedb.clients.web.PermissionUtil" |
1969 |
10 Feb 06 |
nicklas |
51 |
import="net.sf.basedb.clients.web.util.HTML" |
7404 |
04 Oct 17 |
nicklas |
52 |
import="net.sf.basedb.util.EmailUtil" |
2753 |
20 Oct 06 |
nicklas |
53 |
import="net.sf.basedb.util.Values" |
2942 |
22 Nov 06 |
nicklas |
54 |
import="net.sf.basedb.util.formatter.Formatter" |
2942 |
22 Nov 06 |
nicklas |
55 |
import="net.sf.basedb.clients.web.formatter.FormatterFactory" |
4886 |
03 Apr 09 |
nicklas |
56 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4886 |
03 Apr 09 |
nicklas |
57 |
import="net.sf.basedb.clients.web.extensions.JspContext" |
4886 |
03 Apr 09 |
nicklas |
58 |
import="net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer" |
7604 |
25 Feb 19 |
nicklas |
59 |
import="net.sf.basedb.clients.web.extensions.toolbar.ButtonAction" |
4886 |
03 Apr 09 |
nicklas |
60 |
import="net.sf.basedb.clients.web.extensions.toolbar.ToolbarUtil" |
4886 |
03 Apr 09 |
nicklas |
61 |
import="net.sf.basedb.util.extensions.ExtensionsInvoker" |
1969 |
10 Feb 06 |
nicklas |
62 |
import="java.util.Map" |
2942 |
22 Nov 06 |
nicklas |
63 |
import="java.util.Date" |
3535 |
28 Jun 07 |
martin |
64 |
import="java.util.List" |
1969 |
10 Feb 06 |
nicklas |
65 |
%> |
1969 |
10 Feb 06 |
nicklas |
66 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
1969 |
10 Feb 06 |
nicklas |
67 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
1969 |
10 Feb 06 |
nicklas |
68 |
<%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
1969 |
10 Feb 06 |
nicklas |
69 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4886 |
03 Apr 09 |
nicklas |
70 |
<%@ taglib prefix="ext" uri="/WEB-INF/extensions.tld" %> |
1969 |
10 Feb 06 |
nicklas |
71 |
<%! |
1969 |
10 Feb 06 |
nicklas |
72 |
private static final Item itemType = Item.USER; |
1969 |
10 Feb 06 |
nicklas |
73 |
private static final GuiContext guiContext = new GuiContext(itemType, GuiContext.Type.ITEM); |
1969 |
10 Feb 06 |
nicklas |
74 |
%> |
1969 |
10 Feb 06 |
nicklas |
75 |
<% |
1969 |
10 Feb 06 |
nicklas |
76 |
final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
1969 |
10 Feb 06 |
nicklas |
77 |
final String ID = sc.getId(); |
1969 |
10 Feb 06 |
nicklas |
78 |
final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
1969 |
10 Feb 06 |
nicklas |
79 |
final int itemId = cc.getId(); |
1969 |
10 Feb 06 |
nicklas |
80 |
final float scale = Base.getScale(sc); |
7954 |
12 May 21 |
nicklas |
81 |
final DbControl dc = sc.newDbControl(":View "+itemType); |
1969 |
10 Feb 06 |
nicklas |
82 |
try |
1969 |
10 Feb 06 |
nicklas |
83 |
{ |
2942 |
22 Nov 06 |
nicklas |
84 |
Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); |
1969 |
10 Feb 06 |
nicklas |
85 |
Map<Plugin.MainType, Integer> pluginCount = PluginDefinition.countPlugins(dc, guiContext); |
1969 |
10 Feb 06 |
nicklas |
86 |
|
1969 |
10 Feb 06 |
nicklas |
87 |
String title = null; |
1969 |
10 Feb 06 |
nicklas |
88 |
User user = User.getById(dc, itemId); |
2434 |
27 Jun 06 |
nicklas |
89 |
|
6174 |
17 Oct 12 |
nicklas |
90 |
final boolean createPermission = sc.hasPermission(Permission.CREATE, itemType); |
1969 |
10 Feb 06 |
nicklas |
91 |
final boolean writePermission = user.hasPermission(Permission.WRITE); |
1969 |
10 Feb 06 |
nicklas |
92 |
final boolean deletePermission = user.hasPermission(Permission.DELETE); |
4003 |
26 Nov 07 |
nicklas |
93 |
final boolean isRemoved = user.isRemoved(); |
4003 |
26 Nov 07 |
nicklas |
94 |
final boolean isUsed = isRemoved && user.isUsed(); |
4003 |
26 Nov 07 |
nicklas |
95 |
final boolean deletePermanentlyPermission = deletePermission && !isUsed; |
4886 |
03 Apr 09 |
nicklas |
96 |
JspContext jspContext = ExtensionsControl.createContext(dc, pageContext, guiContext, user); |
7604 |
25 Feb 19 |
nicklas |
97 |
ExtensionsInvoker<ButtonAction> invoker = ToolbarUtil.useExtensions(jspContext); |
1969 |
10 Feb 06 |
nicklas |
98 |
%> |
6223 |
15 Jan 13 |
nicklas |
99 |
<base:page title="<%=title%>" id="view-page"> |
6322 |
11 Sep 13 |
nicklas |
100 |
<base:head scripts="table.js,tabcontrol-2.js,~users.js" styles="toolbar.css,table.css,headertabcontrol.css,path.css"> |
4886 |
03 Apr 09 |
nicklas |
101 |
<ext:scripts context="<%=jspContext%>" /> |
4886 |
03 Apr 09 |
nicklas |
102 |
<ext:stylesheets context="<%=jspContext%>" /> |
1969 |
10 Feb 06 |
nicklas |
103 |
</base:head> |
1969 |
10 Feb 06 |
nicklas |
104 |
<base:body> |
5941 |
01 Feb 12 |
nicklas |
105 |
<p:path><p:pathelement |
5941 |
01 Feb 12 |
nicklas |
106 |
title="Users" href="<%="index.jsp?ID="+ID%>" |
5941 |
01 Feb 12 |
nicklas |
107 |
/><p:pathelement title="<%=HTML.encodeTags(user.getName())%>" |
5941 |
01 Feb 12 |
nicklas |
108 |
/></p:path> |
6223 |
15 Jan 13 |
nicklas |
109 |
|
6223 |
15 Jan 13 |
nicklas |
110 |
<div id="page-data" data-item-id="<%=itemId%>"></div> |
1969 |
10 Feb 06 |
nicklas |
111 |
|
5941 |
01 Feb 12 |
nicklas |
112 |
<t:tabcontrol |
5941 |
01 Feb 12 |
nicklas |
113 |
id="main" |
5941 |
01 Feb 12 |
nicklas |
114 |
subclass="content mastertabcontrol" |
5941 |
01 Feb 12 |
nicklas |
115 |
active="properties"> |
1969 |
10 Feb 06 |
nicklas |
116 |
<t:tab id="properties" title="Properties"> |
5941 |
01 Feb 12 |
nicklas |
117 |
<div> |
5941 |
01 Feb 12 |
nicklas |
118 |
<table class="fullform"> |
5941 |
01 Feb 12 |
nicklas |
119 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
120 |
<th class="itemstatus"> |
4003 |
26 Nov 07 |
nicklas |
121 |
<base:icon |
6223 |
15 Jan 13 |
nicklas |
122 |
id="btnDeletePermanently" |
5946 |
03 Feb 12 |
nicklas |
123 |
image="deleted.png" |
5941 |
01 Feb 12 |
nicklas |
124 |
tooltip="This item has been flagged for deletion. Click to delete it now." |
5941 |
01 Feb 12 |
nicklas |
125 |
enabled="<%=deletePermanentlyPermission %>" |
5941 |
01 Feb 12 |
nicklas |
126 |
visible="<%=isRemoved%>" |
5941 |
01 Feb 12 |
nicklas |
127 |
/> |
6223 |
15 Jan 13 |
nicklas |
128 |
<base:icon |
6223 |
15 Jan 13 |
nicklas |
129 |
id="btnUsingItems" |
6223 |
15 Jan 13 |
nicklas |
130 |
image="used.png" |
5941 |
01 Feb 12 |
nicklas |
131 |
tooltip="This item is used by other items and can't be permanently deleted. Show the items that are using this one" |
5941 |
01 Feb 12 |
nicklas |
132 |
visible="<%=isRemoved && isUsed%>" /> |
5941 |
01 Feb 12 |
nicklas |
133 |
</th> |
5941 |
01 Feb 12 |
nicklas |
134 |
<td style="padding: 0px;"> |
6605 |
18 Nov 14 |
nicklas |
135 |
<tbl:toolbar subclass="bottomborder bg-filled-50"> |
5941 |
01 Feb 12 |
nicklas |
136 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
137 |
id="btnEdit" |
5942 |
01 Feb 12 |
nicklas |
138 |
disabled="<%=!writePermission%>" |
5945 |
02 Feb 12 |
nicklas |
139 |
image="edit.png" |
5941 |
01 Feb 12 |
nicklas |
140 |
title="Edit…" |
5941 |
01 Feb 12 |
nicklas |
141 |
tooltip="<%=writePermission ? "Edit this user" : "You do not have permission to edit this user"%>" |
5941 |
01 Feb 12 |
nicklas |
142 |
/> |
5941 |
01 Feb 12 |
nicklas |
143 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
144 |
id="btnDelete" |
5942 |
01 Feb 12 |
nicklas |
145 |
disabled="<%=!deletePermission%>" |
5946 |
03 Feb 12 |
nicklas |
146 |
image="delete.png" |
5941 |
01 Feb 12 |
nicklas |
147 |
title="Delete" |
5941 |
01 Feb 12 |
nicklas |
148 |
visible="<%=!user.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
149 |
tooltip="<%=deletePermission ? "Delete this user" : "You do not have permission to delete this user"%>" |
5941 |
01 Feb 12 |
nicklas |
150 |
/> |
5941 |
01 Feb 12 |
nicklas |
151 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
152 |
id="btnRestore" |
5942 |
01 Feb 12 |
nicklas |
153 |
disabled="<%=!writePermission%>" |
5946 |
03 Feb 12 |
nicklas |
154 |
image="restore.png" |
5941 |
01 Feb 12 |
nicklas |
155 |
title="Restore" |
5941 |
01 Feb 12 |
nicklas |
156 |
visible="<%=user.isRemoved()%>" |
5941 |
01 Feb 12 |
nicklas |
157 |
tooltip="<%=writePermission ? "Restore this user" : "You do not have permission to restore this user"%>" |
5941 |
01 Feb 12 |
nicklas |
158 |
/> |
5941 |
01 Feb 12 |
nicklas |
159 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
160 |
id="btnClone" |
6174 |
17 Oct 12 |
nicklas |
161 |
disabled="<%=!createPermission %>" |
6174 |
17 Oct 12 |
nicklas |
162 |
image="copy.png" |
6174 |
17 Oct 12 |
nicklas |
163 |
title="Clone…" |
6174 |
17 Oct 12 |
nicklas |
164 |
tooltip="Create a new user using settings from this user as a template" |
6174 |
17 Oct 12 |
nicklas |
165 |
/> |
6174 |
17 Oct 12 |
nicklas |
166 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
167 |
id="btnImport" |
5946 |
03 Feb 12 |
nicklas |
168 |
image="import.png" |
6223 |
15 Jan 13 |
nicklas |
169 |
data-plugin-type="IMPORT" |
5941 |
01 Feb 12 |
nicklas |
170 |
title="Import…" |
5941 |
01 Feb 12 |
nicklas |
171 |
tooltip="Import data" |
5941 |
01 Feb 12 |
nicklas |
172 |
visible="<%=pluginCount.containsKey(Plugin.MainType.IMPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
173 |
/> |
5941 |
01 Feb 12 |
nicklas |
174 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
175 |
id="btnExport" |
6223 |
15 Jan 13 |
nicklas |
176 |
image="export.png" |
6223 |
15 Jan 13 |
nicklas |
177 |
data-plugin-type="EXPORT" |
5941 |
01 Feb 12 |
nicklas |
178 |
title="Export…" |
5941 |
01 Feb 12 |
nicklas |
179 |
tooltip="Export data" |
5941 |
01 Feb 12 |
nicklas |
180 |
visible="<%=pluginCount.containsKey(Plugin.MainType.EXPORT)%>" |
5941 |
01 Feb 12 |
nicklas |
181 |
/> |
5941 |
01 Feb 12 |
nicklas |
182 |
<tbl:button |
6223 |
15 Jan 13 |
nicklas |
183 |
id="btnRunPlugin" |
6223 |
15 Jan 13 |
nicklas |
184 |
image="runplugin.png" |
6223 |
15 Jan 13 |
nicklas |
185 |
data-plugin-type="OTHER" |
5941 |
01 Feb 12 |
nicklas |
186 |
title="Run plugin…" |
5941 |
01 Feb 12 |
nicklas |
187 |
tooltip="Run a plugin" |
5941 |
01 Feb 12 |
nicklas |
188 |
visible="<%=pluginCount.containsKey(Plugin.MainType.OTHER)%>" |
5941 |
01 Feb 12 |
nicklas |
189 |
/> |
5941 |
01 Feb 12 |
nicklas |
190 |
<ext:render extensions="<%=invoker%>" context="<%=jspContext%>" |
7604 |
25 Feb 19 |
nicklas |
191 |
wrapper="<%=new PrefixSuffixRenderer<ButtonAction>(jspContext, "<td>", "</td>") %>"/> |
5941 |
01 Feb 12 |
nicklas |
192 |
<tbl:button |
5941 |
01 Feb 12 |
nicklas |
193 |
image="help.png" |
6223 |
15 Jan 13 |
nicklas |
194 |
subclass="auto-init" |
6223 |
15 Jan 13 |
nicklas |
195 |
data-auto-init="help" |
6223 |
15 Jan 13 |
nicklas |
196 |
data-help-id="user.view.properties" |
5941 |
01 Feb 12 |
nicklas |
197 |
title="Help…" |
5941 |
01 Feb 12 |
nicklas |
198 |
tooltip="Get help about this page" |
5941 |
01 Feb 12 |
nicklas |
199 |
/> |
5941 |
01 Feb 12 |
nicklas |
200 |
</tbl:toolbar> |
5941 |
01 Feb 12 |
nicklas |
201 |
</td> |
5941 |
01 Feb 12 |
nicklas |
202 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
203 |
</table> |
5941 |
01 Feb 12 |
nicklas |
204 |
<table style="width: 100%; height: 22em;" class="bottomborder"> |
6147 |
21 Sep 12 |
nicklas |
205 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
206 |
<td style="width: 50%; height: 100%;"> |
5941 |
01 Feb 12 |
nicklas |
207 |
<table class="fullform" > |
5941 |
01 Feb 12 |
nicklas |
208 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
209 |
<th>Name</th> |
5941 |
01 Feb 12 |
nicklas |
210 |
<td><%=HTML.encodeTags(user.getName())%></td> |
5941 |
01 Feb 12 |
nicklas |
211 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
212 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
213 |
<th>Registered</th> |
5941 |
01 Feb 12 |
nicklas |
214 |
<td><%=dateFormatter.format(user.getEntryDate())%></td> |
5941 |
01 Feb 12 |
nicklas |
215 |
</tr> |
4698 |
10 Dec 08 |
nicklas |
216 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
217 |
<th>System ID</th> |
1969 |
10 Feb 06 |
nicklas |
218 |
<td><%=HTML.encodeTags(user.getSystemId())%></td> |
1969 |
10 Feb 06 |
nicklas |
219 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
220 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
221 |
<th>Login</th> |
1969 |
10 Feb 06 |
nicklas |
222 |
<td><%=HTML.encodeTags(user.getLogin())%></td> |
1969 |
10 Feb 06 |
nicklas |
223 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
224 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
225 |
<th>External ID</th> |
1969 |
10 Feb 06 |
nicklas |
226 |
<td><%=HTML.encodeTags(user.getExternalId())%></td> |
1969 |
10 Feb 06 |
nicklas |
227 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
228 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
229 |
<th>Home directory</th> |
2434 |
27 Jun 06 |
nicklas |
230 |
<td><base:propertyvalue item="<%=user%>" property="homeDirectory" /></td> |
1969 |
10 Feb 06 |
nicklas |
231 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
232 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
233 |
<th>Quota</th> |
2434 |
27 Jun 06 |
nicklas |
234 |
<td><base:propertyvalue item="<%=user%>" property="quota" /></td> |
1969 |
10 Feb 06 |
nicklas |
235 |
</tr> |
5905 |
12 Dec 11 |
nicklas |
236 |
<tr > |
5941 |
01 Feb 12 |
nicklas |
237 |
<th>Quota group</th> |
2434 |
27 Jun 06 |
nicklas |
238 |
<td><base:propertyvalue item="<%=user%>" property="quotaGroup" /></td> |
1969 |
10 Feb 06 |
nicklas |
239 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
240 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
241 |
<th>Expiration date</th> |
1969 |
10 Feb 06 |
nicklas |
242 |
<td><%=user.getExpirationDate() == null ? "<i>- never -</i>" : |
2942 |
22 Nov 06 |
nicklas |
243 |
dateFormatter.format(user.getExpirationDate())%></td> |
1969 |
10 Feb 06 |
nicklas |
244 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
245 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
246 |
<th>Multi-user account</th> |
1969 |
10 Feb 06 |
nicklas |
247 |
<td><%=user.isMultiuserAccount() ? "yes" : "no"%></td> |
1969 |
10 Feb 06 |
nicklas |
248 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
249 |
<tr> |
7410 |
09 Oct 17 |
nicklas |
250 |
<th>2-factor login</th> |
7404 |
04 Oct 17 |
nicklas |
251 |
<td><%=user.getUseDeviceVerification() ? "yes" : "no"%> |
7404 |
04 Oct 17 |
nicklas |
252 |
<% |
7404 |
04 Oct 17 |
nicklas |
253 |
if (!EmailUtil.isEnabled() && user.getUseDeviceVerification()) |
7404 |
04 Oct 17 |
nicklas |
254 |
{ |
7404 |
04 Oct 17 |
nicklas |
255 |
%> |
7404 |
04 Oct 17 |
nicklas |
256 |
(You need to configure an email server in <i>base.config</i> before you can use this feature.) |
7404 |
04 Oct 17 |
nicklas |
257 |
<% |
7404 |
04 Oct 17 |
nicklas |
258 |
} |
7404 |
04 Oct 17 |
nicklas |
259 |
%> |
7404 |
04 Oct 17 |
nicklas |
260 |
</td> |
7404 |
04 Oct 17 |
nicklas |
261 |
</tr> |
7404 |
04 Oct 17 |
nicklas |
262 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
263 |
<th>Disabled</th> |
1969 |
10 Feb 06 |
nicklas |
264 |
<td><%=user.isDisabled() ? "yes" : "no"%></td> |
1969 |
10 Feb 06 |
nicklas |
265 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
266 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
267 |
<th>Permissions</th> |
5941 |
01 Feb 12 |
nicklas |
268 |
<td><%=PermissionUtil.getFullPermissionNames(user)%></td> |
1969 |
10 Feb 06 |
nicklas |
269 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
270 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
271 |
<th>Description</th> |
5941 |
01 Feb 12 |
nicklas |
272 |
<td><%=HTML.niceFormat(user.getDescription())%></td> |
5941 |
01 Feb 12 |
nicklas |
273 |
</tr> |
1969 |
10 Feb 06 |
nicklas |
274 |
</table> |
5941 |
01 Feb 12 |
nicklas |
275 |
</td> |
5941 |
01 Feb 12 |
nicklas |
276 |
<td style="width: 50%; height: 100%;" class="leftborder"> |
5941 |
01 Feb 12 |
nicklas |
277 |
<table class="fullform"> |
5941 |
01 Feb 12 |
nicklas |
278 |
<tbody class="sectionheader"> |
5941 |
01 Feb 12 |
nicklas |
279 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
280 |
<th colspan="2">Contact information</th> |
5941 |
01 Feb 12 |
nicklas |
281 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
282 |
</tbody> |
5941 |
01 Feb 12 |
nicklas |
283 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
284 |
<th>Email</th> |
5941 |
01 Feb 12 |
nicklas |
285 |
<td><%=HTML.niceFormat(user.getEmail())%></td> |
5941 |
01 Feb 12 |
nicklas |
286 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
287 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
288 |
<th>Organisation</th> |
5941 |
01 Feb 12 |
nicklas |
289 |
<td><%=HTML.encodeTags(user.getOrganisation())%></td> |
5941 |
01 Feb 12 |
nicklas |
290 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
291 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
292 |
<th>Address</th> |
5941 |
01 Feb 12 |
nicklas |
293 |
<td><%=HTML.niceFormat(user.getAddress())%></td> |
5941 |
01 Feb 12 |
nicklas |
294 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
295 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
296 |
<th>Phone</th> |
5941 |
01 Feb 12 |
nicklas |
297 |
<td><%=HTML.encodeTags(user.getPhone())%></td> |
5941 |
01 Feb 12 |
nicklas |
298 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
299 |
<tr> |
5941 |
01 Feb 12 |
nicklas |
300 |
<th>Fax</th> |
5941 |
01 Feb 12 |
nicklas |
301 |
<td><%=HTML.encodeTags(user.getFax())%></td> |
5941 |
01 Feb 12 |
nicklas |
302 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
303 |
<tr class="dynamic"> |
5941 |
01 Feb 12 |
nicklas |
304 |
<th></th> |
5941 |
01 Feb 12 |
nicklas |
305 |
<td></td> |
5941 |
01 Feb 12 |
nicklas |
306 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
307 |
</table> |
5941 |
01 Feb 12 |
nicklas |
308 |
</td> |
5941 |
01 Feb 12 |
nicklas |
309 |
</tr> |
5941 |
01 Feb 12 |
nicklas |
310 |
</table> |
5941 |
01 Feb 12 |
nicklas |
311 |
</div> |
5941 |
01 Feb 12 |
nicklas |
312 |
|
5941 |
01 Feb 12 |
nicklas |
313 |
<% |
5941 |
01 Feb 12 |
nicklas |
314 |
List<ExtendedProperty> extendedProperties = ExtendedProperties.getProperties("UserData"); |
5941 |
01 Feb 12 |
nicklas |
315 |
if (extendedProperties != null) |
5941 |
01 Feb 12 |
nicklas |
316 |
{ |
5941 |
01 Feb 12 |
nicklas |
317 |
%> |
5941 |
01 Feb 12 |
nicklas |
318 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
319 |
id="extraInfo" |
5941 |
01 Feb 12 |
nicklas |
320 |
title="<%="Additional information (" + extendedProperties.size() + ")"%>" |
5941 |
01 Feb 12 |
nicklas |
321 |
> |
5941 |
01 Feb 12 |
nicklas |
322 |
<table class="fullform fullborder"> |
5941 |
01 Feb 12 |
nicklas |
323 |
<% |
5941 |
01 Feb 12 |
nicklas |
324 |
boolean needsTr = true; |
5941 |
01 Feb 12 |
nicklas |
325 |
for (ExtendedProperty ep : extendedProperties) |
5941 |
01 Feb 12 |
nicklas |
326 |
{ |
5941 |
01 Feb 12 |
nicklas |
327 |
String name = ep.getName(); |
7605 |
26 Feb 19 |
nicklas |
328 |
Formatter<Object> f = FormatterFactory.getExtendedPropertyFormatter(sc, ep); |
5941 |
01 Feb 12 |
nicklas |
329 |
String value = f.format(user.getExtended(name)); |
5941 |
01 Feb 12 |
nicklas |
330 |
%> |
5941 |
01 Feb 12 |
nicklas |
331 |
<%=needsTr ? "<tr><th>" : "<th class=\"leftborder\">" %> |
5941 |
01 Feb 12 |
nicklas |
332 |
<%=HTML.encodeTags(ep.getTitle())%></th> |
5941 |
01 Feb 12 |
nicklas |
333 |
<td><%=value%></td> |
5941 |
01 Feb 12 |
nicklas |
334 |
<%=needsTr ? "" : "</tr>"%> |
5941 |
01 Feb 12 |
nicklas |
335 |
<% |
5941 |
01 Feb 12 |
nicklas |
336 |
needsTr = !needsTr; |
5941 |
01 Feb 12 |
nicklas |
337 |
} |
5941 |
01 Feb 12 |
nicklas |
338 |
%> |
5941 |
01 Feb 12 |
nicklas |
339 |
<%=needsTr ? "" : "<th class=\"leftborder\"></th><td></td></tr>"%> |
5941 |
01 Feb 12 |
nicklas |
340 |
</table> |
5941 |
01 Feb 12 |
nicklas |
341 |
</base:section> |
3539 |
29 Jun 07 |
martin |
342 |
<% |
5941 |
01 Feb 12 |
nicklas |
343 |
} |
3539 |
29 Jun 07 |
martin |
344 |
|
1969 |
10 Feb 06 |
nicklas |
345 |
ItemQuery<Group> groupQuery = user.getGroups(); |
3890 |
30 Oct 07 |
nicklas |
346 |
groupQuery.include(Include.ALL); |
1969 |
10 Feb 06 |
nicklas |
347 |
groupQuery.order(Orders.asc(Hql.property("name"))); |
1969 |
10 Feb 06 |
nicklas |
348 |
ItemResultList<Group> groups = groupQuery.list(dc); |
1969 |
10 Feb 06 |
nicklas |
349 |
|
1969 |
10 Feb 06 |
nicklas |
350 |
ItemQuery<Role> roleQuery = user.getRoles(); |
3890 |
30 Oct 07 |
nicklas |
351 |
roleQuery.include(Include.ALL); |
1969 |
10 Feb 06 |
nicklas |
352 |
roleQuery.order(Orders.asc(Hql.property("name"))); |
1969 |
10 Feb 06 |
nicklas |
353 |
ItemResultList<Role> roles = roleQuery.list(dc); |
5941 |
01 Feb 12 |
nicklas |
354 |
int numMembership = groups.size() + roles.size(); |
5941 |
01 Feb 12 |
nicklas |
355 |
%> |
5941 |
01 Feb 12 |
nicklas |
356 |
<base:section |
5941 |
01 Feb 12 |
nicklas |
357 |
id="membership" |
5941 |
01 Feb 12 |
nicklas |
358 |
title="<%="Membership (" + numMembership + ")"%>" |
5941 |
01 Feb 12 |
nicklas |
359 |
context="<%=cc%>" |
5941 |
01 Feb 12 |
nicklas |
360 |
> |
1969 |
10 Feb 06 |
nicklas |
361 |
<% |
5941 |
01 Feb 12 |
nicklas |
362 |
if (numMembership == 0) |
5941 |
01 Feb 12 |
nicklas |
363 |
{ |
5941 |
01 Feb 12 |
nicklas |
364 |
%> |
5941 |
01 Feb 12 |
nicklas |
365 |
<div class="messagecontainer note"> |
5941 |
01 Feb 12 |
nicklas |
366 |
This user isn't member of any group or role (or, you don't have permission to view them). |
5941 |
01 Feb 12 |
nicklas |
367 |
</div> |
5941 |
01 Feb 12 |
nicklas |
368 |
<% |
5941 |
01 Feb 12 |
nicklas |
369 |
} |
5941 |
01 Feb 12 |
nicklas |
370 |
else |
5941 |
01 Feb 12 |
nicklas |
371 |
{ |
5941 |
01 Feb 12 |
nicklas |
372 |
%> |
5042 |
11 Aug 09 |
martin |
373 |
<tbl:table |
6147 |
21 Sep 12 |
nicklas |
374 |
id="tbl.membership" |
5042 |
11 Aug 09 |
martin |
375 |
columns="all" |
5042 |
11 Aug 09 |
martin |
376 |
> |
5042 |
11 Aug 09 |
martin |
377 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
378 |
id="name" |
5042 |
11 Aug 09 |
martin |
379 |
title="Name" |
5042 |
11 Aug 09 |
martin |
380 |
/> |
5042 |
11 Aug 09 |
martin |
381 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
382 |
id="type" |
5042 |
11 Aug 09 |
martin |
383 |
title="Type" |
5042 |
11 Aug 09 |
martin |
384 |
/> |
5042 |
11 Aug 09 |
martin |
385 |
<tbl:columndef |
5042 |
11 Aug 09 |
martin |
386 |
id="description" |
5042 |
11 Aug 09 |
martin |
387 |
title="Description" |
5042 |
11 Aug 09 |
martin |
388 |
/> |
5042 |
11 Aug 09 |
martin |
389 |
<tbl:data> |
5941 |
01 Feb 12 |
nicklas |
390 |
<tbl:headers> |
5941 |
01 Feb 12 |
nicklas |
391 |
<tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
392 |
<tbl:columnheaders /> |
5941 |
01 Feb 12 |
nicklas |
393 |
</tbl:headerrow> |
5941 |
01 Feb 12 |
nicklas |
394 |
</tbl:headers> |
5042 |
11 Aug 09 |
martin |
395 |
<tbl:rows> |
1969 |
10 Feb 06 |
nicklas |
396 |
<% |
5042 |
11 Aug 09 |
martin |
397 |
for (Group group : groups) |
5042 |
11 Aug 09 |
martin |
398 |
{ |
5042 |
11 Aug 09 |
martin |
399 |
%> |
5042 |
11 Aug 09 |
martin |
400 |
<tbl:row> |
5042 |
11 Aug 09 |
martin |
401 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
402 |
image="deleted.png" |
5042 |
11 Aug 09 |
martin |
403 |
tooltip="This item has been scheduled for deletion" |
5042 |
11 Aug 09 |
martin |
404 |
visible="<%=group.isRemoved()%>" |
5042 |
11 Aug 09 |
martin |
405 |
/><%=Base.getLinkedName(ID, group, false, true)%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
406 |
<tbl:cell column="type">Group</tbl:cell> |
5042 |
11 Aug 09 |
martin |
407 |
<tbl:cell column="description"><%=HTML.encodeTags(group.getDescription())%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
408 |
</tbl:row> |
5042 |
11 Aug 09 |
martin |
409 |
<% |
5042 |
11 Aug 09 |
martin |
410 |
} |
5042 |
11 Aug 09 |
martin |
411 |
for (Role role : roles) |
5042 |
11 Aug 09 |
martin |
412 |
{ |
5042 |
11 Aug 09 |
martin |
413 |
%> |
5042 |
11 Aug 09 |
martin |
414 |
<tbl:row> |
5042 |
11 Aug 09 |
martin |
415 |
<tbl:cell column="name"><base:icon |
5946 |
03 Feb 12 |
nicklas |
416 |
image="deleted.png" |
5042 |
11 Aug 09 |
martin |
417 |
tooltip="This item has been scheduled for deletion" |
5042 |
11 Aug 09 |
martin |
418 |
visible="<%=role.isRemoved()%>" |
5042 |
11 Aug 09 |
martin |
419 |
/><%=Base.getLinkedName(ID, role, false, true)%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
420 |
<tbl:cell column="type">Role</tbl:cell> |
5042 |
11 Aug 09 |
martin |
421 |
<tbl:cell column="description"><%=HTML.encodeTags(role.getDescription())%></tbl:cell> |
5042 |
11 Aug 09 |
martin |
422 |
</tbl:row> |
5042 |
11 Aug 09 |
martin |
423 |
<% |
5042 |
11 Aug 09 |
martin |
424 |
} |
1969 |
10 Feb 06 |
nicklas |
425 |
%> |
5042 |
11 Aug 09 |
martin |
426 |
</tbl:rows> |
5042 |
11 Aug 09 |
martin |
427 |
</tbl:data> |
5042 |
11 Aug 09 |
martin |
428 |
</tbl:table> |
5941 |
01 Feb 12 |
nicklas |
429 |
<% |
5941 |
01 Feb 12 |
nicklas |
430 |
} |
5941 |
01 Feb 12 |
nicklas |
431 |
%> |
5941 |
01 Feb 12 |
nicklas |
432 |
</base:section> |
5507 |
19 Nov 10 |
nicklas |
433 |
<jsp:include page="../../common/anytoany/list_anytoany.jsp"> |
5507 |
19 Nov 10 |
nicklas |
434 |
<jsp:param name="ID" value="<%=ID%>" /> |
5507 |
19 Nov 10 |
nicklas |
435 |
<jsp:param name="item_type" value="<%=itemType.name()%>" /> |
5507 |
19 Nov 10 |
nicklas |
436 |
<jsp:param name="item_id" value="<%=itemId%>" /> |
5507 |
19 Nov 10 |
nicklas |
437 |
<jsp:param name="title" value="Other items related to this user" /> |
5507 |
19 Nov 10 |
nicklas |
438 |
</jsp:include> |
5941 |
01 Feb 12 |
nicklas |
439 |
</t:tab> |
5941 |
01 Feb 12 |
nicklas |
440 |
</t:tabcontrol> |
1969 |
10 Feb 06 |
nicklas |
441 |
</base:body> |
1969 |
10 Feb 06 |
nicklas |
442 |
</base:page> |
1969 |
10 Feb 06 |
nicklas |
443 |
<% |
1969 |
10 Feb 06 |
nicklas |
444 |
} |
1969 |
10 Feb 06 |
nicklas |
445 |
finally |
1969 |
10 Feb 06 |
nicklas |
446 |
{ |
1969 |
10 Feb 06 |
nicklas |
447 |
if (dc != null) dc.close(); |
1969 |
10 Feb 06 |
nicklas |
448 |
} |
1969 |
10 Feb 06 |
nicklas |
449 |
|
1969 |
10 Feb 06 |
nicklas |
450 |
%> |