From 9dce816fb634d7444d379468801c60eaaf602dfd Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 24 May 2016 21:25:14 +0200 Subject: [PATCH] added checkbox to enable xsrf protection --- .../resources/js/config/sonia.config.scmconfigpanel.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scm-webapp/src/main/webapp/resources/js/config/sonia.config.scmconfigpanel.js b/scm-webapp/src/main/webapp/resources/js/config/sonia.config.scmconfigpanel.js index 29efa3fa00..a985688a3e 100644 --- a/scm-webapp/src/main/webapp/resources/js/config/sonia.config.scmconfigpanel.js +++ b/scm-webapp/src/main/webapp/resources/js/config/sonia.config.scmconfigpanel.js @@ -102,6 +102,10 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ forceBaseUrlHelpText: 'Redirects to the base url if the request comes from a other url', disableGroupingGridHelpText: 'Disable repository Groups. A complete page reload is required after a change of this value.', enableRepositoryArchiveHelpText: 'Enable repository archives. A complete page reload is required after a change of this value.', + + // TODO i18n + enableXsrfProtectionText: 'Enable Xsrf Protection', + enableXsrfProtectionHelpText: 'Enable Xsrf Cookie Protection. Note: This feature is still experimental.', initComponent: function(){ @@ -166,6 +170,12 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{ name: 'skip-failed-authenticators', inputValue: 'true', helpText: this.skipFailedAuthenticatorsHelpText + },{ + xtype: 'checkbox', + fieldLabel: this.enableXsrfProtectionText, + name: 'xsrf-protection', + inputValue: 'true', + helpText: this.enableXsrfProtectionHelpText },{ xtype: 'numberfield', fieldLabel: this.loginAttemptLimitText,