|
Last change
on this file since 58 was
58,
checked in by gav, 17 years ago
|
|
Configure BootStrap? with latest concepts.
Install and setup Acegi plugin with custom views.
Test Fixture plugin in a test app but couldn't get it to work with Acegi encodePassword() so gave up.
|
|
File size:
746 bytes
|
| Line | |
|---|
| 1 | class Person { |
|---|
| 2 | static transients = ['pass'] |
|---|
| 3 | static hasMany = [authorities: Authority] |
|---|
| 4 | static belongsTo = Authority |
|---|
| 5 | |
|---|
| 6 | String loginName |
|---|
| 7 | String firstName |
|---|
| 8 | String lastName |
|---|
| 9 | String employeeID |
|---|
| 10 | |
|---|
| 11 | /** MD5 Password */ |
|---|
| 12 | String password |
|---|
| 13 | |
|---|
| 14 | /** enabled */ |
|---|
| 15 | boolean isActive = true |
|---|
| 16 | |
|---|
| 17 | String email |
|---|
| 18 | boolean emailShow = true |
|---|
| 19 | |
|---|
| 20 | /** description */ |
|---|
| 21 | String description = '' |
|---|
| 22 | |
|---|
| 23 | /** plain password to create a MD5 password */ |
|---|
| 24 | String pass = '[secret]' |
|---|
| 25 | |
|---|
| 26 | static constraints = { |
|---|
| 27 | loginName(blank: false, unique: true) |
|---|
| 28 | firstName(blank: false) |
|---|
| 29 | lastName(blank: false) |
|---|
| 30 | password(blank: false) |
|---|
| 31 | employeeID(blank: true, nullable:true) |
|---|
| 32 | } |
|---|
| 33 | |
|---|
| 34 | //Overriding the default toString method |
|---|
| 35 | String toString() {"${this.firstName} ${this.lastName}"} |
|---|
| 36 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.