MNT-23204: Group Search (#1558) (#1587)

(cherry picked from commit 93a7790d44)

Co-authored-by: rrajoria <88024787+rrajoria@users.noreply.github.com>
This commit is contained in:
evasques
2022-11-30 16:34:24 +00:00
committed by GitHub
parent 0d4865c74c
commit d267908b09

View File

@@ -3,12 +3,13 @@ function main()
// Get the args
var siteShortName = url.templateArgs.shortname,
site = siteService.getSite(siteShortName),
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]",
maxResults = (args.maxResults == null) ? 10 : parseInt(args.maxResults, 10),
authorityType = args.authorityType,
zone = args.zone,
sortBy = args.sortBy,
sortAsc = args.dir != "desc";
var filter;
if (authorityType != null)
@@ -28,6 +29,7 @@ function main()
if (authorityType == null || authorityType == "USER")
{
filter = ((args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "" )+ " [hint:useCQ]";
// Get the collection of people
peopleFound = sortBy != null ? people.getPeople(filter, maxResults, sortBy, sortAsc) : people.getPeople(filter, maxResults);
@@ -67,6 +69,7 @@ function main()
if (authorityType == null || authorityType == "GROUP")
{
filter = (args.filter != null) ? args.filter : (args.shortNameFilter != null) ? args.shortNameFilter : "";
// Get the collection of groups
paging = utils.createPaging(maxResults, -1);
groupsFound = groups.getGroupsInZone(filter, zone, paging, "displayName");
@@ -96,4 +99,4 @@ function contains(arr, value) {
return false;
}
main();
main();