Changeset 64
- Timestamp:
- Feb 9, 2009, 8:31:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TaskRewrite/src/grails-app/conf/BootStrap.groovy
r59 r64 34 34 35 35 //TypeOfPersonGroup 36 // new PersonGroupType(name:"Department").save() 37 // new PersonGroupType(name:"Contractor").save() 38 // new PersonGroupType(name:"ProjectTeam").save() 36 def personGroupTypeInstance 37 personGroupTypeInstance = new PersonGroupType(name:"Department") 38 BootStrapSaveAndTest(personGroupTypeInstance) 39 personGroupTypeInstance = new PersonGroupType(name:"Contractor") 40 BootStrapSaveAndTest(personGroupTypeInstance) 41 personGroupTypeInstance = new PersonGroupType(name:"ProjectTeam") 42 BootStrapSaveAndTest(personGroupTypeInstance) 39 43 40 44 //PersonGroup 41 // new PersonGroup(personGroupType:PersonGroupType.findByName("Department"), 42 // name:"Electrical").save() 43 // new PersonGroup(personGroupType:PersonGroupType.get(2), 44 // name:"Kewl AirCon Guys").save() 45 // new PersonGroup(personGroupType:PersonGroupType.get(3), 46 // name:"gnuMims").save() 45 def personGroupInstance 46 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.findByName("Department"), 47 name:"Electrical") 48 BootStrapSaveAndTest(personGroupInstance) 49 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.findByName("Department"), 50 name:"Mechanical") 51 BootStrapSaveAndTest(personGroupInstance) 52 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.findByName("Department"), 53 name:"Production") 54 BootStrapSaveAndTest(personGroupInstance) 55 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.get(2), 56 name:"Kewl AirCon Guys") 57 BootStrapSaveAndTest(personGroupInstance) 58 personGroupInstance = new PersonGroup(personGroupType:PersonGroupType.get(3), 59 name:"gnuMims") 60 BootStrapSaveAndTest(personGroupInstance) 47 61 48 62 //Authority … … 69 83 personInstance.addToAuthorities(Authority.get(1)) 70 84 personInstance.addToAuthorities(Authority.get(2)) 85 personInstance.addToPersonGroups(PersonGroup.findByName("gnuMims")) 71 86 72 87 personInstance = new Person(loginName:"user", … … 77 92 BootStrapSaveAndTest(personInstance) 78 93 personInstance.addToAuthorities(Authority.get(2)) 94 personInstance.addToPersonGroups(PersonGroup.findByName("Electrical")) 79 95 80 96 personInstance = new Person(loginName:"craig", … … 85 101 BootStrapSaveAndTest(personInstance) 86 102 personInstance.addToAuthorities(Authority.get(2)) 103 personInstance.addToPersonGroups(PersonGroup.findByName("Electrical")) 87 104 88 105 personInstance = new Person(loginName:"joe", … … 93 110 BootStrapSaveAndTest(personInstance) 94 111 personInstance.addToAuthorities(Authority.get(2)) 112 personInstance.addToPersonGroups(PersonGroup.findByName("Mechanical")) 95 113 96 114 personInstance = new Person(loginName:"mann", … … 101 119 BootStrapSaveAndTest(personInstance) 102 120 personInstance.addToAuthorities(Authority.get(2)) 103 121 personInstance.addToPersonGroups(PersonGroup.findByName("Production")) 104 122 105 123 //TaskGroup
Note: See TracChangeset
for help on using the changeset viewer.