Add access control group filter

This commit is contained in:
Johannes Zellner
2021-02-16 20:10:11 +01:00
parent b7bc5d38bd
commit 3098917d55
3 changed files with 26 additions and 1 deletions

View File

@@ -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) {