X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fuser_management%2Fsrc%2FuserProfile%2FuserProfileSource.js;h=aaf10d7d284ccdf4b8adef09523e158e91dd2fce;hp=267387a4dea0ad7dbf21a51d2e6aef326ef206bf;hb=85a7a30702d8aad61f8e88709da411371caeb765;hpb=1cf9754552bff8deccef6710bc2cd60f508939e9 diff --git a/skyquake/plugins/user_management/src/userProfile/userProfileSource.js b/skyquake/plugins/user_management/src/userProfile/userProfileSource.js index 267387a4d..aaf10d7d2 100644 --- a/skyquake/plugins/user_management/src/userProfile/userProfileSource.js +++ b/skyquake/plugins/user_management/src/userProfile/userProfileSource.js @@ -17,34 +17,6 @@ if (DEV_MODE) { module.exports = function(Alt) { return { - getUsers: { - remote: function() { - return new Promise(function(resolve, reject) { - $.ajax({ - url: `/user?api_server=${API_SERVER}`, - type: 'GET', - beforeSend: Utils.addAuthorizationStub, - success: function(data, textStatus, jqXHR) { - resolve(data.user); - } - }).fail(function(xhr){ - //Authentication and the handling of fail states should be wrapped up into a connection class. - Utils.checkAuthentication(xhr.status); - let msg = xhr.responseText; - if(xhr.errorMessage) { - msg = xhr.errorMessage - } - reject(msg); - }); - }); - }, - interceptResponse: interceptResponse({ - 'error': 'There was an error retrieving the resource orchestrator information.' - }), - success: Alt.actions.global.getUsersSuccess, - loading: Alt.actions.global.showScreenLoader, - error: Alt.actions.global.showNotification - }, updateUser: { remote: function(state, user) { return new Promise(function(resolve, reject) { @@ -74,35 +46,6 @@ module.exports = function(Alt) { loading: Alt.actions.global.showScreenLoader, error: Alt.actions.global.showNotification }, - deleteUser: { - remote: function(state, user) { - return new Promise(function(resolve, reject) { - $.ajax({ - url: `/user/${user['user-name']}/${user['user-domain']}?api_server=${API_SERVER}`, - type: 'DELETE', - data: user, - beforeSend: Utils.addAuthorizationStub, - success: function(data, textStatus, jqXHR) { - resolve(data); - } - }).fail(function(xhr){ - //Authentication and the handling of fail states should be wrapped up into a connection class. - Utils.checkAuthentication(xhr.status); - let msg = xhr.responseText; - if(xhr.errorMessage) { - msg = xhr.errorMessage - } - reject(msg); - }); - }); - }, - interceptResponse: interceptResponse({ - 'error': 'There was an error deleting the user.' - }), - success: Alt.actions.global.deleteUserSuccess, - loading: Alt.actions.global.showScreenLoader, - error: Alt.actions.global.showNotification - }, createUser: { remote: function(state, user) {