]> source.dussan.org Git - archiva.git/commitdiff
Changing upload permissions using parameter reference
authorMartin Stockhammer <m.stockhammer@web.de>
Wed, 14 Sep 2016 19:48:59 +0000 (21:48 +0200)
committerMartin Stockhammer <m.stockhammer@web.de>
Wed, 14 Sep 2016 19:48:59 +0000 (21:48 +0200)
Needs the new functionality in the redback annotations.

archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/FileUploadService.java

index d95db3da594bcc043eb413873e42b1796310b1ea..cf21a30baf1bb8de4a7f80a0ac1ffc3faeeaf5de 100644 (file)
@@ -70,7 +70,7 @@ public interface FileUploadService
     @Path( "save/{repositoryId}/{groupId}/{artifactId}/{version}/{packaging}" )
     @GET
     @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD )
+    @RedbackAuthorization( resource = "{repositoryId}", permissions = ArchivaRoleConstants.OPERATION_REPOSITORY_UPLOAD )
     Boolean save( @PathParam( "repositoryId" ) String repositoryId, @PathParam( "groupId" ) String groupId,
                   @PathParam( "artifactId" ) String artifactId, @PathParam( "version" ) String version,
                   @PathParam( "packaging" ) String packaging, @QueryParam( "generatePom" ) boolean generatePom )