If you are mapping all your external users to a single organization, you can assign roles to users statically. This lets you specify a list of administrative users and roles, as well as a list of roles for non-administrative users. To define user roles statically, use the externalUserSetupProcessor or mtExternalUserSetupProcessor bean. To set up static roles, locate the version of the bean that is used in your sample file and configure the following properties:
| • | adminUserNames property – A list of usernames that are granted internal administrator privileges in JasperReports Server. The username values must match exactly the usernames authenticated and returned by the external authority. |
| • | defaultAdminRoles property – A list of JasperReports Server internal roles; these are assigned to every user in the list of administrators. |
| • | defaultInternalRoles property – A list of JasperReports Server roles that are assigned to every user not in the list of administrators. |
The following example shows how to use the externalUserSetupProcessor bean to define static roles. The configuration for mtExternalUserSetupProcessor is identical:
<bean id=externalUserSetupProcessor" class="com.jaspersoft.jasperserver.api.metadata. user.service.impl.UserDetailsServiceImpl"> ... <property name="adminUsernames"> <list> <value>myorgadmin</value> </list> </property>[/code] |
<property name="defaultAdminRoles"> <list> <value>ROLE_USER</value> <value>ROLE_ADMINISTRATOR</value> </list> </property>[/code] |
<property name="defaultInternalRoles"> <list> <value>ROLE_USER</value> </list> </property>[/code] ...[/code] |
Recommended Comments
There are no comments to display.