@@ -119,9 +119,11 @@ public static ResponseEntity<DataResource> readResource(RepoBaseConfiguration ap
119119
120120 if (currentVersion > 0 ) {
121121 //trigger response creation and set etag...the response body is set automatically
122- return ResponseEntity .ok ().eTag ("\" " + resource .getEtag () + "\" " ).header ("Resource-Version" , Long .toString ((version != null ) ? version : currentVersion )).body (filterResource (resource ));
122+ //return ResponseEntity.ok().eTag("\"" + resource.getEtag() + "\"").header("Resource-Version", Long.toString((version != null) ? version : currentVersion)).body(filterResource(resource));
123+ return ResponseEntity .ok ().eTag ("\" " + resource .getEtag () + "\" " ).header ("Resource-Version" , Long .toString ((version != null ) ? version : currentVersion )).body (resource );
123124 } else {
124- return ResponseEntity .ok ().eTag ("\" " + resource .getEtag () + "\" " ).body (filterResource (resource ));
125+ //return ResponseEntity.ok().eTag("\"" + resource.getEtag() + "\"").body(filterResource(resource));
126+ return ResponseEntity .ok ().eTag ("\" " + resource .getEtag () + "\" " ).body (resource );
125127 }
126128 }
127129
@@ -370,7 +372,7 @@ public static Optional<String> getAuditInformation(RepoBaseConfiguration applica
370372 * @param resource data resource.
371373 * @return data resource without acls.
372374 */
373- public static DataResource filterResource (DataResource resource ) {
375+ /* public static DataResource filterResource(DataResource resource) {
374376 if (!AuthenticationHelper.isAuthenticatedAsService() && !DataResourceUtils.hasPermission(resource, PERMISSION.ADMINISTRATE) && !AuthenticationHelper.hasAuthority(RepoUserRole.ADMINISTRATOR.toString())) {
375377 LOGGER.debug("Removing ACL information from resources due to non-administrator access.");
376378 //exclude ACLs if not administrate or administrator permissions are set
@@ -380,15 +382,15 @@ public static DataResource filterResource(DataResource resource) {
380382 }
381383
382384 return resource;
383- }
385+ }*/
384386
385387 /**
386388 * Remove ACLs from a list of data resources.
387389 *
388390 * @param resources list of data resources.
389391 * @return list of data resources without acls.
390392 */
391- public static List <DataResource > filterResources (List <DataResource > resources ) {
393+ /* public static List<DataResource> filterResources(List<DataResource> resources) {
392394
393395 if (!AuthenticationHelper.isAuthenticatedAsService() && !AuthenticationHelper.hasAuthority(RepoUserRole.ADMINISTRATOR.toString())) {
394396 LOGGER.debug("Removing ACL information from resources due to non-administrator access.");
@@ -402,7 +404,7 @@ public static List<DataResource> filterResources(List<DataResource> resources) {
402404 }
403405
404406 return resources;
405- }
407+ }*/
406408
407409 public static Collection <? extends GrantedAuthority > getUserAuthorities (DataResource resource ) {
408410 LOGGER .trace ("Determining user grants from authorization context." );
@@ -494,7 +496,6 @@ public static void performPermissionCheck(DataResource resource, PERMISSION requ
494496 } else {
495497 LOGGER .debug ("{} permission to resource granted to principal with identifiers {}." , requiredPermission , AuthenticationHelper .getAuthorizationIdentities ());
496498 }
497-
498499 }
499500
500501 /**
0 commit comments