Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Fixed provider name validation
......................................................................

webadmin: Fixed provider name validation

Frontend only made sure that the name was non-empty, while the backend
enforced ASCII characters; now they're the same.

Change-Id: I552ab44967789c9ffbbd4b05758a36223da17d43
Bug-Url: https://bugzilla.redhat.com/987294
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/83/19583/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
index 23a72de..cb5f247 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
@@ -27,6 +27,7 @@
 import org.ovirt.engine.ui.uicommonweb.models.ListModel;
 import org.ovirt.engine.ui.uicommonweb.models.Model;
 import org.ovirt.engine.ui.uicommonweb.models.SearchableListModel;
+import org.ovirt.engine.ui.uicommonweb.validation.AsciiNameValidation;
 import org.ovirt.engine.ui.uicommonweb.validation.IValidation;
 import org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation;
 import org.ovirt.engine.ui.uicommonweb.validation.UrlValidation;
@@ -227,7 +228,7 @@
     }
 
     private boolean validate() {
-        getName().validateEntity(new IValidation[] { new NotEmptyValidation() 
});
+        getName().validateEntity(new IValidation[] { new NotEmptyValidation(), 
new AsciiNameValidation() });
         getType().validateSelectedItem(new IValidation[] { new 
NotEmptyValidation() });
         getUsername().validateEntity(new IValidation[] { new 
NotEmptyValidation() });
         getPassword().validateEntity(new IValidation[] { new 
NotEmptyValidation() });


-- 
To view, visit http://gerrit.ovirt.org/19583
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I552ab44967789c9ffbbd4b05758a36223da17d43
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to