make it clear what app password gives access to

This commit is contained in:
Girish Ramakrishnan
2021-02-03 13:10:03 -08:00
parent 5f0889c281
commit 4d2ba3b082

View File

@@ -428,11 +428,14 @@ angular.module('Application').controller('ProfileController', ['$scope', '$trans
if (app.manifest.addons.email) return;
var ftp = app.manifest.addons.localstorage && app.manifest.addons.localstorage.ftp;
var sso = app.sso && (app.manifest.addons.ldap || app.manifest.addons.proxyAuth);
if (!ftp && !(app.sso && (app.manifest.addons.ldap || app.manifest.addons.proxyAuth))) return;
if (!ftp && !sso) return;
appsById[app.id] = app;
var labelSuffix = ftp ? ' - SFTP' : '';
var labelSuffix = '';
if (ftp && sso) labelSuffix = ' - SFTP & App Login';
else if (ftp) labelSuffix = ' - SFTP Only';
var label = app.label ? app.label + ' (' + app.fqdn + ')' + labelSuffix : app.fqdn + labelSuffix;
$scope.appPassword.identifiers.push({ id: app.id, label: label });
});