[KEYCLOAK-5054] - Checking name availability only in cases name is filled
This commit is contained in:
parent
fd8a3dccaf
commit
d4a85d6abc
1 changed files with 9 additions and 0 deletions
|
@ -367,6 +367,9 @@ module.controller('ResourceServerResourceDetailCtrl', function($scope, $http, $r
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkNameAvailability = function (onSuccess) {
|
this.checkNameAvailability = function (onSuccess) {
|
||||||
|
if (!$scope.resource.name || $scope.resource.name.trim().length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ResourceServerResource.search({
|
ResourceServerResource.search({
|
||||||
realm : $route.current.params.realm,
|
realm : $route.current.params.realm,
|
||||||
client : client.id,
|
client : client.id,
|
||||||
|
@ -593,6 +596,9 @@ module.controller('ResourceServerScopeDetailCtrl', function($scope, $http, $rout
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkNameAvailability = function (onSuccess) {
|
this.checkNameAvailability = function (onSuccess) {
|
||||||
|
if (!$scope.scope.name || $scope.scope.name.trim().length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ResourceServerScope.search({
|
ResourceServerScope.search({
|
||||||
realm : $route.current.params.realm,
|
realm : $route.current.params.realm,
|
||||||
client : client.id,
|
client : client.id,
|
||||||
|
@ -2060,6 +2066,9 @@ module.service("PolicyController", function($http, $route, $location, ResourceSe
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkNameAvailability = function (onSuccess) {
|
this.checkNameAvailability = function (onSuccess) {
|
||||||
|
if (!$scope.policy.name || $scope.policy.name.trim().length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
ResourceServerPolicy.search({
|
ResourceServerPolicy.search({
|
||||||
realm: $route.current.params.realm,
|
realm: $route.current.params.realm,
|
||||||
client: client.id,
|
client: client.id,
|
||||||
|
|
Loading…
Reference in a new issue