Merge pull request #3502 from ssilvert/hide-role-selector

KEYCLOAK-3905: Role selector sometimes displayed when client full scope
This commit is contained in:
Stan Silvert 2016-11-15 10:24:01 -05:00 committed by GitHub
commit 9512180406
2 changed files with 7 additions and 3 deletions

View file

@ -1352,7 +1352,11 @@ module.controller('ClientScopeMappingCtrl', function($scope, $http, realm, clien
}
$scope.hideRoleSelector = function() {
return ($scope.client.useTemplateScope && $scope.template && template.fullScopeAllowed)
|| (!$scope.template && $scope.client.fullScopeAllowed);
}
$scope.changeFlag = function() {
Client.update({
realm : realm.realm,

View file

@ -41,7 +41,7 @@
</fieldset>
</form>
<form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageClients" data-ng-show="!client.fullScopeAllowed" data-ng-hide="client.useTemplateScope && template && template.fullScopeAllowed">
<form class="form-horizontal" name="realmForm" novalidate kc-read-only="!access.manageClients" data-ng-hide="hideRoleSelector()">
<div class="form-group">
<label class="col-md-2 control-label" class="control-label">{{:: 'realm-roles' | translate}}</label>
<div class="col-md-10">
@ -132,6 +132,6 @@
</div>
</div>
</form>
</div>
</div>
<kc-menu></kc-menu>