Changeset 59 for branches/TaskRewrite/src/grails-app/conf
- Timestamp:
- Feb 8, 2009, 11:28:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TaskRewrite/src/grails-app/conf/BootStrap.groovy
r58 r59 46 46 // name:"gnuMims").save() 47 47 48 //Authority 49 def authInstance 50 51 authInstance = new Authority(description:"Application Admin", 52 authority:"ROLE_ADMIN") 53 BootStrapSaveAndTest(authInstance) 54 55 authInstance = new Authority(description:"Application Admin", 56 authority:"ROLE_USER") 57 BootStrapSaveAndTest(authInstance) 48 58 49 59 //Person 50 // def passwordEncoded = authenticateService.encodePassword("pass") 60 def passwordEncoded = authenticateService.encodePassword("pass") 61 def personInstance 51 62 52 defpersonInstance = new Person(loginName:"admin",63 personInstance = new Person(loginName:"admin", 53 64 firstName:"Admin", 54 65 lastName:"Powers", 55 password: authenticateService.encodePassword("pass"),66 password:passwordEncoded, 56 67 email:"admin@example.com") 57 68 BootStrapSaveAndTest(personInstance) 69 personInstance.addToAuthorities(Authority.get(1)) 70 personInstance.addToAuthorities(Authority.get(2)) 58 71 59 //Role 60 def authInstance = new Authority(description:"Application Admin", 61 authority:"ROLE_ADMIN") 62 authInstance.addToPersons(personInstance) 63 authInstance.save() 72 personInstance = new Person(loginName:"user", 73 firstName:"Demo", 74 lastName:"Danza", 75 password:passwordEncoded, 76 email:"user@example.com") 77 BootStrapSaveAndTest(personInstance) 78 personInstance.addToAuthorities(Authority.get(2)) 64 79 65 // new Person(username:"admin", 66 // userRealName:"Admin Powers", 67 // enabled:true, 68 // 69 // new Person(personGroup:PersonGroup.get(3), 70 // firstName:"Admin", 71 // lastName:"Powers", 72 // userId:"admin", 73 // password:"pass").save() 74 // new Person(personGroup:PersonGroup.get(1), 75 // firstName:"Demo", 76 // lastName:"Danza", 77 // userId:"user", 78 // password:"pass").save() 80 personInstance = new Person(loginName:"craig", 81 firstName:"Craig", 82 lastName:"SuperTech", 83 password:passwordEncoded, 84 email:"user@example.com") 85 BootStrapSaveAndTest(personInstance) 86 personInstance.addToAuthorities(Authority.get(2)) 79 87 88 personInstance = new Person(loginName:"joe", 89 firstName:"Joe", 90 lastName:"Samples", 91 password:passwordEncoded, 92 email:"user@example.com") 93 BootStrapSaveAndTest(personInstance) 94 personInstance.addToAuthorities(Authority.get(2)) 80 95 81 // new Person(personGroup:PersonGroup.get(1), 82 // firstName:"Craig", 83 // lastName:"SuperTech", 84 // userId:"craig", 85 // password:"pass").save() 86 // new Person(personGroup:PersonGroup.get(2), 87 // firstName:"Joe", 88 // lastName:"Samples", 89 // userId:"joe", 90 // password:"pass").save() 91 // new Person(personGroup:PersonGroup.get(1), 92 // firstName:"Production", 93 // lastName:"Mann", 94 // userId:"Mann", 95 // password:"pass").save() 96 personInstance = new Person(loginName:"mann", 97 firstName:"Production", 98 lastName:"Mann", 99 password:passwordEncoded, 100 email:"user@example.com") 101 BootStrapSaveAndTest(personInstance) 102 personInstance.addToAuthorities(Authority.get(2)) 103 96 104 97 105 //TaskGroup
Note: See TracChangeset
for help on using the changeset viewer.