As an option, 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 bean. The externalUserSetupProcessor bean is configured with the following:
| • | 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 CAS server. |
| • | 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:
<bean id="externalUserSetupProcessor" class="com.jaspersoft.jasperserver.api.metadata. user.service.impl.UserDetailsServiceImpl"> <property name="adminUsernames"> <list> <value>myorgadmin</value> </list> </property> <property name="defaultAdminRoles"> <list> <value>ROLE_USER</value> <value>ROLE_ADMINISTRATOR</value> </list> </property> <property name="defaultInternalRoles"> <list> <value>ROLE_USER</value> </list> </property>[/code] |
Recommended Comments
There are no comments to display.