X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-FE-common%2Fclient%2Fapp%2Fservices%2Fusers%2Fusers.service.js;h=045c674b783e504378740f9c7f02a99e92c521ba;hb=3f56b9fdb4d2ec891344d6c9048363e1cac587d2;hp=eaafc779466081b0bfa1ab062ea394cc33c2b039;hpb=21a8761f684745bb300e075c7e98ad897ace9eed;p=portal.git diff --git a/ecomp-portal-FE-common/client/app/services/users/users.service.js b/ecomp-portal-FE-common/client/app/services/users/users.service.js index eaafc779..045c674b 100644 --- a/ecomp-portal-FE-common/client/app/services/users/users.service.js +++ b/ecomp-portal-FE-common/client/app/services/users/users.service.js @@ -33,7 +33,7 @@ * * ============LICENSE_END============================================ * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * */ /** * Created by doritrieur on 12/8/15. @@ -131,7 +131,7 @@ return deferred.promise; } - getUserAppRoles(appid, orgUserId, extRequestValue){ + getUserAppRoles(appid, orgUserId, extRequestValue,isSystemUser){ let canceller = this.$q.defer(); let isActive = false; @@ -148,7 +148,7 @@ this.$http({ method: 'GET', url: this.conf.api.userAppRoles, - params: {user: orgUserId, app: appid, externalRequest: extRequestValue}, + params: {user: orgUserId, app: appid, externalRequest: extRequestValue,isSystemUser: isSystemUser}, cache: false, headers: { 'X-ECOMP-RequestID':this.uuid.generate() @@ -200,8 +200,8 @@ }).then( res => { // this.$log.debug('getUserAppRoles response: ', JSON.stringify(res)) // If response comes back as a redirected HTML page which IS NOT a success - if (this.utilsService.isValidJSON(res)== false) { - deferred.reject('UsersService::updateUserAppRoles: Failed'); + if (this.utilsService.isValidJSON(res)== false || res.data.httpStatusCode == '500' || res.data.status == 'ERROR') { + deferred.reject('UsersService::updateUserAppRoles: Failed' + res.data.message); } else { // this.$log.info('UsersService::updateUserAppRoles: Succeeded'); deferred.resolve(res.data);