Synchronize LDAP groups with local group model.

def sync_groups(self):
        """Synchronize LDAP groups with local group model."""
        if self.settings.GROUP_FILTER:
            ldap_groups = self.ldap.search(self.settings.GROUP_FILTER, self.settings.GROUP_ATTRIBUTES.keys())
            self._sync_ldap_groups(ldap_groups)
            logger.info("Groups are synchronized")