Merge "Portal Spring Boot Development"
[portal.git] / ecomp-portal-FE-common / client / app / services / users / users.service.js
index 9e06271..ed95bdd 100644 (file)
             return deferred.promise;
         }
 
-        getUserAppRoles(appid, orgUserId, extRequestValue){
+        getUserAppRoles(appid, orgUserId, extRequestValue,isSystemUser){
                let canceller = this.$q.defer();
             let isActive = false;
 
             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()
                 // 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 ||  res.data.httpStatusCode == '500' || res.data.status == 'ERROR') {
-                    deferred.reject('UsersService::updateUserAppRoles: Failed'  + res.data.message);
+                    deferred.reject(' Error:'  + res.data.message);
                 } else {
                     // this.$log.info('UsersService::updateUserAppRoles: Succeeded');
                     deferred.resolve(res.data);
     }
     UsersService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
     angular.module('ecompApp').service('usersService', UsersService)
-})();
+})();
\ No newline at end of file