From 4dd9170a99122a700c971c54c6cc9876e2cd3a77 Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Fri, 10 Jan 2014 17:40:20 +0000 Subject: [PATCH] KEYCLOAK-258 Fix roles missing for apps in registration --- .../META-INF/resources/admin/js/controllers/realm.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js index adcfbd94c7..4ca8cf991a 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/realm.js @@ -440,7 +440,7 @@ module.controller('RealmRegistrationCtrl', function ($scope, Realm, realm, appli $scope.realm.defaultRoles = []; } - // Populate available roles. Available roles are neither already assigned or system roles. + // Populate available roles. Available roles are neither already assigned for (var i = 0; i < roles.length; i++) { var item = roles[i].name; @@ -504,8 +504,7 @@ module.controller('RealmRegistrationCtrl', function ($scope, Realm, realm, appli for (var i = 0; i < appDefaultRoles.length; i++) { var roleName = appDefaultRoles[i].name; - - if (systemRoles.indexOf(roleName) < 0 && $scope.application.defaultRoles.indexOf(roleName) < 0) { + if ($scope.application.defaultRoles.indexOf(roleName) < 0) { $scope.availableAppRoles.push(roleName); } }