[Freeipa-devel] [freeipa PR#901][closed] Passdb private state

2017-07-11 Thread MartinBasti via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/901
Author: abbra
 Title: #901: Passdb private state
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/901/head:pr901
git checkout pr901
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org


[Freeipa-devel] [freeipa PR#911][opened] WebUI: fix for negative number in pagination size settings

2017-07-11 Thread pvomacka via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/911
Author: pvomacka
 Title: #911: WebUI: fix for negative number in pagination size settings
Action: opened

PR body:
"""
This PR adds new validator which allows to input only positive numbers into 
fiels. The new validator is then used in field for setting the length of tables 
(number of rows) on search facets.

https://pagure.io/freeipa/issue/6980
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/911/head:pr911
git checkout pr911
From a0e10a75e986ad8fedd8fdbb7a30b2f3fbb40eed Mon Sep 17 00:00:00 2001
From: Pavel Vomacka 
Date: Tue, 11 Jul 2017 10:46:36 +0200
Subject: [PATCH 1/2] WebUI: Add positive number validator

Add new validator which inherits from integer validator
and checks whether the integer is positive.

https://pagure.io/freeipa/issue/6980
---
 install/ui/src/freeipa/field.js | 43 +
 ipaserver/plugins/internal.py   |  1 +
 2 files changed, 44 insertions(+)

diff --git a/install/ui/src/freeipa/field.js b/install/ui/src/freeipa/field.js
index 4cd9f13f76..cb4e8e9cff 100644
--- a/install/ui/src/freeipa/field.js
+++ b/install/ui/src/freeipa/field.js
@@ -1049,9 +1049,51 @@ field.validator = IPA.validator = function(spec) {
  return that.true_result();
  };
 
+ that.integer_validate = that.validate;
+
  return that;
  };
 
+
+/**
+ * Javascript positive integer validator
+ *
+ * It allows to insert only positive integer.
+ *
+ * @class
+ * @alternateClassName IPA.positive_integer_validator
+ * @extends IPA.validator
+ */
+ field.positive_integer_validator = IPA.positive_integer_validator = function(spec) {
+
+var that = IPA.integer_validator(spec);
+
+/**
+* @inheritDoc
+*/
+
+that.validate = function(value) {
+
+var integer_check = that.integer_validate(value);
+
+if (!integer_check.valid) {
+return integer_check;
+}
+
+var num = parseInt(value);
+
+if (num <= 0) {
+return that.false_result(
+text.get('@i18n:widget.validation.positive_number'));
+}
+
+return that.true_result();
+};
+
+return that;
+ };
+
+
 /**
  * Metadata validator
  *
@@ -1871,6 +1913,7 @@ field.register = function() {
 v.register('unsupported', field.unsupported_validator);
 v.register('same_password', field.same_password_validator);
 v.register('integer', field.integer_validator);
+v.register('positive_integer', field.positive_integer_validator);
 
 l.register('adapter', field.Adapter);
 l.register('object_adapter', field.ObjectAdapter);
diff --git a/ipaserver/plugins/internal.py b/ipaserver/plugins/internal.py
index 6feefa5941..56fbcbc0ea 100644
--- a/ipaserver/plugins/internal.py
+++ b/ipaserver/plugins/internal.py
@@ -982,6 +982,7 @@ class i18n_messages(Command):
 "min_value": _("Minimum value is ${value}"),
 "net_address": _("Not a valid network address (examples: 2001:db8::/64, 192.0.2.0/24)"),
 "parse": _("Parse error"),
+"positive_number": _("Must be a positive number"),
 "port": _("'${port}' is not a valid port"),
 "required": _("Required field"),
 "unsupported": _("Unsupported value"),

From bb23768934adb2c2741d53d3700a44c82030d625 Mon Sep 17 00:00:00 2001
From: Pavel Vomacka 
Date: Tue, 11 Jul 2017 10:49:46 +0200
Subject: [PATCH 2/2] WebUI: change validator of page size settings

Previously, this configuration field was validated by integer_validator
which only checks that the input is number.
Now new positive_integer_validator can also check that
the inputed number positive.

https://pagure.io/freeipa/issue/6980
---
 install/ui/src/freeipa/Application_controller.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install/ui/src/freeipa/Application_controller.js b/install/ui/src/freeipa/Application_controller.js
index 5eb4e7a510..51f579e3cc 100644
--- a/install/ui/src/freeipa/Application_controller.js
+++ b/install/ui/src/freeipa/Application_controller.js
@@ -312,7 +312,7 @@ define([
 $type: 'text',
 name: 'pagination_size',
 label: '@i18n:customization.table_pagination',
-validators: ['integer']
+validators: ['positive_integer']
 }
 ]
 });
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org


[Freeipa-devel] [freeipa PR#895][closed] Ensure network is online prior to an upgrade

2017-07-11 Thread tomaskrizek via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/895
Author: stlaz
 Title: #895: Ensure network is online prior to an upgrade
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/895/head:pr895
git checkout pr895
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org


[Freeipa-devel] [freeipa PR#909][closed] IPAOptionParser: fix dict comprehension

2017-07-11 Thread tomaskrizek via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/909
Author: MartinBasti
 Title: #909: IPAOptionParser: fix dict comprehension
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/909/head:pr909
git checkout pr909
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org


[Freeipa-devel] [freeipa PR#870][closed] topology.py: Removes error message.

2017-07-11 Thread tomaskrizek via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/870
Author: Tiboris
 Title: #870: topology.py: Removes error message.
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/870/head:pr870
git checkout pr870
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org


[Freeipa-devel] [freeipa PR#905][closed] ipapython/graph.py complexity optimization.

2017-07-11 Thread tomaskrizek via FreeIPA-devel
   URL: https://github.com/freeipa/freeipa/pull/905
Author: slaykovsky
 Title: #905: ipapython/graph.py complexity optimization.
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/905/head:pr905
git checkout pr905
___
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org