Suppose the following environment
- LDAP directory with UserA
- Crowd with this LDAP directory as Delegate Directory. When users are added to this directory in Crowd, they should automatically be assigned to confluence-users group.
- Confluence with connector to the Crowd instance.
- Login as UserA. Make sure profile is created together with the record in user_mapping table and cwd_user table. Make sure user is searchable and is displayed in People Directory.
- Remove UserA from Crowd. It should still exist in LDAP.
- Perform directory sync in Confluence. Make sure user is not searchable now.
- Login as UserA in Confluence.
Expected behavior: user should be indexed and become searchable and it should be listed in People Directory.
Actual behavior: cwd_user record is created, but indexing is never triggered. User is not searchable and does not appear in People Directory.
One of the ways to solve the problem is to emit the indexing event in HibernateUserDao#add method. During testing it is important to check that it would work as expected in DC environment.