diff --git a/src/js/index.js b/src/js/index.js index 42fd6ee9d..a14488dc6 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -196,6 +196,21 @@ app.filter('selectedStateFilter', function () { }; }); +app.filter('selectedGroupAccessFilter', function () { + return function selectedGroupAccessFilter(apps, group) { + return apps.filter(function (app) { + if (!group.id) return true; // case for no filter entry + if (!app.accessRestriction) return true; + + if (!app.accessRestriction.groups) return false; + + if (app.accessRestriction.groups.indexOf(group.id) !== -1) return true; + + return false; + }); + }; +}); + app.filter('selectedTagFilter', function () { return function selectedTagFilter(apps, selectedTags) { return apps.filter(function (app) { diff --git a/src/views/apps.html b/src/views/apps.html index 2f824b5b4..fc6d2995a 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -107,6 +107,7 @@