Changeset 7536
- Timestamp:
- Nov 28, 2018, 8:49:22 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/web-extensions.xml
r7271 r7536 212 212 * OnSave: Add callback functionality when saving from an edit dialog 213 213 --> 214 215 <extension 216 id="password-login-form" 217 extends="net.sf.basedb.clients.web.login-form" 218 > 219 <about> 220 <name>Password login form</name> 221 <description> 222 The regular username+password login form. This is disabled by 223 default, but need to be enabled when installing an external 224 authentication manager that is optional. 225 </description> 226 </about> 227 <index>99</index> 228 <action-factory> 229 <factory-class>net.sf.basedb.clients.web.extensions.login.PasswordLoginFormFactory</factory-class> 230 </action-factory> 231 </extension> 214 232 215 233 <extension -
trunk/src/core/net/sf/basedb/core/Install.java
r7471 r7536 119 119 method. 120 120 */ 121 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(14 1).intValue();121 public static final int NEW_SCHEMA_VERSION = Integer.valueOf(142).intValue(); 122 122 123 123 public static synchronized int createTables(SchemaGenerator.Mode mode, ProgressReporter progress, … … 961 961 } 962 962 963 Settings xtSettings = Application.getExtensionsManager().getSettings(); 963 964 if (!update || schemaVersion.getSchemaVersion() < 108) 964 965 { … … 966 967 // base.config setting has enabled it when installing or updating from 967 968 // pre BASE 3.2 968 Settings xtSettings = Application.getExtensionsManager().getSettings();969 969 xtSettings.enableExtension("net.sf.basedb.core.db-log-manager", 970 970 "net.sf.basedb.core.log.db.DbLogManagerFactory".equals(Config.getString("changelog.factory"))); 971 xtSettings.save(); 972 } 971 } 972 if (!update || schemaVersion.getSchemaVersion() < 142) 973 { 974 // The Password login form should be disabled by default 975 xtSettings.enableExtension("net.sf.basedb.clients.web.password-login-form", false); 976 } 977 xtSettings.save(); 973 978 974 979 if (progress != null) -
trunk/src/core/net/sf/basedb/core/Update.java
r7471 r7536 399 399 </td> 400 400 </tr> 401 <tr> 402 <td>142</td> 403 <td> 404 Added the default password login form. It needs to be disabled by default which is 405 triggered by the schema version update. No actual database change. 406 </td> 407 </tr> 401 408 402 409 </table> … … 646 653 if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 141..."); 647 654 schemaVersion = setSchemaVersionInTransaction(session, 141); 655 progress_current += progress_step; 656 } 657 658 if (schemaVersion < 142) 659 { 660 if (progress != null) progress.display((int)(progress_current), "--Updating schema version: " + schemaVersion + " -> 142..."); 661 schemaVersion = setSchemaVersionInTransaction(session, 142); 648 662 progress_current += progress_step; 649 663 } -
trunk/www/main.jsp
r7530 r7536 50 50 import="net.sf.basedb.clients.web.servlet.RssNewsFeed" 51 51 import="net.sf.basedb.clients.web.extensions.login.LoginFormAction" 52 import="net.sf.basedb.clients.web.extensions.login.LoginFormBean"53 52 import="net.sf.basedb.clients.web.extensions.login.FieldInfo" 53 import="net.sf.basedb.clients.web.extensions.login.PasswordLoginFormFactory" 54 54 import="net.sf.basedb.util.Values" 55 55 import="java.util.Date" … … 111 111 if (loginAction == null) 112 112 { 113 LoginFormBean bean = new LoginFormBean(); 114 bean.setRememberLastLogin(true); 115 bean.setLoginField(FieldInfo.DEFAULT_LOGIN); 116 bean.setPasswordField(FieldInfo.DEFAULT_PASSWORD); 117 loginAction = bean; 118 selectedLoginForm = "password"; 113 loginAction = PasswordLoginFormFactory.INSTANCE; 114 selectedLoginForm = loginAction.getId(); 119 115 } 120 116 -
trunk/www/switch.jsp
r7531 r7536 39 39 import="net.sf.basedb.clients.web.extensions.JspContext" 40 40 import="net.sf.basedb.clients.web.extensions.login.LoginFormAction" 41 import="net.sf.basedb.clients.web.extensions.login. LoginFormBean"41 import="net.sf.basedb.clients.web.extensions.login.PasswordLoginFormFactory" 42 42 import="net.sf.basedb.clients.web.extensions.login.FieldInfo" 43 43 import="net.sf.basedb.util.Values" … … 91 91 if (loginAction == null) 92 92 { 93 LoginFormBean bean = new LoginFormBean(); 94 bean.setRememberLastLogin(true); 95 bean.setLoginField(FieldInfo.DEFAULT_LOGIN); 96 bean.setPasswordField(FieldInfo.DEFAULT_PASSWORD); 97 loginAction = bean; 98 selectedLoginForm = "password"; 93 loginAction = PasswordLoginFormFactory.INSTANCE; 94 selectedLoginForm = loginAction.getId(); 99 95 } 100 96 FieldInfo loginField = loginAction.getLoginField();
Note: See TracChangeset
for help on using the changeset viewer.