DS-3572: Check authorization for a specified user instead of currentUser

This commit is contained in:
Pascal-Nicolas Becker
2017-04-13 18:26:36 +02:00
parent 56dcd2d915
commit ff4b7f00fa
7 changed files with 149 additions and 52 deletions

View File

@@ -15,6 +15,7 @@ import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.*;
import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.eperson.EPerson;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -147,6 +148,7 @@ public class InstallItemTest extends AbstractUnitTest
Constants.ADD); result = false;
// Allow full Admin perms
authorizeService.isAdmin((Context) any); result = true;
authorizeService.isAdmin((Context) any, (EPerson) any); result = true;
}};
String handle = "123456789/56789";