Update user info in single sign on multitenancy

Platform is jasperserver 5.1 Enterprise. 

I've looked at MTUserAuthorityServiceImpl and UserAuthorityServiceImpl and the updateUser method is from the latter. It does not take tenant into account, an hence when I try to call: 

((MTUserAuthorityService)getUserAuthorityService()).updateUser(exCtx, userName, user);

it does not find what MTUserAuthorityServiceImpl has already loaded with getUser:

<span style="font-family:courier new,courier,monospace;"><span style="font-size: 12px;">java.lang.IllegalArgumentException: Cannot find user with name : kho0404ikt</span></span>
at com.jaspersoft.jasperserver.api.metadata.user.service.impl.UserAuthorityServiceImpl.updateUser(UserAuthorityServiceImpl.java:1696)
I thought I could make it by way of a little hack by using updateTenantForUser since it also saves the user, but the changes were not persisted for some reason. I have changed e-mail and name.

Is there a way to do this by the official API?

If not how would you recommend to proceed?

My plan would perhaps be to subclass MTUserAuthorityServiceImpl and add the "missing" method.

ketil.holden's picture
Joined: Aug 7 2013 - 7:48am
Last seen: 3 years 2 months ago

0 Answers:

No answers yet