pramodkrjsr Posted January 6, 2011 Share Posted January 6, 2011 I want to print the tenant name with username on the home page. What to do?I need something like below as getting tenantIdOption-1Object principal = org.springframework.security.context.SecurityContextHolder.getContext().getAuthentication().getPrincipal();String tenantId = ((com.jaspersoft.jasperserver.api.metadata.user.domain.TenantQualified) principal).getTenantId(); Option-2<authz:authentication property="principal.tenantId"/>I am using jasperserver-pro-3.7.1 Thanks in advance Link to comment Share on other sites More sharing options...
mdahlman Posted January 7, 2011 Share Posted January 7, 2011 Try inserting something like this:<p>You belong to <%= ((com.jaspersoft.jasperserver.api.metadata.user.domain.impl.client.MetadataUserDetails)org.springframework.security.context.SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getTenantId() %></p>Does that get you want you need?Regards,Matt Link to comment Share on other sites More sharing options...
pramodkrjsr Posted January 12, 2011 Author Share Posted January 12, 2011 This will show the tenantId and not the name.I need to print Database = jasperservertable = JITenantColumn = tenantName Link to comment Share on other sites More sharing options...
mdahlman Posted January 13, 2011 Share Posted January 13, 2011 It seems like it should be easy to get the tenant info once you have the ID using the class TenantServiceImpl. But I haven't tried it.Have you tried this? What problem do you encounter? Have you asked the technical support team yet?Regards,Matt Link to comment Share on other sites More sharing options...
iggi Posted February 10, 2015 Share Posted February 10, 2015 Matt, could you throw some light on this discussion on how to get Tenant Name into my Report Title in Studio, something like how I am able to get the Tenant ID using this $P{LoggedInUserTenantId}? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now