keycloak-aplcache

Details

diff --git a/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js b/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
index f4f87aa..72b6c43 100644
--- a/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/authz/authz-controller.js
@@ -9,7 +9,6 @@ module.controller('ResourceServerCtrl', function($scope, realm, ResourceServer) 
 module.controller('ResourceServerDetailCtrl', function($scope, $http, $route, $location, $upload, $modal, realm, ResourceServer, client, AuthzDialog, Notifications) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
     ResourceServer.get({
         realm : $route.current.params.realm,
@@ -83,7 +82,6 @@ module.controller('ResourceServerDetailCtrl', function($scope, $http, $route, $l
 module.controller('ResourceServerResourceCtrl', function($scope, $http, $route, $location, realm, ResourceServer, ResourceServerResource, client) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
     $scope.query = {
         realm: realm.realm,
@@ -136,7 +134,6 @@ module.controller('ResourceServerResourceCtrl', function($scope, $http, $route, 
 module.controller('ResourceServerResourceDetailCtrl', function($scope, $http, $route, $location, realm, ResourceServer, client, ResourceServerResource, ResourceServerScope, AuthzDialog, Notifications) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
     ResourceServerScope.query({realm : realm.realm, client : client.id}, function (data) {
         $scope.scopes = data;
@@ -268,7 +265,6 @@ module.controller('ResourceServerResourceDetailCtrl', function($scope, $http, $r
 module.controller('ResourceServerScopeCtrl', function($scope, $http, $route, $location, realm, ResourceServer, ResourceServerScope, client) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
     $scope.query = {
         realm: realm.realm,
@@ -321,7 +317,6 @@ module.controller('ResourceServerScopeCtrl', function($scope, $http, $route, $lo
 module.controller('ResourceServerScopeDetailCtrl', function($scope, $http, $route, $location, realm, ResourceServer, client, ResourceServerScope, AuthzDialog, Notifications) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
     var $instance = this;
 
@@ -431,7 +426,6 @@ module.controller('ResourceServerScopeDetailCtrl', function($scope, $http, $rout
 module.controller('ResourceServerPolicyCtrl', function($scope, $http, $route, $location, realm, ResourceServer, ResourceServerPolicy, PolicyProvider, client) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
     $scope.policyProviders = [];
 
     $scope.query = {
@@ -504,7 +498,6 @@ module.controller('ResourceServerPolicyCtrl', function($scope, $http, $route, $l
 module.controller('ResourceServerPermissionCtrl', function($scope, $http, $route, $location, realm, ResourceServer, ResourceServerPolicy, PolicyProvider, client) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
     $scope.policyProviders = [];
 
     $scope.query = {
@@ -1207,7 +1200,6 @@ module.service("PolicyController", function($http, $route, $location, ResourceSe
 
         $scope.realm = realm;
         $scope.client = client;
-        $scope.showAuthorizationTab = client.authorizationServicesEnabled;
 
         $scope.decisionStrategies = ['AFFIRMATIVE', 'UNANIMOUS', 'CONSENSUS'];
         $scope.logics = ['POSITIVE', 'NEGATIVE'];
@@ -1373,7 +1365,6 @@ module.service("PolicyController", function($http, $route, $location, ResourceSe
 module.controller('PolicyEvaluateCtrl', function($scope, $http, $route, $location, realm, clients, roles, ResourceServer, client, ResourceServerResource, ResourceServerScope, User, Notifications) {
     $scope.realm = realm;
     $scope.client = client;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
     $scope.clients = clients;
     $scope.roles = roles;
     $scope.authzRequest = {};
diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
index c015dfa..cdb8b48 100755
--- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
@@ -812,7 +812,7 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, templates,
     $scope.samlEncrypt = false;
     $scope.samlForcePostBinding = false;
     $scope.samlForceNameIdFormat = false;
-    $scope.showAuthorizationTab = client.authorizationServicesEnabled;
+    $scope.disableAuthorizationTab = !client.authorizationServicesEnabled;
 
     function updateProperties() {
         if (!$scope.client.attributes) {
diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-client.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-client.html
index 96d9ada..f39bc2c 100755
--- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-client.html
+++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-tabs-client.html
@@ -19,7 +19,7 @@
             <a href="#/realms/{{realm.realm}}/clients/{{client.id}}/scope-mappings">{{:: 'scope' | translate}}</a>
             <kc-tooltip>{{:: 'scope.tooltip' | translate}}</kc-tooltip>
         </li>
-        <li ng-class="{active: path[4] == 'authz'}" data-ng-show="showAuthorizationTab"><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li>
+        <li ng-class="{active: path[4] == 'authz'}" data-ng-show="!disableAuthorizationTab && client.authorizationServicesEnabled"><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/authz/resource-server">{{:: 'authz-authorization' | translate}}</a></li>
         <li ng-class="{active: path[4] == 'revocation'}"><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/revocation">{{:: 'revocation' | translate}}</a></li>
     <!--    <li ng-class="{active: path[4] == 'identity-provider'}" data-ng-show="realm.identityFederationEnabled"><a href="#/realms/{{realm.realm}}/clients/{{client.id}}/identity-provider">Identity Provider</a></li> -->
         <li ng-class="{active: path[4] == 'sessions'}" data-ng-show="!client.bearerOnly">