Changeset 154 for trunk/grails-app


Ignore:
Timestamp:
Oct 17, 2009, 11:49:45 AM (15 years ago)
Author:
gav
Message:

Format to 4 spaces, no tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Person.groovy

    r147 r154  
    11class Person {
    2         static transients = ['pass']
     2    static transients = ['pass']
    33    static hasMany = [authorities: Authority,
    44                        personGroups: PersonGroup,
     
    99    static belongsTo = [Authority, PersonGroup]
    1010
    11         String loginName
    12         String firstName
     11    String loginName
     12    String firstName
    1313    String lastName
    1414    String employeeID
     
    1717    Integer sessionTimeout = 43200
    1818
    19         /** MD5 Password */
    20         String password
     19    /** MD5 Password */
     20    String password
    2121
    22         /** enabled */
    23         boolean isActive = true
     22    /** enabled */
     23    boolean isActive = true
    2424
    25         String email
    26         boolean emailShow = true
     25    String email
     26    boolean emailShow = true
    2727
    28         /** description */
    29         String description = ''
     28    /** description */
     29    String description = ''
    3030
    31         /** plain password to create a MD5 password */
    32         String pass
     31    /** plain password to create a MD5 password */
     32    String pass
    3333
    34         static constraints = {
    35                 loginName(blank: false, unique: true, minSize:4) //minSize:7
    36                 firstName(blank: false)
     34    static constraints = {
     35        loginName(blank: false, unique: true, minSize:4) //minSize:7
     36        firstName(blank: false)
    3737        lastName(blank: false)
    3838        employeeID(blank: true, nullable:true)
     
    4242        isActive()
    4343        //Enforcing minSize on password does not work since "" gets encoded to a string.
    44                 password(blank: false)
     44        password(blank: false)
    4545        //So we need to use pass for validation then encode it for above.
    4646        pass(blank: false, minSize:4) //minSize:7
    4747        sessionTimeout(min:60, max:43200)
    4848
    49         }
     49    }
    5050
    5151    //Overriding the default toString method
Note: See TracChangeset for help on using the changeset viewer.