+
+
+
+
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scm-webapp/src/main/webapp/index.html b/scm-webapp/src/main/webapp/index.html
index 33a45f3050..b1ac5aeb23 100644
--- a/scm-webapp/src/main/webapp/index.html
+++ b/scm-webapp/src/main/webapp/index.html
@@ -49,6 +49,7 @@
+
diff --git a/scm-webapp/src/main/webapp/resources/extjs/util/CheckColumn.js b/scm-webapp/src/main/webapp/resources/extjs/util/CheckColumn.js
new file mode 100644
index 0000000000..5dd143ea96
--- /dev/null
+++ b/scm-webapp/src/main/webapp/resources/extjs/util/CheckColumn.js
@@ -0,0 +1,71 @@
+/*!
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
+ */
+Ext.ns('Ext.ux.grid');
+
+/**
+ * @class Ext.ux.grid.CheckColumn
+ * @extends Ext.grid.Column
+ * A Column subclass which renders a checkbox in each column cell which toggles the truthiness of the associated data field on click.
+ * Note. As of ExtJS 3.3 this no longer has to be configured as a plugin of the GridPanel.
+ * Example usage:
+ *
+var cm = new Ext.grid.ColumnModel([{
+ header: 'Foo',
+ ...
+ },{
+ xtype: 'checkcolumn',
+ header: 'Indoor?',
+ dataIndex: 'indoor',
+ width: 55
+ }
+]);
+
+// create the grid
+var grid = new Ext.grid.EditorGridPanel({
+ ...
+ colModel: cm,
+ ...
+});
+ *
+ * In addition to toggling a Boolean value within the record data, this
+ * class toggles a css class between 'x-grid3-check-col' and
+ * 'x-grid3-check-col-on' to alter the background image used for
+ * a column.
+ */
+Ext.ux.grid.CheckColumn = Ext.extend(Ext.grid.Column, {
+
+ /**
+ * @private
+ * Process and refire events routed from the GridView's processEvent method.
+ */
+ processEvent : function(name, e, grid, rowIndex, colIndex){
+ if (name == 'mousedown') {
+ var record = grid.store.getAt(rowIndex);
+ record.set(this.dataIndex, !record.data[this.dataIndex]);
+ return false; // Cancel row selection.
+ } else {
+ return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments);
+ }
+ },
+
+ renderer : function(v, p, record){
+ p.css += ' x-grid3-check-col-td';
+ return String.format('
', v ? '-on' : '');
+ },
+
+ // Deprecate use as a plugin. Remove in 4.0
+ init: Ext.emptyFn
+});
+
+// register ptype. Deprecate. Remove in 4.0
+Ext.preg('checkcolumn', Ext.ux.grid.CheckColumn);
+
+// backwards compat. Remove in 4.0
+Ext.grid.CheckColumn = Ext.ux.grid.CheckColumn;
+
+// register Column xtype
+Ext.grid.Column.types.checkcolumn = Ext.ux.grid.CheckColumn;
\ No newline at end of file
diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.group.js b/scm-webapp/src/main/webapp/resources/js/sonia.group.js
index 0ecbde4a23..168b38b64a 100644
--- a/scm-webapp/src/main/webapp/resources/js/sonia.group.js
+++ b/scm-webapp/src/main/webapp/resources/js/sonia.group.js
@@ -237,6 +237,10 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
item.members = members;
},
+ clearModifications: function(){
+ Ext.getCmp('memberGrid').getStore().commitChanges();
+ },
+
update: function(group){
if ( debug ){
console.debug( 'update group ' + group.name );
@@ -258,7 +262,7 @@ Sonia.group.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
if ( debug ){
console.debug('update success');
}
- // this.clearModifications();
+ this.clearModifications();
clearTimeout(tid);
el.unmask();
this.execCallback(this.onUpdate, group);
diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js
index 2cf6051876..ea7e46e9b9 100644
--- a/scm-webapp/src/main/webapp/resources/js/sonia.repository.js
+++ b/scm-webapp/src/main/webapp/resources/js/sonia.repository.js
@@ -226,7 +226,11 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
this.permissionStore = new Ext.data.JsonStore({
root: 'permissions',
- fields: [ 'name', 'type', 'groupPermission' ],
+ fields: [
+ {name: 'name'},
+ {name: 'type'},
+ {name: 'groupPermission', type: 'boolean'}
+ ],
sortInfo: {
field: 'name'
}
@@ -237,6 +241,12 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
sortable: true
},
columns: [{
+ id: 'groupPermission',
+ xtype: 'checkcolumn',
+ header: 'Group Permission',
+ dataIndex: 'groupPermission',
+ width: 40
+ },{
id: 'name',
header: 'Name',
dataIndex: 'name',
@@ -264,12 +274,6 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
]
})
})
- },{
- id: 'groupPermission',
- header: 'Group',
- dataIndex: 'groupPermission',
- width: 60,
- editor: new Ext.form.Checkbox()
}]
});
@@ -323,6 +327,7 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
xtype: 'editorgrid',
title: 'Permissions',
clicksToEdit: 1,
+ autoExpandColumn: 'name',
frame: true,
width: '100%',
autoHeight: true,
@@ -374,7 +379,7 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
},
clearModifications: function(){
- // todo
+ Ext.getCmp('permissionGrid').getStore().commitChanges();
},
update: function(item){
diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
index b443c7cf77..93bb1ce07b 100644
--- a/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
+++ b/scm-webapp/src/main/webapp/resources/js/sonia.scm.js
@@ -92,13 +92,16 @@ Ext.onReady(function(){
// adds a tab to main TabPanel
function addTabPanel(id, xtype, title){
- mainTabPanel.add({
- id: id,
- xtype: xtype,
- title: title,
- closable: true,
- autoScroll: true
- });
+ var tab = mainTabPanel.findById( id );
+ if ( tab == null ){
+ mainTabPanel.add({
+ id: id,
+ xtype: xtype,
+ title: title,
+ closable: true,
+ autoScroll: true
+ });
+ }
mainTabPanel.setActiveTab(id);
}
diff --git a/scm-webapp/src/main/webapp/resources/js/sonia.user.js b/scm-webapp/src/main/webapp/resources/js/sonia.user.js
index 7b399ea9ab..c60a7d788b 100644
--- a/scm-webapp/src/main/webapp/resources/js/sonia.user.js
+++ b/scm-webapp/src/main/webapp/resources/js/sonia.user.js
@@ -59,7 +59,7 @@ Sonia.user.Grid = Ext.extend(Sonia.rest.Grid, {
var userStore = new Sonia.rest.JsonStore({
url: restUrl + 'users.json',
- fields: [ 'name', 'displayName', 'mail', 'admin', 'creationDate', 'lastLogin', 'type'],
+ fields: [ 'name', 'displayName', 'mail', 'admin', 'creationDate', 'lastModified', 'type'],
sortInfo: {
field: 'name'
}
@@ -77,7 +77,7 @@ Sonia.user.Grid = Ext.extend(Sonia.rest.Grid, {
{id: 'mail', header: 'Mail', dataIndex: 'mail', renderer: this.renderMailto, width: 200},
{id: 'admin', header: 'Admin', dataIndex: 'admin', renderer: this.renderCheckbox, width: 50},
{id: 'creationDate', header: 'Creation date', dataIndex: 'creationDate'},
- {id: 'lastLogin', header: 'Last login', dataIndex: 'lastLogin'},
+ {id: 'lastLogin', header: 'Last modified', dataIndex: 'lastModified'},
{id: 'type', header: 'Type', dataIndex: 'type', width: 80}
]
});
diff --git a/scm-webapp/src/test/java/sonia/scm/web/security/ChainAuthenticationManagerTest.java b/scm-webapp/src/test/java/sonia/scm/web/security/ChainAuthenticationManagerTest.java
index 27810c5ad1..d1b00e739c 100644
--- a/scm-webapp/src/test/java/sonia/scm/web/security/ChainAuthenticationManagerTest.java
+++ b/scm-webapp/src/test/java/sonia/scm/web/security/ChainAuthenticationManagerTest.java
@@ -39,6 +39,9 @@ import org.junit.Test;
import sonia.scm.AbstractTestBase;
import sonia.scm.SCMContextProvider;
+import sonia.scm.cache.CacheManager;
+import sonia.scm.cache.EhCacheManager;
+import sonia.scm.security.MessageDigestEncryptionHandler;
import sonia.scm.user.User;
import sonia.scm.user.UserTestData;
import sonia.scm.util.MockUtil;
@@ -69,8 +72,8 @@ public class ChainAuthenticationManagerTest extends AbstractTestBase
@Test
public void testAuthenticateFailed()
{
- AuthenticationResult result = manager.authenticate(request, response, trillian.getName(),
- "trillian");
+ AuthenticationResult result = manager.authenticate(request, response,
+ trillian.getName(), "trillian");
assertNull(result);
}
@@ -82,7 +85,8 @@ public class ChainAuthenticationManagerTest extends AbstractTestBase
@Test
public void testAuthenticateNotFound()
{
- AuthenticationResult result = manager.authenticate(request, response, "dent", "trillian");
+ AuthenticationResult result = manager.authenticate(request, response,
+ "dent", "trillian");
assertNull(result);
}
@@ -94,14 +98,14 @@ public class ChainAuthenticationManagerTest extends AbstractTestBase
@Test
public void testAuthenticateSuccess()
{
- AuthenticationResult result = manager.authenticate(request, response, trillian.getName(),
- "trillian123");
+ AuthenticationResult result = manager.authenticate(request, response,
+ trillian.getName(), "trillian123");
assertNotNull(result);
assertUserEquals(trillian, result.getUser());
assertEquals("trilliansType", result.getUser().getType());
result = manager.authenticate(request, response, perfect.getName(),
- "perfect123");
+ "perfect123");
assertNotNull(perfect);
assertUserEquals(perfect, result.getUser());
assertEquals("perfectsType", result.getUser().getType());
@@ -126,7 +130,8 @@ public class ChainAuthenticationManagerTest extends AbstractTestBase
trillian.setPassword("trillian123");
handlerSet.add(new SingleUserAuthenticaionHandler("trilliansType",
trillian));
- manager = new ChainAuthenticatonManager(handlerSet);
+ manager = new ChainAuthenticatonManager(handlerSet,
+ new MessageDigestEncryptionHandler(), cacheManager);
manager.init(contextProvider);
request = MockUtil.getHttpServletRequest();
response = MockUtil.getHttpServletResponse();
@@ -266,6 +271,9 @@ public class ChainAuthenticationManagerTest extends AbstractTestBase
//~--- fields ---------------------------------------------------------------
+ /** Field description */
+ private CacheManager cacheManager = new EhCacheManager();
+
/** Field description */
private ChainAuthenticatonManager manager;
diff --git a/third-party/pom.xml b/third-party/pom.xml
index 9e07f56236..f72dd7eb27 100644
--- a/third-party/pom.xml
+++ b/third-party/pom.xml
@@ -6,13 +6,13 @@
sonia.scm
scm
- 1.0-M6-SNAPSHOT
+ 1.0-M7-SNAPSHOT
sonia.scm.third-party
sonia.scm.third-party
pom
- 1.0-M6-SNAPSHOT
+ 1.0-M7-SNAPSHOT
third-party
diff --git a/third-party/shared-libs/pom.xml b/third-party/shared-libs/pom.xml
index 1a6e563b4d..120d7b2924 100644
--- a/third-party/shared-libs/pom.xml
+++ b/third-party/shared-libs/pom.xml
@@ -6,13 +6,13 @@
sonia.scm.third-party
sonia.scm.third-party
- 1.0-M6-SNAPSHOT
+ 1.0-M7-SNAPSHOT
sonia.scm.third-party
shared-libs
pom
- 1.0-M6-SNAPSHOT
+ 1.0-M7-SNAPSHOT
shared-libs
diff --git a/third-party/svnkit-dav/pom.xml b/third-party/svnkit-dav/pom.xml
index ff007168f1..0867adf1b4 100644
--- a/third-party/svnkit-dav/pom.xml
+++ b/third-party/svnkit-dav/pom.xml
@@ -6,13 +6,13 @@
sonia.scm.third-party
sonia.scm.third-party
- 1.0-M6-SNAPSHOT
+ 1.0-M7-SNAPSHOT
org.tmatesoft.svnkit
svnkit-dav
jar
- 1.3.4
+ 1.3.5.1
svnkit-dav
@@ -21,14 +21,19 @@
javax.servlet
servlet-api
${servlet.version}
+ provided