From 21823588d4408c29fbf7b51e7cbc2eae843eea0b Mon Sep 17 00:00:00 2001 From: deaflynx Date: Fri, 8 Jan 2021 13:38:18 +0200 Subject: [PATCH] Hide sensitive edge info for Customers update --- ui/src/app/edge/edge-fieldset.tpl.html | 18 +++++++++--------- ui/src/app/edge/edge.directive.js | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ui/src/app/edge/edge-fieldset.tpl.html b/ui/src/app/edge/edge-fieldset.tpl.html index d805eda10a..bf0f518793 100644 --- a/ui/src/app/edge/edge-fieldset.tpl.html +++ b/ui/src/app/edge/edge-fieldset.tpl.html @@ -58,7 +58,7 @@ edge.copy-edge-key @@ -66,14 +66,14 @@ edge.copy-edge-secret edge.sync @@ -105,16 +105,16 @@ ng-model="edge.type" entity-type="types.entityType.edge"> -
edge.license-key-hint
- +
edge.license-key-hint
+
edge.edge-license-key-required
-
edge.cloud-endpoint-hint
- +
edge.cloud-endpoint-hint
+
@@ -122,7 +122,7 @@
-
+
@@ -137,7 +137,7 @@
-
+
diff --git a/ui/src/app/edge/edge.directive.js b/ui/src/app/edge/edge.directive.js index 7f8e6c3436..99fd7e6dc3 100644 --- a/ui/src/app/edge/edge.directive.js +++ b/ui/src/app/edge/edge.directive.js @@ -20,7 +20,7 @@ import edgeFieldsetTemplate from './edge-fieldset.tpl.html'; /* eslint-enable import/no-unresolved, import/default */ /*@ngInject*/ -export default function EdgeDirective($compile, $templateCache, $translate, $mdDialog, $document, utils, toast, types, customerService, edgeService) { +export default function EdgeDirective($compile, $templateCache, $translate, $mdDialog, $document, utils, toast, types, customerService, edgeService, userService) { var linker = function (scope, element) { var template = $templateCache.get(edgeFieldsetTemplate); element.html(template); @@ -29,6 +29,7 @@ export default function EdgeDirective($compile, $templateCache, $translate, $mdD scope.isAssignedToCustomer = false; scope.isPublic = false; scope.assignedCustomer = null; + scope.isTenantAdmin = userService.getCurrentUser().authority === 'TENANT_ADMIN'; scope.$watch('edge', function(newVal) { if (newVal) {