diff --git a/src/js/index.js b/src/js/index.js index 67be9f636..d55a308b0 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -144,7 +144,7 @@ app.filter('appIsInstalledAndHealthy', function () { }; }); -app.filter('applicationLink', function() { +app.filter('applicationLink', function () { return function(app) { if (!app) return ''; @@ -156,6 +156,19 @@ app.filter('applicationLink', function() { }; }); +app.filter('userManagementFilter', function () { + return function(apps, option) { + return apps.filter(function (app) { + if (option.id === '') return true; + if (option.id === 'sso') return !!(app.manifest.optionalSso || app.manifest.addons.ldap || app.manifest.addons.proxyAuth); + if (option.id === 'nosso') return app.manifest.optionalSso || (!app.manifest.addons.ldap && !app.manifest.addons.proxyAuth); + if (option.id === 'email') return !!app.manifest.addons.email; + + return false; + }); + }; +}); + // this appears when an item in app grid is clicked app.filter('prettyAppErrorMessage', function () { return function (app) { diff --git a/src/views/appstore.html b/src/views/appstore.html index 0161f1c5f..0f1073963 100644 --- a/src/views/appstore.html +++ b/src/views/appstore.html @@ -295,6 +295,16 @@ +