From ab4bc71d0568f6c67932e3c9366f9480b8eb3a88 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Thu, 20 Jul 2017 12:14:55 -0400 Subject: [PATCH] Disable license buttons for non-superuser users --- awx/ui/client/src/license/license.controller.js | 4 +++- awx/ui/client/src/license/license.partial.html | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index 12f21baa72..cac147e3ad 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -73,7 +73,9 @@ export default // HTML5 spec doesn't provide a way to customize file input css // So we hide the default input, show our own, and simulate clicks to the hidden input $scope.fakeClick = function(){ - $('#License-file').click(); + if($scope.user_is_superuser) { + $('#License-file').click(); + } }; $scope.downloadLicense = function(){ diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html index 82abcf3ba3..f5d4eef445 100644 --- a/awx/ui/client/src/license/license.partial.html +++ b/awx/ui/client/src/license/license.partial.html @@ -101,8 +101,8 @@
License File
- Browse - {{fileName|translate}} + Browse + {{fileName|translate}}
End User License Agreement @@ -112,13 +112,13 @@
- + Save successful!