Jump to content
We've recently updated our Privacy Statement, available here ×

adding roles on authorisation in multitenant enviroment


sjongenelen

Recommended Posts

Hi Guys,

Installing JS4 at the moment, and trying to config the following:

On user first authentication (LDAP in this case), add a role to his account.

This seemed easily done, but i think im lacking syntax skills! I need to add the role 'public' in the organisation 'organization_1'.
Although 'public' is an unique role name in my enviroment, it is still not added.

I think i need to specify organisation / ROLE  but i dont know how.

 

P.s. logger says: WARN UserAuthorityServiceImpl,http-8080-1:878 - Updated user: username. Roles are now:
public
ROLE_USER

Code:
<bean id="mtUserAuthorityServiceTarget"        class="com.jaspersoft.jasperserver.multipleTenancy.MTUserAuthorityServiceImpl">        <property name="sessionFactory" ref="sessionFactory"/>        <property name="objectMappingFactory" ref="mappingResourceFactory"/>        <property name="persistentClassFactory" ref="persistentMappings"/>        <property name="profileAttributeService" ref="profileAttributeService"/>        <property name="defaultInternalRoles">          <list>            <value>ROLE_USER</value>            <value>public</value>          </list>        </property>        <property name="multiTenancyConfiguration"><ref bean="multiTenancyConfiguration"/></property>        <property name="securityProvider"><ref local="tenantSecurityProvider"/></property>        <property name="securityContextProvider"><ref bean="${bean.securityContextProvider}"/></property>        <property name="tenantPersistenceResolver"><ref bean="${bean.hibernateTenantService}"/></property>        <property name="userProcessors">            <list>                <!-- For LDAP authentication -->                <!-- ref bean="ldapExternalUserProcessor"/-->                <ref bean="defaultExternalUserProcessor"/>            </list>        </property>        <property name="auditContext" ref="${bean.auditContext}"/>        <property name="databaseCharactersEscapeResolver" ref="databaseCharactersEscapeResolver"/>    </bean>
Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...