From eadd86a3d656e4b2b45fdc22a0595797d40af589 Mon Sep 17 00:00:00 2001 From: mpowers Date: Mon, 5 Jan 2009 20:03:07 +0000 Subject: [PATCH 01/11] updated for released dependencies git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2886 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 46869f950d..4cefc0de0c 100644 --- a/pom.xml +++ b/pom.xml @@ -142,10 +142,10 @@ 1.6.4 3.2.3.2 - 1.0.5-SNAPSHOT + 1.0.5 1.5.5 2.1-SONATYPE-653485 - 1.1.2.3-SNAPSHOT + 1.1.2.3 1.6 1.0.2 From 67ca50cd2ffd31bc3dc4116be4be832f493da42d Mon Sep 17 00:00:00 2001 From: mpowers Date: Mon, 5 Jan 2009 20:06:04 +0000 Subject: [PATCH 02/11] disabled test-harness for release git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2887 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4cefc0de0c..79f8c5a89a 100644 --- a/pom.xml +++ b/pom.xml @@ -128,7 +128,7 @@ test-harness - true + false test-harness From a8dda2e5b1eba749dcbf30b05a5f3ba0e5bf19b8 Mon Sep 17 00:00:00 2001 From: mpowers Date: Mon, 5 Jan 2009 20:12:53 +0000 Subject: [PATCH 03/11] [maven-release-plugin] prepare release nexus-1.2.0.3 git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2888 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- nexus-api/pom.xml | 2 +- nexus-app/pom.xml | 2 +- nexus-clients/nexus-rest-client-java/pom.xml | 2 +- nexus-clients/pom.xml | 2 +- nexus-configuration/pom.xml | 2 +- nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml | 2 +- .../nexus-repository-conversion-tool/pom.xml | 2 +- nexus-migration-tool/pom.xml | 2 +- nexus-oss-edition/pom.xml | 2 +- nexus-proxy/pom.xml | 2 +- nexus-rest-api/pom.xml | 2 +- nexus-utils/pom.xml | 2 +- nexus-webapp/pom.xml | 2 +- pom.xml | 8 +++++++- 14 files changed, 20 insertions(+), 14 deletions(-) diff --git a/nexus-api/pom.xml b/nexus-api/pom.xml index 55839f587a..a13004d6ed 100644 --- a/nexus-api/pom.xml +++ b/nexus-api/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-app/pom.xml b/nexus-app/pom.xml index 502cb05798..2d9c7bcd54 100644 --- a/nexus-app/pom.xml +++ b/nexus-app/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-clients/nexus-rest-client-java/pom.xml b/nexus-clients/nexus-rest-client-java/pom.xml index e4167c7342..061cb722a1 100644 --- a/nexus-clients/nexus-rest-client-java/pom.xml +++ b/nexus-clients/nexus-rest-client-java/pom.xml @@ -2,7 +2,7 @@ nexus-clients org.sonatype.nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 4.0.0 org.sonatype.nexus diff --git a/nexus-clients/pom.xml b/nexus-clients/pom.xml index ecd2a0ab02..0779495211 100644 --- a/nexus-clients/pom.xml +++ b/nexus-clients/pom.xml @@ -2,7 +2,7 @@ nexus org.sonatype.nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 4.0.0 org.sonatype.nexus diff --git a/nexus-configuration/pom.xml b/nexus-configuration/pom.xml index cfbcd748d6..fe023f3d40 100644 --- a/nexus-configuration/pom.xml +++ b/nexus-configuration/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml b/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml index c6dcc4df16..47c83299e8 100644 --- a/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml +++ b/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus.tools nexus-migration-tool - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml b/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml index 45c0a14b4a..9f0d24a021 100644 --- a/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml +++ b/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus.tools nexus-migration-tool - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-migration-tool/pom.xml b/nexus-migration-tool/pom.xml index 0bc412eb73..fd911b5dcf 100644 --- a/nexus-migration-tool/pom.xml +++ b/nexus-migration-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-oss-edition/pom.xml b/nexus-oss-edition/pom.xml index df7b68e3bb..4cf71da0a7 100644 --- a/nexus-oss-edition/pom.xml +++ b/nexus-oss-edition/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 nexus-oss-edition diff --git a/nexus-proxy/pom.xml b/nexus-proxy/pom.xml index 48ecfcb5f2..ab2bcc2fd2 100644 --- a/nexus-proxy/pom.xml +++ b/nexus-proxy/pom.xml @@ -2,7 +2,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 4.0.0 nexus-proxy diff --git a/nexus-rest-api/pom.xml b/nexus-rest-api/pom.xml index 2f222baa53..45ba648551 100644 --- a/nexus-rest-api/pom.xml +++ b/nexus-rest-api/pom.xml @@ -3,7 +3,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 nexus-rest-api Nexus (Rest API) diff --git a/nexus-utils/pom.xml b/nexus-utils/pom.xml index 0b629320bf..25b385ce84 100644 --- a/nexus-utils/pom.xml +++ b/nexus-utils/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 diff --git a/nexus-webapp/pom.xml b/nexus-webapp/pom.xml index 0480e82644..dcd9a66eba 100644 --- a/nexus-webapp/pom.xml +++ b/nexus-webapp/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3-SNAPSHOT + 1.2.0.3 nexus-webapp diff --git a/pom.xml b/pom.xml index 79f8c5a89a..368c639a0d 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ nexus pom Nexus Repository Manager - 1.2.0.3-SNAPSHOT + 1.2.0.3 Sonatype Nexus Repository Manager 2007 @@ -766,4 +766,10 @@ + + + scm:svn:http://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 + scm:svn:https://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 + http://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 + \ No newline at end of file From b868bc2582640691a507f6d81a5e53bee46b6950 Mon Sep 17 00:00:00 2001 From: mpowers Date: Mon, 5 Jan 2009 20:13:50 +0000 Subject: [PATCH 04/11] [maven-release-plugin] prepare for next development iteration git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2890 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- nexus-api/pom.xml | 2 +- nexus-app/pom.xml | 2 +- nexus-clients/nexus-rest-client-java/pom.xml | 2 +- nexus-clients/pom.xml | 2 +- nexus-configuration/pom.xml | 2 +- nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml | 2 +- .../nexus-repository-conversion-tool/pom.xml | 2 +- nexus-migration-tool/pom.xml | 2 +- nexus-oss-edition/pom.xml | 2 +- nexus-proxy/pom.xml | 2 +- nexus-rest-api/pom.xml | 2 +- nexus-utils/pom.xml | 2 +- nexus-webapp/pom.xml | 2 +- pom.xml | 8 +------- 14 files changed, 14 insertions(+), 20 deletions(-) diff --git a/nexus-api/pom.xml b/nexus-api/pom.xml index a13004d6ed..698a1a9a67 100644 --- a/nexus-api/pom.xml +++ b/nexus-api/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-app/pom.xml b/nexus-app/pom.xml index 2d9c7bcd54..7c1b10b42e 100644 --- a/nexus-app/pom.xml +++ b/nexus-app/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-clients/nexus-rest-client-java/pom.xml b/nexus-clients/nexus-rest-client-java/pom.xml index 061cb722a1..4001bff128 100644 --- a/nexus-clients/nexus-rest-client-java/pom.xml +++ b/nexus-clients/nexus-rest-client-java/pom.xml @@ -2,7 +2,7 @@ nexus-clients org.sonatype.nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT 4.0.0 org.sonatype.nexus diff --git a/nexus-clients/pom.xml b/nexus-clients/pom.xml index 0779495211..1995c982a5 100644 --- a/nexus-clients/pom.xml +++ b/nexus-clients/pom.xml @@ -2,7 +2,7 @@ nexus org.sonatype.nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT 4.0.0 org.sonatype.nexus diff --git a/nexus-configuration/pom.xml b/nexus-configuration/pom.xml index fe023f3d40..9e6253baef 100644 --- a/nexus-configuration/pom.xml +++ b/nexus-configuration/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml b/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml index 47c83299e8..c04ec62cba 100644 --- a/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml +++ b/nexus-migration-tool/nexus-metadata-rebuild-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus.tools nexus-migration-tool - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml b/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml index 9f0d24a021..a2ea61c9a7 100644 --- a/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml +++ b/nexus-migration-tool/nexus-repository-conversion-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus.tools nexus-migration-tool - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-migration-tool/pom.xml b/nexus-migration-tool/pom.xml index fd911b5dcf..edd2d34831 100644 --- a/nexus-migration-tool/pom.xml +++ b/nexus-migration-tool/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-oss-edition/pom.xml b/nexus-oss-edition/pom.xml index 4cf71da0a7..cc9e0013c3 100644 --- a/nexus-oss-edition/pom.xml +++ b/nexus-oss-edition/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT nexus-oss-edition diff --git a/nexus-proxy/pom.xml b/nexus-proxy/pom.xml index ab2bcc2fd2..f80bc5d62a 100644 --- a/nexus-proxy/pom.xml +++ b/nexus-proxy/pom.xml @@ -2,7 +2,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT 4.0.0 nexus-proxy diff --git a/nexus-rest-api/pom.xml b/nexus-rest-api/pom.xml index 45ba648551..e18048b287 100644 --- a/nexus-rest-api/pom.xml +++ b/nexus-rest-api/pom.xml @@ -3,7 +3,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT nexus-rest-api Nexus (Rest API) diff --git a/nexus-utils/pom.xml b/nexus-utils/pom.xml index 25b385ce84..5c2a50c267 100644 --- a/nexus-utils/pom.xml +++ b/nexus-utils/pom.xml @@ -4,7 +4,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT diff --git a/nexus-webapp/pom.xml b/nexus-webapp/pom.xml index dcd9a66eba..6ae5af2aee 100644 --- a/nexus-webapp/pom.xml +++ b/nexus-webapp/pom.xml @@ -5,7 +5,7 @@ org.sonatype.nexus nexus - 1.2.0.3 + 1.2.0.4-SNAPSHOT nexus-webapp diff --git a/pom.xml b/pom.xml index 368c639a0d..013ebd74a5 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ nexus pom Nexus Repository Manager - 1.2.0.3 + 1.2.0.4-SNAPSHOT Sonatype Nexus Repository Manager 2007 @@ -766,10 +766,4 @@ - - - scm:svn:http://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 - scm:svn:https://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 - http://svn.sonatype.org/nexus/tags/nexus-1.2.0.3 - \ No newline at end of file From 0cf6fb8518361403dae64e19188d614453a43ad9 Mon Sep 17 00:00:00 2001 From: mpowers Date: Mon, 5 Jan 2009 21:21:56 +0000 Subject: [PATCH 05/11] updated test-harness profile so can be disabled using a -Dskip-test-harness git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2892 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- pom.xml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 013ebd74a5..e02abbd331 100644 --- a/pom.xml +++ b/pom.xml @@ -112,6 +112,19 @@ + + + 1.6.4 + 3.2.3.2 + 1.0.5 + 1.5.5 + 2.1-SONATYPE-653485 + 1.1.2.3 + + 1.6 + 1.0.2 + 1.0.0-alpha-2-722647 + nexus-utils nexus-api @@ -128,29 +141,15 @@ test-harness - false - test-harness + !skip-test-harness nexus-test-harness - - - - 1.6.4 - 3.2.3.2 - 1.0.5 - 1.5.5 - 2.1-SONATYPE-653485 - 1.1.2.3 - - 1.6 - 1.0.2 - 1.0.0-alpha-2-722647 - + From 749a78aa2408fdb7cd4b7e3604eb86ccc77e1d4a Mon Sep 17 00:00:00 2001 From: dip Date: Tue, 6 Jan 2009 05:08:32 +0000 Subject: [PATCH 06/11] NXCM-321: search action changed git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2898 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- .../src/main/webapp/js/Sonatype.config.js | 1 + .../js/repoServer/repoServer.UserEditPanel.js | 94 +++++++++++-------- 2 files changed, 56 insertions(+), 39 deletions(-) diff --git a/nexus-webapp/src/main/webapp/js/Sonatype.config.js b/nexus-webapp/src/main/webapp/js/Sonatype.config.js index b11a217444..6dc8fab3c8 100644 --- a/nexus-webapp/src/main/webapp/js/Sonatype.config.js +++ b/nexus-webapp/src/main/webapp/js/Sonatype.config.js @@ -100,6 +100,7 @@ Sonatype.config = function() { trash: servicePath + '/wastebasket', plexusUsersAllConfigured: servicePath + '/plexus_users/allConfigured', plexusUsersDefault: servicePath + '/plexus_users/default', + plexusUsers: servicePath + '/plexus_users', searchUsers: servicePath + '/user_search', plexusUser: servicePath + '/plexus_user', userToRoles: servicePath + '/user_to_roles', diff --git a/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js b/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js index ea4f96ae60..9e3c982b83 100644 --- a/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js +++ b/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js @@ -44,10 +44,42 @@ Sonatype.repoServer.UserEditPanel = function( config ) { } }; + this.displaySelector = new Ext.Button( { + text: 'Default Realm Users', + icon: Sonatype.config.resourcePath + '/images/icons/page_white_stack.png', + cls: 'x-btn-text-icon', + value: 'default', + menu: { + items: [ + { + text: 'Default Realm Users', + checked: true, + handler: this.showUsers, + value: 'default', + group: 'user-realm-selector', + scope: this + }, + { + text: 'All Users With Nexus Roles', + checked: false, + handler: this.showUsers, + group: 'user-realm-selector', + value: 'allConfigured', + scope: this + } + ] + } + } ); + this.searchField = new Ext.app.SearchField( { searchPanel: this, width: 240, - emptyText: 'Show All Users With Nexus Roles' + emptyText: 'Display All', + + onTrigger2Click : function(){ + var v = this.getRawValue(); + this.searchPanel.startSearch( this.searchPanel ); + } } ); Sonatype.Events.on( 'userAddMenuInit', this.onAddMenuInit, this ); @@ -58,7 +90,7 @@ Sonatype.repoServer.UserEditPanel = function( config ) { deleteButton: this.sp.checkPermission( 'nexus:users', this.sp.DELETE ), rowClickEvent: 'userViewInit', rowContextClickEvent: 'userMenuInit', - url: Sonatype.config.repos.urls.plexusUsersAllConfigured, + url: Sonatype.config.repos.urls.plexusUsersDefault, dataAutoLoad: true, dataId: 'userId', columns: [ @@ -112,25 +144,7 @@ Sonatype.repoServer.UserEditPanel = function( config ) { }, tbar: [ ' ', - { - text: 'Find', - icon: Sonatype.config.resourcePath + '/images/icons/search.gif', - cls: 'x-btn-text-icon', - menu: { - items: [ - { - text: 'Show Default Realm Users', - handler: this.showDefaultUsers, - scope: this - }, - { - text: 'Show All Users With Nexus Roles', - handler: this.showMappedUsers, - scope: this - } - ] - } - }, + this.displaySelector, this.searchField ] } ); @@ -255,7 +269,7 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { refreshHandler: function( button, e ) { this.clearCards(); if ( this.lastUrl ) { - this.searchByUrl( this.lastUrl ); + this.searchByUrl(); } else { this.dataStore.reload(); @@ -299,12 +313,11 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { } }, - searchByUrl: function( url ) { - this.lastUrl = url; + searchByUrl: function() { this.gridPanel.loadMask.show(); Ext.Ajax.request( { scope: this, - url: url, + url: this.lastUrl, callback: function( options, success, response ) { this.gridPanel.loadMask.hide(); if ( success ) { @@ -320,23 +333,26 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { } ); }, - showDefaultUsers: function( button, e ) { - this.searchField.emptyText = button.text; - this.stopSearch( this ); - this.searchByUrl( Sonatype.config.repos.urls.plexusUsersDefault ); - }, - - showMappedUsers: function( button, e ) { - this.searchField.emptyText = button.text; - this.stopSearch( this ); - this.searchByUrl( Sonatype.config.repos.urls.plexusUsersAllConfigured ); + showUsers: function( button, e ) { + this.displaySelector.setText( button.text ); + this.displaySelector.value = button.value; + this.calculateSearchUrl( this ); }, startSearch: function( panel ) { - this.searchField.emptyText = null; - panel.searchField.triggers[0].show(); - panel.searchByUrl( Sonatype.config.repos.urls.searchUsers + '/all/' + - panel.searchField.getValue() ); + panel.calculateSearchUrl( panel ); + panel.searchByUrl(); + }, + + calculateSearchUrl: function( panel ) { + var v = panel.searchField.getValue(); + var prefix = '/' + panel.displaySelector.value; + if ( v.length > 0 ) { + panel.lastUrl = Sonatype.config.repos.urls.searchUsers + prefix + '/' + panel.searchField.getValue(); + } + else { + panel.lastUrl = Sonatype.config.repos.urls.plexusUsers + prefix; + } }, stopSearch: function( panel ) { From 9f9c1540eca47db2d629706ce7adb5638f157cfd Mon Sep 17 00:00:00 2001 From: juven Date: Tue, 6 Jan 2009 06:19:03 +0000 Subject: [PATCH 07/11] [NEXUS-1297] resolved git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2900 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- .../HttpVerbMappingAuthorizationFilter.java | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/nexus-rest-api/src/main/java/org/sonatype/nexus/security/filter/authz/HttpVerbMappingAuthorizationFilter.java b/nexus-rest-api/src/main/java/org/sonatype/nexus/security/filter/authz/HttpVerbMappingAuthorizationFilter.java index 0eb24ee209..6eb9c46b9a 100644 --- a/nexus-rest-api/src/main/java/org/sonatype/nexus/security/filter/authz/HttpVerbMappingAuthorizationFilter.java +++ b/nexus-rest-api/src/main/java/org/sonatype/nexus/security/filter/authz/HttpVerbMappingAuthorizationFilter.java @@ -112,14 +112,32 @@ protected boolean onAccessDenied( ServletRequest request, ServletResponse respon { Subject subject = getSubject( request, response ); - getLogger().info( - "Unable to authorize user [" + subject.getPrincipal() + "] for " + getActionFromHttpVerb( request ) - + " to " + ( (HttpServletRequest) request ).getRequestURI() + " from address/host [" - + request.getRemoteAddr() + "/" + request.getRemoteHost() + "]" ); + if ( !isAnonymousUser( request, subject ) ) + { + getLogger().debug( + "Unable to authorize user [" + subject.getPrincipal() + "] for " + getActionFromHttpVerb( request ) + + " to " + ( (HttpServletRequest) request ).getRequestURI() + " from address/host [" + + request.getRemoteAddr() + "/" + request.getRemoteHost() + "]" ); + } request.setAttribute( NexusJSecurityFilter.REQUEST_IS_AUTHZ_REJECTED, Boolean.TRUE ); return false; } + protected boolean isAnonymousUser( ServletRequest request, Subject subject ) + { + if ( !getNexus( request ).isAnonymousAccessEnabled() ) + { + return false; + } + + if ( getNexus( request ).getAnonymousUsername().equals( subject.getPrincipal() ) ) + { + return true; + } + + return false; + } + } From 2e4f74bb48d8c656b78996e7bccdb66d58bb0191 Mon Sep 17 00:00:00 2001 From: tstevens Date: Tue, 6 Jan 2009 18:23:11 +0000 Subject: [PATCH 08/11] NEXUS-1321, added REST resouce for User Locators git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2902 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- ...serLocatorComponentListPlexusResource.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 nexus-rest-api/src/main/java/org/sonatype/nexus/rest/users/UserLocatorComponentListPlexusResource.java diff --git a/nexus-rest-api/src/main/java/org/sonatype/nexus/rest/users/UserLocatorComponentListPlexusResource.java b/nexus-rest-api/src/main/java/org/sonatype/nexus/rest/users/UserLocatorComponentListPlexusResource.java new file mode 100644 index 0000000000..0639782b82 --- /dev/null +++ b/nexus-rest-api/src/main/java/org/sonatype/nexus/rest/users/UserLocatorComponentListPlexusResource.java @@ -0,0 +1,32 @@ +package org.sonatype.nexus.rest.users; + +import org.codehaus.plexus.component.annotations.Component; +import org.restlet.data.Request; +import org.sonatype.jsecurity.locators.users.PlexusUserLocator; +import org.sonatype.nexus.rest.component.AbstractComponentListPlexusResource; +import org.sonatype.plexus.rest.resource.PathProtectionDescriptor; +import org.sonatype.plexus.rest.resource.PlexusResource; + +@Component( role = PlexusResource.class, hint = "UserLocatorComponentListPlexusResource" ) +public class UserLocatorComponentListPlexusResource + extends AbstractComponentListPlexusResource +{ + + @Override + public String getResourceUri() + { + return "/components/userLocators"; + } + + public PathProtectionDescriptor getResourceProtection() + { + return new PathProtectionDescriptor( getResourceUri(), "authcBasic,perms[nexus:componentsuserlocatortypes]" ); + } + + @Override + protected String getRole( Request request ) + { + return PlexusUserLocator.class.getName(); + } + +} From 60fe47a183c0bec04cc3214bde80da5b02d09c48 Mon Sep 17 00:00:00 2001 From: tstevens Date: Tue, 6 Jan 2009 18:48:48 +0000 Subject: [PATCH 09/11] NEXUS-1321, updated static-security.xml with privilege for resource git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2903 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- .../META-INF/nexus/static-security.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/nexus-configuration/src/main/resources/META-INF/nexus/static-security.xml b/nexus-configuration/src/main/resources/META-INF/nexus/static-security.xml index 031f137c5c..70c0083a62 100644 --- a/nexus-configuration/src/main/resources/META-INF/nexus/static-security.xml +++ b/nexus-configuration/src/main/resources/META-INF/nexus/static-security.xml @@ -214,7 +214,8 @@ 39 40 41 - 72 + 72 + 75 @@ -1490,6 +1491,22 @@ nexus:componentsrepotypes + + + 75 + method + User Locator Types Component - (read) + Give permission to retrieve the list of User Locator types supported by nexus. + + + method + read + + + permission + nexus:componentsuserlocatortypes + + From 6caeab523cdd379eb59e31b770a320a558623dab Mon Sep 17 00:00:00 2001 From: mpowers Date: Tue, 6 Jan 2009 22:49:13 +0000 Subject: [PATCH 10/11] updated to new plexus-restlet-bridge release to add support for text/html git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2905 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e02abbd331..88416c962d 100644 --- a/pom.xml +++ b/pom.xml @@ -121,7 +121,7 @@ 2.1-SONATYPE-653485 1.1.2.3 - 1.6 + 1.7-SNAPSHOT 1.0.2 1.0.0-alpha-2-722647 From c8134adae42648c8f35c69d0ef3082cde0e70041 Mon Sep 17 00:00:00 2001 From: dip Date: Wed, 7 Jan 2009 00:15:56 +0000 Subject: [PATCH 11/11] NXCM-322: realm selection added to the list git-svn-id: file:///opt/svn/repositories/sonatype.org/nexus/branches/nexus-1.2.x/nexus@2906 2aa8b3fc-8ebb-4439-a84f-95066eaea8ab --- .../src/main/webapp/js/Sonatype.config.js | 1 + .../js/repoServer/repoServer.UserEditPanel.js | 75 +++++++++++++++---- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/nexus-webapp/src/main/webapp/js/Sonatype.config.js b/nexus-webapp/src/main/webapp/js/Sonatype.config.js index 6dc8fab3c8..f4d9f98ba7 100644 --- a/nexus-webapp/src/main/webapp/js/Sonatype.config.js +++ b/nexus-webapp/src/main/webapp/js/Sonatype.config.js @@ -101,6 +101,7 @@ Sonatype.config = function() { plexusUsersAllConfigured: servicePath + '/plexus_users/allConfigured', plexusUsersDefault: servicePath + '/plexus_users/default', plexusUsers: servicePath + '/plexus_users', + userLocators: servicePath + '/components/userLocators', searchUsers: servicePath + '/user_search', plexusUser: servicePath + '/plexus_user', userToRoles: servicePath + '/user_to_roles', diff --git a/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js b/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js index 9e3c982b83..9bc2f56225 100644 --- a/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js +++ b/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js @@ -45,36 +45,48 @@ Sonatype.repoServer.UserEditPanel = function( config ) { }; this.displaySelector = new Ext.Button( { - text: 'Default Realm Users', + text: 'All Configured Users', icon: Sonatype.config.resourcePath + '/images/icons/page_white_stack.png', cls: 'x-btn-text-icon', - value: 'default', + value: 'allConfigured', menu: { + id: 'user-realm-selector-menu', items: [ { - text: 'Default Realm Users', - checked: true, - handler: this.showUsers, - value: 'default', - group: 'user-realm-selector', - scope: this - }, - { - text: 'All Users With Nexus Roles', + text: 'All Users', checked: false, handler: this.showUsers, + value: 'all', group: 'user-realm-selector', - value: 'allConfigured', scope: this } ] } } ); + + this.sourceStore = new Ext.data.JsonStore( { + root: 'data', + id: 'roleHint', + autoLoad: true, + url: Sonatype.config.repos.urls.userLocators, + sortInfo: { field: 'description', direction: 'ASC' }, + fields: [ + { name: 'roleHint' }, + { name: 'description', sortType:Ext.data.SortTypes.asUCString } + ], + listeners: { + load: { + fn: this.loadSources, + scope: this + } + } + } ); this.searchField = new Ext.app.SearchField( { searchPanel: this, - width: 240, - emptyText: 'Display All', + disabled: true, + width: 250, + emptyText: 'Select a filter to enable username search', onTrigger2Click : function(){ var v = this.getRawValue(); @@ -90,7 +102,7 @@ Sonatype.repoServer.UserEditPanel = function( config ) { deleteButton: this.sp.checkPermission( 'nexus:users', this.sp.DELETE ), rowClickEvent: 'userViewInit', rowContextClickEvent: 'userMenuInit', - url: Sonatype.config.repos.urls.plexusUsersDefault, + url: Sonatype.config.repos.urls.plexusUsersAllConfigured, dataAutoLoad: true, dataId: 'userId', columns: [ @@ -314,6 +326,7 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { }, searchByUrl: function() { + this.clearCards(); this.gridPanel.loadMask.show(); Ext.Ajax.request( { scope: this, @@ -336,7 +349,20 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { showUsers: function( button, e ) { this.displaySelector.setText( button.text ); this.displaySelector.value = button.value; - this.calculateSearchUrl( this ); + + if ( button.value == 'allConfigured' ) { + this.searchField.emptyText = 'Select a filter to enable username search'; + this.searchField.setValue( '' ); + this.searchField.disable(); + this.calculateSearchUrl( this ); + this.searchByUrl(); + } + else { + this.searchField.emptyText = 'Enter a username or leave blank to display all'; + this.searchField.setValue( '' ); + this.searchField.enable(); + this.calculateSearchUrl( this ); + } }, startSearch: function( panel ) { @@ -469,6 +495,23 @@ Ext.extend( Sonatype.repoServer.UserEditPanel, Sonatype.panels.GridViewer, { } ); } } + }, + + loadSources: function( store, records, options ) { + var menu = Ext.menu.MenuMgr.get( 'user-realm-selector-menu' ); + + for ( var i = 0; i < records.length; i++ ) { + var rec = records[i]; + var v = rec.data.roleHint; + menu.addMenuItem( { + text: v == 'default' ? 'Default Realm Users' : rec.data.description, + value: v, + checked: v == 'allConfigured', + handler: this.showUsers, + group: 'user-realm-selector', + scope: this + } ); + } } } );