DS-3346 change and remove deprecated setIgnoreAuthorization in favour of turnOff/restore

This commit is contained in:
Luigi Andrea Pascarelli
2016-09-28 23:39:24 +02:00
parent ebeda8cc29
commit f577074e69
21 changed files with 32 additions and 47 deletions

View File

@@ -612,7 +612,7 @@ public class X509Authentication implements AuthenticationMethod
"from=x.509, email=" + email));
// TEMPORARILY turn off authorisation
context.setIgnoreAuthorization(true);
context.turnOffAuthorisationSystem();
eperson = ePersonService.create(context);
eperson.setEmail(email);
eperson.setCanLogIn(true);
@@ -620,7 +620,7 @@ public class X509Authentication implements AuthenticationMethod
eperson);
ePersonService.update(context, eperson);
context.dispatchEvents();
context.setIgnoreAuthorization(false);
context.restoreAuthSystemState();
context.setCurrentUser(eperson);
setSpecialGroupsFlag(request, email);
return SUCCESS;