KEYCLOAK-5795 Strip ids of client export from admin console
This commit is contained in:
parent
925d5e1dea
commit
de72542151
1 changed files with 9 additions and 2 deletions
|
@ -762,7 +762,14 @@ module.controller('ClientListCtrl', function($scope, realm, Client, serverInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.exportClient = function(client) {
|
$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();
|
updateTemplateRealmRoles();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue