Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-28 Thread Maximilian Meister

On 01/24/2014 12:29 PM, Matej Kollar wrote:

Hi everybody,

here you can find the new patch with the following changes:


Hi Maximilian.

I see you have made some nice work there but there are still few things
that need to be fixed.

   * Warning pop-up.
 * Could it be moved to the right or bottom of the filed?
 * It also blinks/flickers on change, is there a way to stop it?

   * Colored progress bar/strength meter.
 * It is connected with the password field in very strange way (visually).
   Would it be possible to change it as per Michael's suggestion
   to look like [1] or [2]? Personally I would prefer second option.


* progress bar now has its own named column



   * Spec
 * `jquery.pwstrength.bootstrap` is not good name for package. I suggest
   `pwstrength-bootstrap` (the .spec is called such anyway).


* package name == filename


 * `Source0` is defined in a bit complicated way. Using
   [4] would not only be sufficient but will make it clearer and
   easier to understand.


Source0 is now readable :) as in [4]



   * Is there simple way to change rules that determine what is acceptable
 password?
 * E.g. various character classes reminded me
   there are other ways to make good password :-). [3]

Thanks for the effort invested and keep up good work :-).

[1] 
http://www.jqueryscript.net/demo/Simple-jQuery-Password-Strength-Indicator-Plugin-passMeter/
[2] 
http://cdn1.freshdesignweb.com/wp-content/uploads/2011/09/jquery-password-strength-meter-005.jpg
[3] http://xkcd.com/936/
[4] https://github.com/ablanco/jquery.pwstrength.bootstrap/archive/1.0.2.tar.gz




please check it out, and tell me if I missed something.

Thank you
Maximilian

--
--
Mit freundlichen Grüßen,
Maximilian Meister
Systems Management Department

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

From 9237a4157c666f8a78a65ef99098147b759e7a3d Mon Sep 17 00:00:00 2001
From: Maximilian Meister mmeis...@suse.de
Date: Tue, 28 Jan 2014 11:24:47 +0100
Subject: [PATCH 1/4] adding spec and patch to spec-tree

---
 .../pwstrength/pwstrength-bootstrap-1.0.2.patch| 84 ++
 spec-tree/pwstrength/pwstrength-bootstrap.spec | 41 +++
 2 files changed, 125 insertions(+)
 create mode 100644 spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
 create mode 100644 spec-tree/pwstrength/pwstrength-bootstrap.spec

diff --git a/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch b/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
new file mode 100644
index 000..f32efe5
--- /dev/null
+++ b/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
@@ -0,0 +1,84 @@
+--- dist/pwstrength-bootstrap-1.0.2.js	2014-01-27 10:20:54.927264579 +0100
 dist/pwstrength-bootstrap-1.0.2.js	2014-01-28 09:47:16.720675185 +0100
+@@ -47,7 +47,7 @@ try {
+ };
+
+ validation.wordSimilarToUsername = function (options, word, score) {
+-var username = $(options.common.usernameField).val();
++var username = $(options.common.usernameField).val() || $(options.common.usernameField).text();
+ if (username  word.toLowerCase().match(username.toLowerCase())) {
+ options.instances.errors.push(options.ui.spanError(options, same_as_username));
+ return score;
+@@ -288,7 +288,7 @@ var ui = {};
+
+ ui.initProgressBar = function (options, $el) {
+ var $container = ui.getContainer(options, $el),
+-progressbar = div class='progress'div class=';
++progressbar = div class='progress progress-pwstrength'div class=';
+
+ if (!options.ui.bootstrap2) {
+ progressbar += progress-;
+@@ -296,9 +296,9 @@ var ui = {};
+ progressbar += bar'/div/div;
+
+ if (options.ui.viewports.progress) {
+-$container.find(options.ui.viewports.progress).append(progressbar);
++$container.append(progressbar);
+ } else {
+-$(progressbar).insertAfter($el);
++$(progressbar).insertAfter('#desiredpassword-input-group');
+ }
+ };
+
+@@ -312,7 +312,7 @@ var ui = {};
+ };
+
+ ui.initVerdict = function (options, $el) {
+-ui.initHelper(options, $el, span class='password-verdict'/span,
++ui.initHelper(options, $el, span class='password-verdict' style='display:none'/span,
+ options.ui.viewports.verdict);
+ };
+
+@@ -334,7 +334,7 @@ var ui = {};
+ if (options.ui.showErrors) {
+ html += divul class='error-list';
+ $.each(options.instances.errors, function (idx, err) {
+-html += li + err + /li;
++html += err;
+ });
+ html += /ul/div;
+ }
+@@ -343,7 +343,7 @@ var ui = {};
+ $el.popover({
+ html: true,
+ placement: placement,
+-trigger: manual,
++   

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-28 Thread Matej Kollar


--
Matej Kollar
Satellite Engineering, Red Hat

- Original Message -
 From: Maximilian Meister mmeis...@suse.de
 To: spacewalk-devel@redhat.com
 Sent: Friday, January 24, 2014 2:33:46 PM
 Subject: Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to 
 spacewalk
 
 On 01/24/2014 12:29 PM, Matej Kollar wrote:
 
 * Warning pop-up.
   * Could it be moved to the right or bottom of the filed?
 Yes. Though on the bottom it overlaps with the bar, and on the right it
 could end up being
 compressed, depending on the window size of your browser.
 I guess I could try to hang the popover on the bottom of the bar for
 example.
 Right now it's attached to the input field, which makes sense IMO.
 So I personally would keep it on top, what do you think?
   * It also blinks/flickers on change, is there a way to stop it?
 The popover needs to be destroyed and recreated to update it, otherwise
 it stacks up
 in the html output. That's where the flickering comes from.
 I am currently not aware of a workaround. The popover class has the methods
 show, hide, toggle and destroy.
 
 * Colored progress bar/strength meter.
   * It is connected with the password field in very strange way
   (visually).
 Would it be possible to change it as per Michael's suggestion
 to look like [1] or [2]? Personally I would prefer second option.
 I guess I could give it an extra column like in [2] and place it under the
 Confirm Password: field?
 
 * Spec
   * `jquery.pwstrength.bootstrap` is not good name for package. I
   suggest
 `pwstrength-bootstrap` (the .spec is called such anyway).
 I will rename it.
   * `Source0` is defined in a bit complicated way. Using
 [4] would not only be sufficient but will make it clearer and
 easier to understand.
 Agreed. I took a hint at https://fedoraproject.org/wiki/Packaging:SourceURL
 But I can change it as you said.

Appreciate that you looked up some recommendations. However, the document
you mention states:

  If the upstream does not create tarballs for releases,
  you can use this mechanism to produce them

But upstream does create the tarball... [4]. Just saying ;-).

 
 * Is there simple way to change rules that determine what is acceptable
   password?
   * E.g. various character classes reminded me
 there are other ways to make good password :-). [3]
 
 [3] = Nice :) I couldn't imagine that yet...
 Yesterday the maintainer of that project also opened an issue:
 https://github.com/ablanco/jquery.pwstrength.bootstrap/issues/14
 which points exactly to that illustration, so maybe soon there'll be
 support for that.
 
 
 --
 --
 Mit freundlichen Grüßen,
 Maximilian Meister
 Systems Management Department
 
 SUSE LINUX Products GmbH
 Maxfeldstr. 5
 D-90409 Nuremberg, Germany
 
 http://www.suse.com
 
 GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-28 Thread Matej Kollar
Pushed as series of patches ending last of which is 
201b52db45f9c7f10b159bbbcb8d41b1b9fc6f2d.
--
Matej Kollar
Satellite Engineering, Red Hat

- Original Message -
 From: Maximilian Meister mmeis...@suse.de
 To: spacewalk-devel@redhat.com
 Sent: Tuesday, January 28, 2014 11:45:14 AM
 Subject: Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to 
 spacewalk
 
 On 01/24/2014 12:29 PM, Matej Kollar wrote:
 
 Hi everybody,
 
 here you can find the new patch with the following changes:
 
  Hi Maximilian.
 
  I see you have made some nice work there but there are still few things
  that need to be fixed.
 
 * Warning pop-up.
   * Could it be moved to the right or bottom of the filed?
   * It also blinks/flickers on change, is there a way to stop it?
 
 * Colored progress bar/strength meter.
   * It is connected with the password field in very strange way
   (visually).
 Would it be possible to change it as per Michael's suggestion
 to look like [1] or [2]? Personally I would prefer second option.
 
 * progress bar now has its own named column
 
 
 * Spec
   * `jquery.pwstrength.bootstrap` is not good name for package. I
   suggest
 `pwstrength-bootstrap` (the .spec is called such anyway).
 
 * package name == filename
 
   * `Source0` is defined in a bit complicated way. Using
 [4] would not only be sufficient but will make it clearer and
 easier to understand.
 
 Source0 is now readable :) as in [4]
 
 
 * Is there simple way to change rules that determine what is acceptable
   password?
   * E.g. various character classes reminded me
 there are other ways to make good password :-). [3]
 
  Thanks for the effort invested and keep up good work :-).
 
  [1]
  http://www.jqueryscript.net/demo/Simple-jQuery-Password-Strength-Indicator-Plugin-passMeter/
  [2]
  http://cdn1.freshdesignweb.com/wp-content/uploads/2011/09/jquery-password-strength-meter-005.jpg
  [3] http://xkcd.com/936/
  [4]
  https://github.com/ablanco/jquery.pwstrength.bootstrap/archive/1.0.2.tar.gz
 
 
 
 please check it out, and tell me if I missed something.
 
 Thank you
 Maximilian
 
 --
 --
 Mit freundlichen Grüßen,
 Maximilian Meister
 Systems Management Department
 
 SUSE LINUX Products GmbH
 Maxfeldstr. 5
 D-90409 Nuremberg, Germany
 
 http://www.suse.com
 
 GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)
 
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-24 Thread Matej Kollar
Hi Maximilian.

I see you have made some nice work there but there are still few things
that need to be fixed.

  * Warning pop-up.
* Could it be moved to the right or bottom of the filed?
* It also blinks/flickers on change, is there a way to stop it?

  * Colored progress bar/strength meter.
* It is connected with the password field in very strange way (visually).
  Would it be possible to change it as per Michael's suggestion
  to look like [1] or [2]? Personally I would prefer second option.

  * Spec
* `jquery.pwstrength.bootstrap` is not good name for package. I suggest
  `pwstrength-bootstrap` (the .spec is called such anyway).
* `Source0` is defined in a bit complicated way. Using
  [4] would not only be sufficient but will make it clearer and
  easier to understand.

  * Is there simple way to change rules that determine what is acceptable
password?
* E.g. various character classes reminded me
  there are other ways to make good password :-). [3]

Thanks for the effort invested and keep up good work :-).

[1] 
http://www.jqueryscript.net/demo/Simple-jQuery-Password-Strength-Indicator-Plugin-passMeter/
[2] 
http://cdn1.freshdesignweb.com/wp-content/uploads/2011/09/jquery-password-strength-meter-005.jpg
[3] http://xkcd.com/936/
[4] https://github.com/ablanco/jquery.pwstrength.bootstrap/archive/1.0.2.tar.gz

Sincerely
--
Matej Kollar
Satellite Engineering, Red Hat

- Original Message -
 From: Maximilian Meister mmeis...@suse.de
 To: spacewalk-devel@redhat.com
 Sent: Thursday, January 23, 2014 2:08:56 PM
 Subject: Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to 
 spacewalk
 
 On 01/23/2014 11:04 AM, Michael Mraka wrote:
 
  Hi Maximilian,
 
  that sounds great.
 
  % Question is now do I need to package the second .js as well? Or can
  % i simply add it to the git tree
  % in web/html/javascript?
 
  If it's spacewalk specific (I think so) then just put it to
  web/html/javascript
  next to other spacewalk-*.js.
 
 
 Hi,
 
 here is the new patch with the
 * recent release of jquery.pwstrength.bootstrap
 * a spec file to build a package from it
 * the patch to the sources during rpmbuild
 * the customization/caller script + a function to generate the tick icon
 * custom styles for the password strength meter
 
 please have a look.
 Thanks
 
 --
 --
 Mit freundlichen Grüßen,
 Maximilian Meister
 Systems Management Department
 
 SUSE LINUX Products GmbH
 Maxfeldstr. 5
 D-90409 Nuremberg, Germany
 
 http://www.suse.com
 
 GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)
 
 
 ___
 Spacewalk-devel mailing list
 Spacewalk-devel@redhat.com
 https://www.redhat.com/mailman/listinfo/spacewalk-devel

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-24 Thread Maximilian Meister

On 01/24/2014 12:29 PM, Matej Kollar wrote:


   * Warning pop-up.
 * Could it be moved to the right or bottom of the filed?
Yes. Though on the bottom it overlaps with the bar, and on the right it 
could end up being

compressed, depending on the window size of your browser.
I guess I could try to hang the popover on the bottom of the bar for 
example.

Right now it's attached to the input field, which makes sense IMO.
So I personally would keep it on top, what do you think?

 * It also blinks/flickers on change, is there a way to stop it?
The popover needs to be destroyed and recreated to update it, otherwise 
it stacks up

in the html output. That's where the flickering comes from.
I am currently not aware of a workaround. The popover class has the methods
show, hide, toggle and destroy.


   * Colored progress bar/strength meter.
 * It is connected with the password field in very strange way (visually).
   Would it be possible to change it as per Michael's suggestion
   to look like [1] or [2]? Personally I would prefer second option.

I guess I could give it an extra column like in [2] and place it under the
Confirm Password: field?


   * Spec
 * `jquery.pwstrength.bootstrap` is not good name for package. I suggest
   `pwstrength-bootstrap` (the .spec is called such anyway).

I will rename it.

 * `Source0` is defined in a bit complicated way. Using
   [4] would not only be sufficient but will make it clearer and
   easier to understand.

Agreed. I took a hint at https://fedoraproject.org/wiki/Packaging:SourceURL
But I can change it as you said.


   * Is there simple way to change rules that determine what is acceptable
 password?
 * E.g. various character classes reminded me
   there are other ways to make good password :-). [3]


[3] = Nice :) I couldn't imagine that yet...
Yesterday the maintainer of that project also opened an issue:
https://github.com/ablanco/jquery.pwstrength.bootstrap/issues/14
which points exactly to that illustration, so maybe soon there'll be 
support for that.



--
--
Mit freundlichen Grüßen,
Maximilian Meister
Systems Management Department

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-23 Thread Michael Mraka
Maximilian Meister wrote:
% Is it possible to keep original pwstrength-bootstrap*.js unmodified and
% put modification to the separate .js (call modified functions from the
% page and call original functions from them)?
% 
% Hi Michael,
% 
% I end up with 2 separate .js files now.
% First one is the original sources, packaged and patched through the
% spec file in spec-tree.
% Second one is a caller .js with the document.ready handler and some
% custom functions.

Hi Maximilian,

that sounds great.

% Question is now do I need to package the second .js as well? Or can
% i simply add it to the git tree
% in web/html/javascript?

If it's spacewalk specific (I think so) then just put it to web/html/javascript
next to other spacewalk-*.js.


Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-23 Thread Maximilian Meister

On 01/23/2014 11:04 AM, Michael Mraka wrote:


Hi Maximilian,

that sounds great.

% Question is now do I need to package the second .js as well? Or can
% i simply add it to the git tree
% in web/html/javascript?

If it's spacewalk specific (I think so) then just put it to web/html/javascript
next to other spacewalk-*.js.



Hi,

here is the new patch with the
* recent release of jquery.pwstrength.bootstrap
* a spec file to build a package from it
* the patch to the sources during rpmbuild
* the customization/caller script + a function to generate the tick icon
* custom styles for the password strength meter

please have a look.
Thanks

--
--
Mit freundlichen Grüßen,
Maximilian Meister
Systems Management Department

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

From 22b17b0cd96742dec6bc6488f95049fcf9a4c21a Mon Sep 17 00:00:00 2001
From: Maximilian Meister mmeis...@suse.de
Date: Thu, 23 Jan 2014 13:38:11 +0100
Subject: [PATCH 1/4] adding spec file for the spec tree and patch to the
 original source

---
 .../pwstrength/pwstrength-bootstrap-1.0.2.patch| 74 ++
 spec-tree/pwstrength/pwstrength-bootstrap.spec | 43 +
 2 files changed, 117 insertions(+)
 create mode 100644 spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
 create mode 100644 spec-tree/pwstrength/pwstrength-bootstrap.spec

diff --git a/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch b/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
new file mode 100644
index 000..5867a97
--- /dev/null
+++ b/spec-tree/pwstrength/pwstrength-bootstrap-1.0.2.patch
@@ -0,0 +1,74 @@
+--- dist/pwstrength-bootstrap-1.0.2.js	2014-01-20 09:52:14.488289101 +0100
 dist/pwstrength-bootstrap-1.0.2.js	2014-01-20 16:37:02.799052847 +0100
+@@ -47,7 +47,7 @@ try {
+ };
+
+ validation.wordSimilarToUsername = function (options, word, score) {
+-var username = $(options.common.usernameField).val();
++var username = $(options.common.usernameField).val() || $(options.common.usernameField).text();
+ if (username  word.toLowerCase().match(username.toLowerCase())) {
+ options.instances.errors.push(options.ui.spanError(options, same_as_username));
+ return score;
+@@ -288,7 +288,7 @@ var ui = {};
+
+ ui.initProgressBar = function (options, $el) {
+ var $container = ui.getContainer(options, $el),
+-progressbar = div class='progress'div class=';
++progressbar = div class='progress progress-pwstrength'div class=';
+
+ if (!options.ui.bootstrap2) {
+ progressbar += progress-;
+@@ -298,7 +298,7 @@ var ui = {};
+ if (options.ui.viewports.progress) {
+ $container.find(options.ui.viewports.progress).append(progressbar);
+ } else {
+-$(progressbar).insertAfter($el);
++$(progressbar).insertAfter('#desiredpassword-input-group');
+ }
+ };
+
+@@ -312,7 +312,7 @@ var ui = {};
+ };
+
+ ui.initVerdict = function (options, $el) {
+-ui.initHelper(options, $el, span class='password-verdict'/span,
++ui.initHelper(options, $el, span class='password-verdict' style='display:none'/span,
+ options.ui.viewports.verdict);
+ };
+
+@@ -334,7 +334,7 @@ var ui = {};
+ if (options.ui.showErrors) {
+ html += divul class='error-list';
+ $.each(options.instances.errors, function (idx, err) {
+-html += li + err + /li;
++html += err;
+ });
+ html += /ul/div;
+ }
+@@ -343,7 +343,7 @@ var ui = {};
+ $el.popover({
+ html: true,
+ placement: placement,
+-trigger: manual,
++trigger: focus,
+ content: html
+ });
+ $el.popover(show);
+@@ -364,7 +364,7 @@ var ui = {};
+
+ ui.updateProgressBar = function (options, $el, cssClass, percentage) {
+ var $progressbar = ui.getUIElements(options, $el).$progressbar,
+-$bar = $progressbar.find(.progress-bar),
++$bar = $(.progress-bar),
+ cssPrefix = progress-;
+
+ if (options.ui.bootstrap2) {
+@@ -388,7 +388,7 @@ var ui = {};
+ var $errors = ui.getUIElements(options, $el).$errors,
+ html = ;
+ $.each(options.instances.errors, function (idx, err) {
+-html += li + err + /li;
++html += err;
+ });
+ $errors.html(html);
+ };
diff --git a/spec-tree/pwstrength/pwstrength-bootstrap.spec b/spec-tree/pwstrength/pwstrength-bootstrap.spec
new file mode 100644
index 000..8dd6546
--- /dev/null
+++ b/spec-tree/pwstrength/pwstrength-bootstrap.spec
@@ -0,0 +1,43 @@
+%global commit 97fbed14287890e55425eba0f557381334af5681
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
+Name:   

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-21 Thread Maximilian Meister

On 01/07/2014 12:04 PM, Michael Mraka wrote:

Is it possible to keep original pwstrength-bootstrap*.js unmodified and
put modification to the separate .js (call modified functions from the
page and call original functions from them)?



Hi Michael,

I end up with 2 separate .js files now.
First one is the original sources, packaged and patched through the spec 
file in spec-tree.
Second one is a caller .js with the document.ready handler and some 
custom functions.


Question is now do I need to package the second .js as well? Or can i 
simply add it to the git tree

in web/html/javascript?


--
--
Mit freundlichen Grüßen,
Maximilian Meister
Systems Management Department

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-08 Thread Michael Mraka
Maximilian Meister wrote:
% I see. Then it should keep the original name so we can easily figure out
% where it came from and replace it with newer version in the future.
% 
% Hi Michael,
% 
% the original name would be pwstrength.js (in 0.5.0). We decided to
% use the spacewalk- prefix to distinguish it for all JavaScript
% related to the password strength meter in one single file.
% 
% Which version of jquery.pwstrength.bootstrap was it? It doesn't match to
% any pwstrength-bootstrap-1.0.X.js.
% 
% 0.5.0

As it's new feature in spacewalk I'd vote for using current latest
version of pwstrength-bootstrap.

% Is it possible to keep original pwstrength-bootstrap*.js unmodified and
% put modification to the separate .js (call modified functions from the
% page and call original functions from them)?
% 
% To keep the pwstrength.js library itself separate for easier update
% on a new version makes sense but has a few issues.
% I needed to change the library itself to make it work and look good
% for spacewalk.
% I had to change/add some generated html output (html tags, add css
% classes), some logic and css selectors.
% These are changes only make sense for spacewalk specific look and
% functionality.

I understand it. In such cases where we need to modify upstream sources
we put upstream package spec to spec-tree/ and create patches to it.
This let's us easily keep our modifications and re-apply it on new
upstream versions whenever wee need.
See e.g. spec-tree/stringtree-json in spacewalk.git.

% Furthermore in 1.0.2 the pwstrength.js is now separated into 4
% different js files.

Isn't
https://github.com/ablanco/jquery.pwstrength.bootstrap/blob/master/dist/pwstrength-bootstrap-1.0.2.js
all we need to distribute?


Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-08 Thread Johannes Renner
On 01/08/2014 02:34 PM, Michael Mraka wrote:
 Maximilian Meister wrote:
 % I see. Then it should keep the original name so we can easily figure out
 % where it came from and replace it with newer version in the future.
 % 
 % Hi Michael,
 % 
 % the original name would be pwstrength.js (in 0.5.0). We decided to
 % use the spacewalk- prefix to distinguish it for all JavaScript
 % related to the password strength meter in one single file.
 % 
 % Which version of jquery.pwstrength.bootstrap was it? It doesn't match to
 % any pwstrength-bootstrap-1.0.X.js.
 % 
 % 0.5.0
 
 As it's new feature in spacewalk I'd vote for using current latest
 version of pwstrength-bootstrap.

I would also vote for using the latest available version if possible, ideally
making it even easy to upgrade the upstream code to newer future versions.

 % Is it possible to keep original pwstrength-bootstrap*.js unmodified and
 % put modification to the separate .js (call modified functions from the
 % page and call original functions from them)?
 % 
 % To keep the pwstrength.js library itself separate for easier update
 % on a new version makes sense but has a few issues.
 % I needed to change the library itself to make it work and look good
 % for spacewalk.
 % I had to change/add some generated html output (html tags, add css
 % classes), some logic and css selectors.
 % These are changes only make sense for spacewalk specific look and
 % functionality.
 
 I understand it. In such cases where we need to modify upstream sources
 we put upstream package spec to spec-tree/ and create patches to it.
 This let's us easily keep our modifications and re-apply it on new
 upstream versions whenever wee need.
 See e.g. spec-tree/stringtree-json in spacewalk.git.

Sounds like a good workaround to me for solving the problem, at least if we
can't simply outsource our modifications into a separate javascript file.

 % Furthermore in 1.0.2 the pwstrength.js is now separated into 4
 % different js files.
 
 Isn't
 https://github.com/ablanco/jquery.pwstrength.bootstrap/blob/master/dist/pwstrength-bootstrap-1.0.2.js
 all we need to distribute?

I would guess so, this seems to be just a bundle containing contents of all
those 4 source files, right?

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-08 Thread Maximilian Meister

On 01/08/2014 02:34 PM, Michael Mraka wrote:

As it's new feature in spacewalk I'd vote for using current latest
version of pwstrength-bootstrap.


Okay, I'll work out a new patch with the latest version in the following 
days.




I understand it. In such cases where we need to modify upstream sources
we put upstream package spec to spec-tree/ and create patches to it.
This let's us easily keep our modifications and re-apply it on new
upstream versions whenever wee need.
See e.g. spec-tree/stringtree-json in spacewalk.git.


I see. I'll also try to provide a spec file plus a patch to use for the 
sources then.




Isn't
https://github.com/ablanco/jquery.pwstrength.bootstrap/blob/master/dist/pwstrength-bootstrap-1.0.2.js
all we need to distribute?


Yes you are right, this is the one to use.


--
--
Mit freundlichen Grüßen,
Maximilian Meister
SLE Systems Management

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-07 Thread Johannes Renner
On 12/20/2013 05:15 PM, R P Herrold wrote:
 On Fri, 20 Dec 2013, Maximilian Meister wrote:
 
 this patch would add a bootstrapified password strength 
 meter to all pages where user details are being created or 
 edited (create the initial admin user, create/edit normal 
 users and create organization). There is also a tick icon on 
 the side of the password input fields, which checks if the 
 value in the desired password field will be accepted by the 
 server and if the value in the confirm password field 
 matches the value in the desired password field.
 
 This seems to pull in new dependencies, doesn't it?  It is not 
 really clear to me that doing passwd strength testing here, 
 'one off' per package makes sense, rather than having a 
 general interface to query a facility that many packages 
 beyond just spacewalk could use

Maximilian's patch is in fact based on a third party plugin for Twitter 
Bootstrap:

https://github.com/ablanco/jquery.pwstrength.bootstrap

I agree that in fact it would be good practice to package the plugin javascript
file, so it can be used beyond spacewalk as you are suggesting. In case 
Maximilian
has upstreamed all the changes he made I would propose him to do that.

But please also note that Spacewalk included libraries like prototype-1.6.0 and
scriptaculous since 2008, and these were never put into separate packages so 
far!
Now these were exchanged for bootstrap, jquery and less, so yes: I agree that 
all
those libs should ideally be separate packages, but it's a general problem that 
is
not specific to this password strength meter proposal.

 Also, how would this interact with non-local 
 authentication interfaces such as LDAP?

Just as Silvio wrote, it won't. It really is only for giving immediate feedback 
to
users about the strength of a proposed password while typing.

Regards,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel


Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-07 Thread Michael Mraka
Maximilian Meister wrote:
% Hi everybody,
% 
% this patch would add a bootstrapified password strength meter to all
% pages where
% user details are being created or edited (create the initial admin user,
% create/edit normal users and create organization).
% There is also a tick icon on the side of the password input fields,
% which checks if
% the value in the desired password field will be accepted by the
% server and if the
% value in the confirm password field matches the value in the desired
% password field.
% 
% We had this implemented in SUSE Manager before, and now completely
% reworked it.
% It would be useful due to spacewalk being a systems administrations
% tool and
% due to the security implications that come with it.
% 
% It is based on https://github.com/ablanco/jquery.pwstrength.bootstrap
% where I also contributed to during the process.

Hello Maximilian,

Is the spacewalk-pwstrength.js a copy of jquery.pwstrength.bootstrap
(i.e. third party stuff) or your own implementation of it?


As for visual appearance - the strength meter box has sharp corners 
while other boxes on the page have rounded corners. Also vertical space
between Password and Confirm Password is much larger than other spaces.

BTW would it be possible to put the strength meter to the background of
Password input box (similar to the 
http://www.jqueryscript.net/demo/Simple-jQuery-Password-Strength-Indicator-Plugin-passMeter/)?
The current strength box looks a bit misaligned with the rest of the
page... or at least I'd prefer to prepend a label (e.g. Password
strength) to the box (similar to 
http://cdn1.freshdesignweb.com/wp-content/uploads/2011/09/jquery-password-strength-meter-005.jpg)
so it aligns well with the other inputs.


Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-07 Thread Michael Mraka
Johannes Renner wrote:
% On 01/07/2014 10:54 AM, Michael Mraka wrote:
%  Maximilian Meister wrote:
%  % Hi everybody,
%  % ...
%  
%  Hello Maximilian,
%  
%  Is the spacewalk-pwstrength.js a copy of jquery.pwstrength.bootstrap
%  (i.e. third party stuff) or your own implementation of it?
% 
% Currently it's basically a copy of third party code (with AFAIK some custom
% modifications he made) plus a $(document).ready() handler so that there is
% eventually only one single javascript file being referenced from the markup.

I see. Then it should keep the original name so we can easily figure out
where it came from and replace it with newer version in the future.

Which version of jquery.pwstrength.bootstrap was it? It doesn't match to
any pwstrength-bootstrap-1.0.X.js.

Is it possible to keep original pwstrength-bootstrap*.js unmodified and
put modification to the separate .js (call modified functions from the
page and call original functions from them)?


Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-07 Thread Maximilian Meister

On 01/07/2014 12:04 PM, Michael Mraka wrote:

I see. Then it should keep the original name so we can easily figure out
where it came from and replace it with newer version in the future.


Hi Michael,

the original name would be pwstrength.js (in 0.5.0). We decided to use 
the spacewalk- prefix to distinguish it for all JavaScript related to 
the password strength meter in one single file.





Which version of jquery.pwstrength.bootstrap was it? It doesn't match to
any pwstrength-bootstrap-1.0.X.js.


0.5.0



Is it possible to keep original pwstrength-bootstrap*.js unmodified and
put modification to the separate .js (call modified functions from the
page and call original functions from them)?


To keep the pwstrength.js library itself separate for easier update on a 
new version makes sense but has a few issues.
I needed to change the library itself to make it work and look good for 
spacewalk.
I had to change/add some generated html output (html tags, add css 
classes), some logic and css selectors.
These are changes only make sense for spacewalk specific look and 
functionality.


Furthermore in 1.0.2 the pwstrength.js is now separated into 4 different 
js files.





Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel



--
--
Mit freundlichen Grüßen,
Maximilian Meister
SLE Systems Management

SUSE LINUX Products GmbH
Maxfeldstr. 5
D-90409 Nuremberg, Germany

http://www.suse.com

GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer, HRB 21284 (AG Nuremberg)

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Re: [Spacewalk-devel] [PATCH] Adding a password strength meter to spacewalk

2014-01-06 Thread Silvio Moioli
On 12/20/2013 05:15 PM, R P Herrold wrote:
 This seems to pull in new dependencies, doesn't it?

This merely adds some new Javascript files - that is standard practice
in Spacewalk AFAIU, since packaging rules for Web resources in Fedora
are still in draft and the Spacewalk community has not decided to adopt
them yet:

https://fedoraproject.org/wiki/JavaScript_libraries_packaging_guideline_draft

 Also, how would this interact with non-local 
 authentication interfaces such as LDAP?

It won't. This is just a client-side (in-browser, Javascript) clue to
the user. All it does is giving basic suggestions on how to improve a
password, it does not enforce any rule. Mandatory password complexity
checks and the whole authentication code path is left untouched.

HTH,
-- 
Silvio Moioli
SUSE LINUX Products GmbH
Maxfeldstraße 5, 90409 Nürnberg Germany

___
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel