mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Add fix from DS-4530
This commit is contained in:
@@ -323,6 +323,14 @@
|
||||
<artifactId>apache-jena-libs</artifactId>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<!-- This was added to support the pubmed api call -->
|
||||
<!-- Makes runtime operations in Jersey Dependency Injection -->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jersey.inject</groupId>
|
||||
<artifactId>jersey-hk2</artifactId>
|
||||
<version>${jersey.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
|
@@ -34,6 +34,7 @@ import org.dspace.app.rest.security.DSpacePermissionEvaluator;
|
||||
import org.dspace.app.rest.security.WebSecurityExpressionEvaluator;
|
||||
import org.dspace.app.rest.utils.Utils;
|
||||
import org.dspace.services.RequestService;
|
||||
import org.springframework.aop.support.AopUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
|
||||
@@ -51,6 +52,8 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* Converts domain objects from the DSpace service layer to rest objects, and from rest objects to resource
|
||||
* objects, applying {@link Projection}s where applicable.
|
||||
*
|
||||
* @author Luca Giamminonni (luca.giamminonni at 4science dot it)
|
||||
*/
|
||||
@Service
|
||||
public class ConverterService {
|
||||
@@ -150,7 +153,8 @@ public class ConverterService {
|
||||
.getResourceRepositoryByCategoryAndModel(baseObjectRest.getCategory(), baseObjectRest.getType());
|
||||
Annotation preAuthorize = null;
|
||||
int maxDepth = 0;
|
||||
for (Method m : repositoryToUse.getClass().getMethods()) {
|
||||
// DS-4530 exclude the AOP Proxy from determining the annotations
|
||||
for (Method m : AopUtils.getTargetClass(repositoryToUse).getMethods()) {
|
||||
if (StringUtils.equalsIgnoreCase(m.getName(), "findOne")) {
|
||||
int depth = howManySuperclass(m.getDeclaringClass());
|
||||
if (depth > maxDepth) {
|
||||
|
Reference in New Issue
Block a user