diff --git a/src/app/views/apps/modals/app-settings-modal.coffee b/src/app/views/apps/modals/app-settings-modal.coffee index f8c1aa2f..6842ca38 100755 --- a/src/app/views/apps/modals/app-settings-modal.coffee +++ b/src/app/views/apps/modals/app-settings-modal.coffee @@ -7,14 +7,6 @@ angular.module 'mnoEnterpriseAngular' $scope.sentence = "Please proceed to the deletion of my app and all data it contains" $scope.organization_uid = ImpacMainSvc.config.currentOrganization.uid - # ---------------------------------------------------------- - # Permissions helper - # ---------------------------------------------------------- - - $scope.helper = {} - $scope.helper.canDeleteApp = -> - MnoeOrganizations.can.destroy.appInstance() - $scope.modal.close = -> $uibModalInstance.close() @@ -31,6 +23,16 @@ angular.module 'mnoEnterpriseAngular' $scope.modal.errors = Utilities.processRailsError(error) ).finally(-> $scope.modal.loading = false) + # ---------------------------------------------------------- + # Permissions helper + # ---------------------------------------------------------- + $scope.helper = {} + $scope.helper.canDeleteApp = -> + MnoeOrganizations.can.destroy.appInstance() + + $scope.helper.canDisplayBilling = -> + MnoeOrganizations.can.read.billing() + $scope.helper.isDataSyncShown = (app) -> app.stack == 'connector' && app.oauth_keys_valid diff --git a/src/app/views/apps/modals/app-settings-modal.html b/src/app/views/apps/modals/app-settings-modal.html index 2807ae01..6ab5d8b0 100755 --- a/src/app/views/apps/modals/app-settings-modal.html +++ b/src/app/views/apps/modals/app-settings-modal.html @@ -26,13 +26,23 @@