dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06368
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2017: Set default values for max login attempts and lockout mins
------------------------------------------------------------
revno: 2017
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Sat 2010-06-19 20:48:05 +0200
message:
Set default values for max login attempts and lockout mins
modified:
dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2010-06-19 18:48:05 +0000
@@ -47,20 +47,20 @@
final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart";
final String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory";
final String KEY_REPORT_FRAMEWORK = "reportFramework";
-
final String KEY_MAX_NUMBER_OF_ATTEMPTS = "maxAttempts";
final String KEY_TIMEFRAME_MINUTES = "lockoutTimeframe";
-
- final String KEY_CHR_IMAGE_DIRECTORY = "chrImageDirectory";
- final String KEY_CHR_NUMBER_OF_RECORDS = "chrNumberOfRecords";
-
final String KEY_GIS_LONGITUDE = "longitude";
final String KEY_GIS_LATITUDE = "latitude";
-
final String KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED = "dataEntryFormCompleted";
-
final String KEY_FACTOR_OF_DEVIATION = "factorDeviation";
+ final String KEY_CHR_IMAGE_DIRECTORY = "chrImageDirectory";
+ final String KEY_CHR_NUMBER_OF_RECORDS = "chrNumberOfRecords";
+
+ final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20;
+ final int DEFAULT_TIMEFRAME_MINUTES = 1;
+ final double DEFAULT_FACTOR_OF_DEVIATION = 2.0;
+
void saveSystemSetting( String name, Serializable value );
Serializable getSystemSetting( String name );
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2010-04-29 04:33:47 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/interceptor/SystemSettingInterceptor.java 2010-06-19 18:48:05 +0000
@@ -27,6 +27,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import static org.hisp.dhis.options.SystemSettingManager.DEFAULT_FACTOR_OF_DEVIATION;
+import static org.hisp.dhis.options.SystemSettingManager.DEFAULT_MAX_NUMBER_OF_ATTEMPTS;
+import static org.hisp.dhis.options.SystemSettingManager.DEFAULT_TIMEFRAME_MINUTES;
import static org.hisp.dhis.options.SystemSettingManager.KEY_APPLICATION_TITLE;
import static org.hisp.dhis.options.SystemSettingManager.KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED;
import static org.hisp.dhis.options.SystemSettingManager.KEY_FACTOR_OF_DEVIATION;
@@ -84,8 +87,8 @@
Map<String, Object> map = new HashMap<String, Object>( 2 );
map.put( KEY_APPLICATION_TITLE, systemSettingManager.getSystemSetting( KEY_APPLICATION_TITLE ) );
- map.put( KEY_MAX_NUMBER_OF_ATTEMPTS, systemSettingManager.getSystemSetting( KEY_MAX_NUMBER_OF_ATTEMPTS ) );
- map.put( KEY_TIMEFRAME_MINUTES, systemSettingManager.getSystemSetting( KEY_TIMEFRAME_MINUTES ) );
+ map.put( KEY_MAX_NUMBER_OF_ATTEMPTS, systemSettingManager.getSystemSetting( KEY_MAX_NUMBER_OF_ATTEMPTS, DEFAULT_MAX_NUMBER_OF_ATTEMPTS ) );
+ map.put( KEY_TIMEFRAME_MINUTES, systemSettingManager.getSystemSetting( KEY_TIMEFRAME_MINUTES, DEFAULT_TIMEFRAME_MINUTES ) );
map.put( KEY_FLAG, systemSettingManager.getSystemSetting( KEY_FLAG ) );
map.put( KEY_START_MODULE, systemSettingManager.getSystemSetting( KEY_START_MODULE ) );
map.put( KEY_REPORT_FRAMEWORK, systemSettingManager.getSystemSetting( KEY_REPORT_FRAMEWORK, Report.TYPE_DEFAULT ) );
@@ -93,7 +96,7 @@
map.put( KEY_FORUM_INTEGRATION, systemSettingManager.getSystemSetting( KEY_FORUM_INTEGRATION, false ) );
map.put( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, systemSettingManager.getSystemSetting( KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART, false ) );
map.put( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, systemSettingManager.getSystemSetting( KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED, false ) );
- map.put( KEY_FACTOR_OF_DEVIATION, systemSettingManager.getSystemSetting( KEY_FACTOR_OF_DEVIATION, 2.0 ) );
+ map.put( KEY_FACTOR_OF_DEVIATION, systemSettingManager.getSystemSetting( KEY_FACTOR_OF_DEVIATION, DEFAULT_FACTOR_OF_DEVIATION ) );
invocation.getStack().push( map );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2010-06-09 19:41:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2010-06-19 18:48:05 +0000
@@ -89,4 +89,6 @@
jasper = Jasper Reports
intro_user_settings = Customize the system with user specific settings for locale, sort order, display property, style and more.
intro_system_settings = Customize the system behavior with regard to reporting framework, start page, title, flag and more.
-disable_dataentry_when_dataset_completed = Disable data entry when data set completed.
\ No newline at end of file
+disable_dataentry_when_dataset_completed = Disable data entry when data set completed.
+max_attempts = Max number of login attempts
+lockout_timeframe = Lockout minutes after max number of login attempts
\ No newline at end of file