The Goal is to implement a Automated Group Sync.
For all groups that are listed in the group synchronization, then:
1/ In the XWiki admin group list, next to each group display a button to "Import/update group" ("Importer/mettre à jour le groupe". When clicking on the button it should
1a/ create all missing users
1b/ sync the data of all already created users
1c/ add the user to the group
A confirmation screen should display the number of users found before launching the sync:
" users have be found in the LDAP group and will be imported or updated"
" utilisateurs ont été trouvés dans le groupe LDAP et vont être importés ou mis à jour"
"Confirm"
"Confirmer"
An API already exists in the ldap tools to get all users corresponding to a group as configured in the LDAP group sync.
Make sure proper exception trapping will allow to continue the sync even if there is an error in the previous user imported/synced.
2/ If a property of ldap is set to 1, then a scheduler job should automatically run the sync for all groups in the LDAP group sync.
The scheduler job should run at 4:30 am in the morning by default.
Make sure proper exception trapping will allow to continue the sync even if there is an error in the previous group/user imported/synced.
The same result as in 1 is expected with users created, updated and added to the group
3/ (priority low) A button "Associate LDAP Group" should be displayed next to each group not listed in the LDAP group sync. When clicking on this button it should be possible to search for a group.
The search should search in the "cn" field for entries having on the objectClass listed in the configuration "xwiki.authentication.ldap.group_classes" in the LDAP config. See https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/
When selecting the group, the UI should add the group to the LDAP Group sync configuration and reload the group list. When reloading the button "Import/update group" from 1/ should be displayed.