A name is required
{{ appPasswordAdd.error.name }}
@@ -394,7 +394,7 @@
{{ password.name }}
- {{ password.prettyIdentifier }}
+ {{ password.label }}
|
diff --git a/src/views/profile.js b/src/views/profile.js
index 1459b6ced..6ca751091 100644
--- a/src/views/profile.js
+++ b/src/views/profile.js
@@ -396,13 +396,11 @@ angular.module('Application').controller('ProfileController', ['$scope', '$locat
if (error) console.error(error);
$scope.appPassword.passwords = result.appPasswords || [];
- $scope.appPassword.identifiers = [
- { id: 'mail', label: 'Email' },
- // { id: 'webadmin', label: 'Web Admin'}
- ];
+ $scope.appPassword.identifiers = [];
var appsById = {};
$scope.apps.forEach(function (app) {
- if (!app.manifest.addons || !app.manifest.addons.ldap) return;
+ // ignore apps without ldap or with email
+ if (!app.manifest.addons || !app.manifest.addons.ldap || app.manifest.addons.email || !app.sso) return;
appsById[app.id] = app;
if (app.label) {
@@ -411,17 +409,18 @@ angular.module('Application').controller('ProfileController', ['$scope', '$locat
$scope.appPassword.identifiers.push({ id: app.id, label: app.fqdn });
}
});
+ $scope.appPassword.identifiers.push({ id: 'mail', label: 'Mail client' });
- // setup prettyIdentifier for the UI
+ // setup label for the table UI
$scope.appPassword.passwords.forEach(function (password) {
- if (password.identifier === 'mail') return password.prettyIdentifier = password.identifier;
+ if (password.identifier === 'mail') return password.label = password.identifier;
var app = appsById[password.identifier];
- if (!app) return password.prettyIdentifier = password.identifier + ' (App not found)';
+ if (!app) return password.label = password.identifier + ' (App not found)';
if (app.label) {
- password.prettyIdentifier = app.label + ' (' + app.fqdn + ')';
+ password.label = app.label + ' (' + app.fqdn + ')';
} else {
- password.prettyIdentifier = app.fqdn;
+ password.label = app.fqdn;
}
});
});
|