MNT-23204: Group Search (#1558)

This commit is contained in:
rrajoria
2022-11-18 14:39:27 +05:30
committed by GitHub
parent 6e4bb33fb1
commit 93a7790d44

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();