From 26b3ec0b2a9aea1140b504ece301799b48caabbb Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 11 Mar 2014 13:53:15 +0000 Subject: [PATCH] KEYCLOAK-357 KEYCLOAK-358 Set enabled default to true when creating applications, clients and users --- .../META-INF/resources/admin/js/controllers/applications.js | 2 +- .../META-INF/resources/admin/js/controllers/oauth-clients.js | 2 +- .../META-INF/resources/admin/js/controllers/users.js | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js index 800c7e39ca..aa539abd76 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/applications.js @@ -234,7 +234,7 @@ module.controller('ApplicationDetailCtrl', function($scope, realm, application, $scope.clientType = $scope.clientTypes[1]; } } else { - $scope.application = {}; + $scope.application = { enabled: true }; $scope.application.webOrigins = []; $scope.application.redirectUris = []; $scope.clientType = $scope.clientTypes[0]; diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js index 54ca912ca4..6835599e8d 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/oauth-clients.js @@ -99,7 +99,7 @@ module.controller('OAuthClientDetailCtrl', function($scope, realm, oauth, OAuthC $scope.clientType = $scope.clientTypes[1]; } } else { - $scope.oauth = {}; + $scope.oauth = { enabled: true }; $scope.oauth.webOrigins = []; $scope.oauth.redirectUris = []; $scope.clientType = $scope.clientTypes[0]; diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js index 178e26b6ab..00b4e8f69c 100755 --- a/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js +++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/controllers/users.js @@ -172,6 +172,10 @@ module.controller('UserDetailCtrl', function($scope, realm, user, User, $locatio $scope.user = angular.copy(user); $scope.create = !user.username; + if ($scope.create) { + $scope.user.enabled = true; + } + $scope.changed = false; // $scope.create; // ID - Name map for required actions. IDs are enum names.