diff --git a/DNN Platform/JavaScript Libraries/Selectize/dnn.combobox.js b/DNN Platform/JavaScript Libraries/Selectize/dnn.combobox.js
index 38bfc642389..8e7b5e68137 100644
--- a/DNN Platform/JavaScript Libraries/Selectize/dnn.combobox.js
+++ b/DNN Platform/JavaScript Libraries/Selectize/dnn.combobox.js
@@ -77,15 +77,18 @@
this.$control.find('input.summary').remove();
var $summary = $('').prependTo(this.$control);
- var options = this.get_options().length;
- var items = this.items.length;
+ var options = this.options;
+ var items = this.items;
+ var labels = items.map(function(i) {
+ return options[i][opts.labelField];
+ });
var summaryText = "";
- if (items === options) {
+ if (items.length === this.get_options().length) {
summaryText = opts.localization["AllItemsChecked"];
- } else if (items === 1) {
- summaryText = this.items.join(',');
+ } else if (items.length === 1) {
+ summaryText = labels.join(',');
} else {
- summaryText = items + ' ' + opts.localization["ItemsChecked"];
+ summaryText = items.length + ' ' + opts.localization["ItemsChecked"];
}
$summary.val(summaryText);
diff --git a/DNN Platform/Library/Services/Search/Controllers/UserResultController.cs b/DNN Platform/Library/Services/Search/Controllers/UserResultController.cs
index 60691afa92d..7ac02b6b802 100644
--- a/DNN Platform/Library/Services/Search/Controllers/UserResultController.cs
+++ b/DNN Platform/Library/Services/Search/Controllers/UserResultController.cs
@@ -94,6 +94,20 @@ public override bool HasViewPermission(SearchResult searchResult)
if (searchResult.UniqueKey.Contains("allusers"))
{
+ var scopeForRoles =
+ PortalController.GetPortalSetting("SearchResult_ScopeForRoles", searchResult.PortalId, string.Empty)
+ .Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
+
+ if (scopeForRoles.Count > 0)
+ {
+ if (userInSearchResult.IsSuperUser)
+ {
+ return scopeForRoles.Contains("Superusers");
+ }
+
+ return scopeForRoles.Any(i => userInSearchResult.IsInRole(i));
+ }
+
return true;
}
diff --git a/Website/DesktopModules/Admin/SearchResults/App_LocalResources/ResultsSettings.ascx.resx b/Website/DesktopModules/Admin/SearchResults/App_LocalResources/ResultsSettings.ascx.resx
index 520b15beaa9..d51cf96573d 100644
--- a/Website/DesktopModules/Admin/SearchResults/App_LocalResources/ResultsSettings.ascx.resx
+++ b/Website/DesktopModules/Admin/SearchResults/App_LocalResources/ResultsSettings.ascx.resx
@@ -153,6 +153,12 @@