Changeset 7403
- Timestamp:
- Oct 4, 2017, 9:38:59 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Client.java
r7381 r7403 209 209 } 210 210 211 /** 212 This flag indicates if the registered client application supports 213 device verification or not. 214 @return TRUE if it is supported, FALSE if not 215 @since 3.12 216 */ 217 public boolean getSupportsDeviceVerification() 218 { 219 return getData().getSupportsDeviceVerification(); 220 } 221 public void setSupportsDeviceVerification(boolean supportsDeviceVerification) 222 { 223 checkPermission(Permission.WRITE); 224 getData().setSupportsDeviceVerification(supportsDeviceVerification); 225 } 226 227 211 228 /** 212 229 Create a new default setting for this client. -
trunk/src/core/net/sf/basedb/core/Update.java
r7392 r7403 937 937 if (schemaVersion < 138) 938 938 { 939 System.out.println("Setting news.sticky to false");940 939 // Set sticky=false on all news 941 940 org.hibernate.query.Query<?> query = HibernateUtil.createQuery(session, … … 946 945 } 947 946 947 if (schemaVersion < 139) 948 { 949 // Set supportsDeviceVerification = false on all clients (except on the web client) 950 org.hibernate.query.Query<?> query = HibernateUtil.createQuery(session, 951 "UPDATE ClientData c " + 952 "SET c.supportsDeviceVerification = false " + 953 "WHERE c.supportsDeviceVerification IS NULL"); 954 query.executeUpdate(); 955 956 query = HibernateUtil.createQuery(session, 957 "UPDATE ClientData c " + 958 "SET c.supportsDeviceVerification = true " + 959 "WHERE c.externalId = 'net.sf.basedb.clients.web'"); 960 query.executeUpdate(); 961 } 962 948 963 // Commit the changes 949 964 HibernateUtil.commit(tx); -
trunk/src/core/net/sf/basedb/core/data/ClientData.java
r6127 r7403 75 75 { 76 76 this.externalId = externalId; 77 } 78 79 private boolean supportsDeviceVerification; 80 /** 81 A flag indicating if this client application supports device verification. 82 @since 3.12 83 @hibernate.property column="`supports_device_verification`" type="boolean" not-null="true" 84 */ 85 public boolean getSupportsDeviceVerification() 86 { 87 return supportsDeviceVerification; 88 } 89 public void setSupportsDeviceVerification(boolean supportsDeviceVerification) 90 { 91 this.supportsDeviceVerification = supportsDeviceVerification; 77 92 } 78 93 -
trunk/src/install/net/sf/basedb/install/Webclient.java
r7158 r7403 114 114 client.setName("Web client"); 115 115 client.setDescription("The web interface to BASE"); 116 client.setSupportsDeviceVerification(true); 116 117 client.setItemKey(shareToEveryone); 117 118 dc.saveItem(client); -
trunk/www/admin/clients/edit_client.jsp
r6295 r7403 113 113 <td></td> 114 114 </tr> 115 <tr> 116 <th></th> 117 <td><input type="checkbox" name="supports_device_verification" id="supports_device_verification" value="1" 118 <%=(client != null && client.getSupportsDeviceVerification()) || 119 (client == null && Values.getBoolean(cc.getPropertyValue("supportsDeviceVerification"))) ? "checked" : ""%> 120 ><label for="supports_device_verification">Supports device verfication</label> 121 </td> 122 <td></td> 123 </tr> 115 124 <tr class="dynamic"> 116 125 <th>Description</th> -
trunk/www/admin/clients/index.jsp
r6192 r7403 153 153 client.setName(Values.getStringOrNull(request.getParameter("name"))); 154 154 client.setDescription(Values.getStringOrNull(request.getParameter("description"))); 155 client.setSupportsDeviceVerification(Values.getBoolean(request.getParameter("supports_device_verification"))); 155 156 156 157 // OnSave extensions -
trunk/www/admin/clients/list_clients.jsp
r7269 r7403 164 164 title="External ID" 165 165 sortable="true" 166 filterable="true" 167 exportable="true" 168 /> 169 <tbl:columndef 170 id="supportsDeviceVerification" 171 property="supportsDeviceVerification" 172 datatype="boolean" 173 title="Device verification" 174 sortable="true" 166 175 filterable="true" 167 176 exportable="true" … … 412 421 <tbl:cell column="entryDate" value="<%=item.getEntryDate()%>" /> 413 422 <tbl:cell column="externalId"><%=Values.getString(item.getExternalId())%></tbl:cell> 423 <tbl:cell column="supportsDeviceVerification"><%=item.getSupportsDeviceVerification() ? "yes" : "no"%></tbl:cell> 414 424 <tbl:cell column="owner" 415 425 ><base:propertyvalue -
trunk/www/admin/clients/view_client.jsp
r6605 r7403 44 44 import="net.sf.basedb.clients.web.PermissionUtil" 45 45 import="net.sf.basedb.clients.web.util.HTML" 46 import="net.sf.basedb.util.EmailUtil" 46 47 import="net.sf.basedb.util.Values" 47 48 import="net.sf.basedb.util.formatter.Formatter" … … 221 222 </tr> 222 223 <tr> 224 <th>Device verification</th> 225 <td><%=client.getSupportsDeviceVerification() ? "Supported" : "Not supported"%> 226 <% 227 if (!EmailUtil.isEnabled() && client.getSupportsDeviceVerification()) 228 { 229 %> 230 (You need to configure an email server in <i>base.config</i> before you can use this feature.) 231 <% 232 } 233 %> 234 </td> 235 </tr> 236 <tr> 223 237 <th>Owner</th> 224 238 <td><base:propertyvalue item="<%=client%>" property="owner" /></td>
Note: See TracChangeset
for help on using the changeset viewer.