fix saml admin console

This commit is contained in:
Bill Burke 2015-11-27 15:24:56 -05:00
parent 8ae3551c4d
commit 5fa59262ce

View file

@ -799,6 +799,63 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, $route, se
} else if ($scope.client.attributes['saml_name_id_format'] == 'persistent') {
$scope.nameIdFormat = $scope.nameIdFormats[3];
}
if ($scope.client.attributes["saml.server.signature"]) {
if ($scope.client.attributes["saml.server.signature"] == "true") {
$scope.samlServerSignature = true;
} else {
$scope.samlServerSignature = false;
}
}
if ($scope.client.attributes["saml.assertion.signature"]) {
if ($scope.client.attributes["saml.assertion.signature"] == "true") {
$scope.samlAssertionSignature = true;
} else {
$scope.samlAssertionSignature = false;
}
}
if ($scope.client.attributes["saml.client.signature"]) {
if ($scope.client.attributes["saml.client.signature"] == "true") {
$scope.samlClientSignature = true;
} else {
$scope.samlClientSignature = false;
}
}
if ($scope.client.attributes["saml.encrypt"]) {
if ($scope.client.attributes["saml.encrypt"] == "true") {
$scope.samlEncrypt = true;
} else {
$scope.samlEncrypt = false;
}
}
if ($scope.client.attributes["saml.authnstatement"]) {
if ($scope.client.attributes["saml.authnstatement"] == "true") {
$scope.samlAuthnStatement = true;
} else {
$scope.samlAuthnStatement = false;
}
}
if ($scope.client.attributes["saml_force_name_id_format"]) {
if ($scope.client.attributes["saml_force_name_id_format"] == "true") {
$scope.samlForceNameIdFormat = true;
} else {
$scope.samlForceNameIdFormat = false;
}
}
if ($scope.client.attributes["saml.multivalued.roles"]) {
if ($scope.client.attributes["saml.multivalued.roles"] == "true") {
$scope.samlMultiValuedRoles = true;
} else {
$scope.samlMultiValuedRoles = false;
}
}
if ($scope.client.attributes["saml.force.post.binding"]) {
if ($scope.client.attributes["saml.force.post.binding"] == "true") {
$scope.samlForcePostBinding = true;
} else {
$scope.samlForcePostBinding = false;
}
}
}
if (!$scope.create) {
@ -816,63 +873,6 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, $route, se
$scope.samlForceNameIdFormat = false;
}
if ($scope.client.attributes["saml.server.signature"]) {
if ($scope.client.attributes["saml.server.signature"] == "true") {
$scope.samlServerSignature = true;
} else {
$scope.samlServerSignature = false;
}
}
if ($scope.client.attributes["saml.assertion.signature"]) {
if ($scope.client.attributes["saml.assertion.signature"] == "true") {
$scope.samlAssertionSignature = true;
} else {
$scope.samlAssertionSignature = false;
}
}
if ($scope.client.attributes["saml.client.signature"]) {
if ($scope.client.attributes["saml.client.signature"] == "true") {
$scope.samlClientSignature = true;
} else {
$scope.samlClientSignature = false;
}
}
if ($scope.client.attributes["saml.encrypt"]) {
if ($scope.client.attributes["saml.encrypt"] == "true") {
$scope.samlEncrypt = true;
} else {
$scope.samlEncrypt = false;
}
}
if ($scope.client.attributes["saml.authnstatement"]) {
if ($scope.client.attributes["saml.authnstatement"] == "true") {
$scope.samlAuthnStatement = true;
} else {
$scope.samlAuthnStatement = false;
}
}
if ($scope.client.attributes["saml_force_name_id_format"]) {
if ($scope.client.attributes["saml_force_name_id_format"] == "true") {
$scope.samlForceNameIdFormat = true;
} else {
$scope.samlForceNameIdFormat = false;
}
}
if ($scope.client.attributes["saml.multivalued.roles"]) {
if ($scope.client.attributes["saml.multivalued.roles"] == "true") {
$scope.samlMultiValuedRoles = true;
} else {
$scope.samlMultiValuedRoles = false;
}
}
if ($scope.client.attributes["saml.force.post.binding"]) {
if ($scope.client.attributes["saml.force.post.binding"] == "true") {
$scope.samlForcePostBinding = true;
} else {
$scope.samlForcePostBinding = false;
}
}
$scope.importFile = function(fileContent){
console.debug(fileContent);