KEYCLOAK-5795 Strip ids of client export from admin console

This commit is contained in:
Stian Thorgersen 2017-11-13 19:09:41 +01:00 committed by Stian Thorgersen
parent 925d5e1dea
commit de72542151

View file

@ -762,7 +762,14 @@ module.controller('ClientListCtrl', function($scope, realm, Client, serverInfo,
};
$scope.exportClient = function(client) {
saveAs(new Blob([angular.toJson(client, 4)], { type: 'application/json' }), client.clientId + '.json');
var clientCopy = angular.copy(client);
delete clientCopy.id;
for (var i = 0; i < clientCopy.protocolMappers.length; i++) {
delete clientCopy.protocolMappers[i].id;
}
saveAs(new Blob([angular.toJson(clientCopy, 4)], { type: 'application/json' }), clientCopy.clientId + '.json');
}
});
@ -2332,4 +2339,4 @@ module.controller('ClientTemplateScopeMappingCtrl', function($scope, $http, real
};
updateTemplateRealmRoles();
});
});