mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-1999: Refactored AuthorityService.findAuthorities to support search options required by Alfresco Explorer client in efficient manner
- optional parentAuthority argument - when set will only search for authorities under a given group - optional immediate flag - when false means do a recursive search. When true means only return first level. When true and parentAuthority is null means root groups. - search expression - which is tested against the short name and the display name - reworked all existing calls for new semantics - this method is for UI search only - not for existence checking! - removed some ill-informed calls git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19203 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,7 +22,6 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.bean.spaces.InviteSpaceUsersWizard;
|
||||
|
||||
/**
|
||||
@@ -35,9 +34,10 @@ public class MailInviteSpaceUsersWizard extends InviteSpaceUsersWizard
|
||||
protected Set<String> getGroups(String search)
|
||||
{
|
||||
// groups - text search match on supplied name
|
||||
String term = PermissionService.GROUP_PREFIX + "*" + search + "*";
|
||||
String term = "*" + search + "*";
|
||||
Set<String> groups;
|
||||
groups = getAuthorityService().findAuthoritiesInZone(AuthorityType.GROUP, term, AuthorityService.ZONE_APP_DEFAULT);
|
||||
groups = getAuthorityService().findAuthorities(AuthorityType.GROUP, null, false, term,
|
||||
AuthorityService.ZONE_APP_DEFAULT);
|
||||
return groups;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user