try {
getSecurityHelper().runAsSystem( new Callable<Void>() {
@Override
public Void call() throws Exception {
// Execute new tenant with the tenant id from the logged in user
lifecycleManager.newTenant( JcrTenantUtils.getTenant( principalName, true ) );
return null;
}
} );
} catch ( Exception e ) {
logger.error( e.getLocalizedMessage(), e );