Code Review
/
portal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Fix sql injection vulnerability"
[portal.git]
/
ecomp-portal-FE-os
/
client
/
src
/
views
/
applications
/
applications.controller.js
diff --git
a/ecomp-portal-FE-os/client/src/views/applications/applications.controller.js
b/ecomp-portal-FE-os/client/src/views/applications/applications.controller.js
index
5eb9dbb
..
0bcc1eb
100644
(file)
--- a/
ecomp-portal-FE-os/client/src/views/applications/applications.controller.js
+++ b/
ecomp-portal-FE-os/client/src/views/applications/applications.controller.js
@@
-33,15
+33,16
@@
*
* ============LICENSE_END============================================
*
*
* ============LICENSE_END============================================
*
- *
ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
'use strict';
(function () {
class ApplicationsCtrl {
constructor($log, $cookies, conf, ngDialog,
*/
'use strict';
(function () {
class ApplicationsCtrl {
constructor($log, $cookies, conf, ngDialog,
- applicationsService, confirmBoxService, userProfileService, utilsService,$modal) {
+ applicationsService, confirmBoxService, userProfileService, utilsService,$modal
,$scope
) {
this.emptyImgForPreview = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
this.emptyImgForPreview = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
+ $scope.isAdmin = false;
let getOnboardingApps = () => {
this.isLoadingTable = true;
applicationsService.getOnboardingApps()
let getOnboardingApps = () => {
this.isLoadingTable = true;
applicationsService.getOnboardingApps()
@@
-54,6
+55,10
@@
appsList[i].imageLink = appsList[i].imageLink+'?' + new Date().getTime();
}
}
appsList[i].imageLink = appsList[i].imageLink+'?' + new Date().getTime();
}
}
+ if(appsList.length == 0)
+ {
+ confirmBoxService.showInformation('You do not have applications to edit').then(isConfirmed => {});
+ }
this.appsList = appsList;
}).catch(err => {
confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
this.appsList = appsList;
}).catch(err => {
confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
@@
-64,8
+69,21
@@
});
};
});
};
+ let checkIfUserIsSuperAdmin = () => {
+ applicationsService.checkIfUserIsSuperAdmin().then(res => {
+ if(res) {
+ $scope.isAdmin = true;
+ }
+ }).catch(err => {
+ $log.error('ApplicationsCtrl.checkIfUserIsSuperAdmin:: Failed - ' + err);
+ }).finally(()=> {
+ this.isSaving = false;
+ });
+ };
+
let init = () => {
this.isLoadingTable = false;
let init = () => {
this.isLoadingTable = false;
+ checkIfUserIsSuperAdmin();
getOnboardingApps();
this.searchString = '';
this.appsTableHeaders = [
getOnboardingApps();
this.searchString = '';
this.appsTableHeaders = [
@@
-143,6
+161,6
@@
}
}
ApplicationsCtrl.$inject = ['$log', '$cookies', 'conf', 'ngDialog',
}
}
ApplicationsCtrl.$inject = ['$log', '$cookies', 'conf', 'ngDialog',
- 'applicationsService', 'confirmBoxService', 'userProfileService', 'utilsService','$modal'];
+ 'applicationsService', 'confirmBoxService', 'userProfileService', 'utilsService','$modal'
, '$scope'
];
angular.module('ecompApp').controller('ApplicationsCtrl', ApplicationsCtrl);
})();
angular.module('ecompApp').controller('ApplicationsCtrl', ApplicationsCtrl);
})();