Skip navigation

CQ5

ksk259
Currently Being Moderated

Modifying Create User Dialog to enforce password rules

Jun 15, 2012 12:34 PM

How do I modify the Create User dialog, so that the user is forced to select a password with atleast one lowercase, one uppercase letter and one numeric letter. As of now, there is no such restrictions.

 
Replies
  • Currently Being Moderated
    Jun 21, 2012 6:17 AM   in reply to ksk259

    I'm interested in this as well; our internal risk assessment team is holding up our deployment do to similar issues on this and the change password dialog.  Does anyone know where these dialog boxes are stored and how we could apply validation?  We'd want to enforce password validation like above and set teh email address field to required.

     

    Does anyone have nay thoughts or did you find a solution ksk259?

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 29, 2012 8:44 AM   in reply to ksk259

    ksk259,

    I've found the answer to part of our issue - making the email field required. To do so, you have to:


    1. Go to /var/clientlibs/libs/cq/security/widgets.js and find the createUser function
    2. Add "allowBlank":false, under the "fieldLabel":CQ.I18n.getMessage("Mail") section.

     

    As for the password security, we've made some progress on the password validation as well.  You can add the in-dialog error string by adding a new vtype/return message.


    1. Go to /libs/cq/ui/widgets/source/ext/override/locale/ext-lang-cq.js and add pwdText: CQ.I18n.getMessage('Your Error String Here') under CQ.Ext.form.VTypes
    2. In the widgets.js above, add "vtype":"pwdText", under the "fieldLabel":CQ.I18n.getMessage("Password") section
    3. Write your function in JavaScript that does the logic you need it to do.

     

    What we are still unclear about is where exactly do we put this JavaScript function and how do we call it from the New User Dialog box.  In the widgets.js file, the check passwords function is local to the CreateUser function - is this best place for a validation function?  I don't understand exactly how the email validation function is working - I see the error message , but where is the code that actually performs the validation?

     

    Can someone from Adobe chime in here?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points