Issue (View Online)

Key: NXP-808
Issue Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Olivier Grisel
Reporter: Damien Metzler

Operations

View all
View comments
View history
getSuggestedGroups method in the PrinicpalListManager is no accurate 
Updated: 28/03/07 16:52   Created: 28/03/07 09:58  

The following issue has been updated.

Updater: Thierry Delprat
Date: 28/03/07 16:52

Field Original Value New Value
Change By Thierry Delprat on 28/03/07 16:52
Assignee Thierry Delprat Olivier Grisel
Fix Version/s 5.1 M2

Project: Nuxeo Enterprise Platform 5
Components: Security
Affects Versions: 5.1 M1
Fix Versions: 5.1 M2

 Description   
in org.nuxeo.ecm.webapp.security the getSuggestedGroups method retrieves all groups from the groupDirectory and the search if the name of the groups contains the pattern searched.

This works well if there are a few groups, but in a LDAP context there can be hundreds of groups. For my purpose, i limited the number of items a directory search can return : if the max number of item is reached no item is returned... (see NXP-800). In this case, the getSuggestedGroups method can't work.

I changed it so that it uses the same method as the getSuggestedUsers : it now uses a direct search via the searchGroups method of the UserManager.

===================================================
public List<NuxeoGroup> getSuggestedGroups() {
     this.searchOverflow = false;

        if ((this.searchFilter == null) || (this.searchFilter.length() == 0)) {
            return new ArrayList<NuxeoGroup>();
        }

        List<NuxeoGroup> result;

        try {
           result = userManager.searchGroups(this.searchFilter);
        } catch (ClientException e) {
            e.printStackTrace();
            return new ArrayList<NuxeoGroup>();
        }

        if(result.size()> MAX_SEARCH_RESULTS) {
            this.searchOverflow = true;
            return new ArrayList<NuxeoGroup>();
        }

        return result;
    }


===================================================

This message was automatically generated by Atlassian JIRA Enterprise Edition, Version: 3.7.2-186 - Bug/feature request.
If you think it was sent incorrectly, contact one of this server's administrators.

_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to