]> source.dussan.org Git - archiva.git/commitdiff
fix browse for directories
authorOlivier Lamy <olamy@apache.org>
Sun, 26 Feb 2012 22:12:25 +0000 (22:12 +0000)
committerOlivier Lamy <olamy@apache.org>
Sun, 26 Feb 2012 22:12:25 +0000 (22:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293946 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/BrowseService.java
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/search.html

index 758a52c941e83333cea8f7c70cf55542fae1572a..89a4ff6b971eebbd885ff625f30cc8ad7f5d1b49 100644 (file)
@@ -39,28 +39,28 @@ public interface BrowseService
     @Path( "rootGroups" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true, noPermission = false )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
     BrowseResult getRootGroups()
         throws ArchivaRestServiceException;
 
     @Path( "browseGroupId/{groupId}" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true, noPermission = false )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
     BrowseResult browseGroupId( @PathParam( "groupId" ) String groupId )
         throws ArchivaRestServiceException;
 
     @Path( "versionsList/{g}/{a}" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true, noPermission = false )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
     VersionsList getVersionsList( @PathParam( "g" ) String groupId, @PathParam( "a" ) String artifactId )
         throws ArchivaRestServiceException;
 
     @Path( "projectVersionMetadata/{g}/{a}" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true, noPermission = false )
+    @RedbackAuthorization( noPermission = true, noRestriction = true )
     ProjectVersionMetadata getProjectVersionMetadata( @PathParam( "g" ) String groupId,
                                                       @PathParam( "a" ) String artifactId )
         throws ArchivaRestServiceException;
index df87ddfaa7a0bbd527292128a8faacb975b7c30b..574ebea20d762544784904723f461369e894c977 100644 (file)
@@ -129,7 +129,6 @@ $(function() {
   }
 
   displayArtifactDetail=function(groupId,artifactId,parentBrowseViewModel,restUrl){
-    $.log("displayArtifactDetail:"+groupId+":"+artifactId);
     var artifactDetailViewModel=new ArtifactDetailViewModel(groupId,artifactId);
     var mainContent = $("#main-content");
     mainContent.find("#browse_result").hide();
index 0595454b68421416fac33c0bbbb4267ea39c0c13..4efd7d34d3450dd4f04957ef598f31a7f7e020c9 100644 (file)
@@ -48,7 +48,7 @@
         </li>
       {{/if}}
       {{each(i,browseResultEntry) browseResultEntries}}
-        {{if browseResultEntry.project}}
+        {{if browseResultEntry.project=='true'}}
           <li class="browse-list-project" title="artifact" data-bind="click:function(){displayProjectEntry(browseResultEntry.name)}">
         {{else}}
           <li class="browse-list" data-bind="click:function(){displayGroupId(browseResultEntry.name)}">