Ignore:
Timestamp:
Mar 14, 2009, 10:04:39 AM (11 years ago)
Author:
gav
Message:

Add changePassword under options view so that users can change their own password.
Adjust for password validation, userCache etc. Only a small bug during "edit" is left on second "update" command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/TaskRewrite/src/grails-app/domain/Person.groovy

    r66 r73  
    2727
    2828        /** plain password to create a MD5 password */
    29         String pass = '[secret]'
     29        String pass
    3030
    3131        static constraints = {
    32                 loginName(blank: false, unique: true)//minSize:7
     32                loginName(blank: false, unique: true, minSize:4)//minSize:7
    3333                firstName(blank: false)
    3434        lastName(blank: false)
    35                 password(blank: false) //minSize:7
    3635        employeeID(blank: true, nullable:true)
     36        description()
     37        email()
     38        emailShow()
     39        isActive()
     40        //Enforcing minSize on password does not work since "" gets encoded to a string.
     41                password(blank: false)
     42        //So we need to use pass for validation then encode it for above.
     43        pass(blank: false, minSize:4)
     44
    3745        }
    3846
Note: See TracChangeset for help on using the changeset viewer.