Tal Nisan has uploaded a new change for review. Change subject: webadmin: New disk model size validation should be of type long ......................................................................
webadmin: New disk model size validation should be of type long The size field is defined as as an entity model of type long and so the integer validator does not validate it at all making it possible for numbers less than the minimum (including negative number and zero) as well as numbers higher than the maximum to appear as validated, this was fixed by replacing the validation from integer validation to long validation Change-Id: Ie8f6e52bc11b248fd7829261df7ec3626603e363 Signed-off-by: Tal Nisan <[email protected]> Bug-Url: https://bugzilla.redhat.com/1115471 --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/32051/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java index ec5eeb5..8acabb0 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewDiskModel.java @@ -25,7 +25,7 @@ import org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemModel; import org.ovirt.engine.ui.uicommonweb.models.SystemTreeItemType; import org.ovirt.engine.ui.uicommonweb.validation.IValidation; -import org.ovirt.engine.ui.uicommonweb.validation.IntegerValidation; +import org.ovirt.engine.ui.uicommonweb.validation.LongValidation; import org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation; import org.ovirt.engine.ui.uicompat.FrontendActionAsyncResult; import org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback; @@ -222,7 +222,7 @@ StorageType storageType = getStorageDomain().getSelectedItem() == null ? StorageType.UNKNOWN : getStorageDomain().getSelectedItem().getStorageType(); - IntegerValidation sizeValidation = new IntegerValidation(); + LongValidation sizeValidation = new LongValidation(); sizeValidation.setMinimum(1); if (storageType.isBlockDomain()) { sizeValidation.setMaximum((Integer) AsyncDataProvider.getInstance().getConfigValuePreConverted(ConfigurationValues.MaxBlockDiskSize)); -- To view, visit http://gerrit.ovirt.org/32051 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie8f6e52bc11b248fd7829261df7ec3626603e363 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
