diff options
Diffstat (limited to 'ecomp-portal-FE-common/client/app/services')
-rw-r--r-- | ecomp-portal-FE-common/client/app/services/applications/applications.service.js | 26 | ||||
-rw-r--r-- | ecomp-portal-FE-common/client/app/services/users/users.service.js | 4 |
2 files changed, 27 insertions, 3 deletions
diff --git a/ecomp-portal-FE-common/client/app/services/applications/applications.service.js b/ecomp-portal-FE-common/client/app/services/applications/applications.service.js index c595c71a..e2e7c5fe 100644 --- a/ecomp-portal-FE-common/client/app/services/applications/applications.service.js +++ b/ecomp-portal-FE-common/client/app/services/applications/applications.service.js @@ -154,7 +154,31 @@ return deferred.promise; } - + checkIfUserIsSuperAdmin() { + let deferred = this.$q.defer(); + var _this0 = this; + // this.$log.info('ApplicationsService::getPersUserApps'); + this.$http.get(this.conf.api.checkIfUserIsSuperAdmin, + { + cache: false, + headers: { + 'X-ECOMP-RequestID':this.uuid.generate() + } + }) + .then( res => { + // If response comes back as a redirected HTML page which IS NOT a success + // But don't declare an empty list to be an error. + if (res == null || res.data == null) { + deferred.reject("ApplicationsService::checkIfUserIsSuperAdmin Failed"); + } else { + deferred.resolve(res.data); + } + }) + .catch( status => { + deferred.reject(status); + }); + return deferred.promise; + } saveAppsSortTypeManual(appsSortManual){ let deferred = this.$q.defer(); if (appsSortManual== undefined 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 9e062713..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 @@ -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() |