Changeset 73 for branches/TaskRewrite/src/grails-app/conf
- Timestamp:
- Mar 14, 2009, 10:04:39 AM (16 years ago)
- Location:
- branches/TaskRewrite/src/grails-app/conf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TaskRewrite/src/grails-app/conf/BootStrap.groovy
r71 r73 72 72 73 73 //Person 74 def passwordEncoded = authenticateService.encodePassword("pass") 74 def passClearText = "pass" 75 def passwordEncoded = authenticateService.encodePassword(passClearText) 75 76 def personInstance 76 77 … … 78 79 firstName:"Admin", 79 80 lastName:"Powers", 81 pass:passClearText, 80 82 password:passwordEncoded, 81 83 email:"admin@example.com") 84 BootStrapSaveAndTest(personInstance) 85 personInstance.addToAuthorities(Authority.get(1)) 86 personInstance.addToAuthorities(Authority.get(2)) 87 personInstance.addToPersonGroups(PersonGroup.findByName("gnuMims")) 88 89 personInstance = new Person(loginName:"admin2", 90 firstName:"Admin2", 91 lastName:"Powers2", 92 pass:passClearText, 93 password:passwordEncoded, 94 email:"admin2@example.com") 82 95 BootStrapSaveAndTest(personInstance) 83 96 personInstance.addToAuthorities(Authority.get(1)) … … 88 101 firstName:"Demo", 89 102 lastName:"Danza", 103 pass:passClearText, 90 104 password:passwordEncoded, 91 105 email:"user@example.com") … … 97 111 firstName:"Craig", 98 112 lastName:"SuperTech", 113 pass:passClearText, 99 114 password:passwordEncoded, 100 115 email:"user@example.com") … … 103 118 personInstance.addToPersonGroups(PersonGroup.findByName("Electrical")) 104 119 105 personInstance = new Person(loginName:"jo e",106 firstName:"Jo e",120 personInstance = new Person(loginName:"john", 121 firstName:"John", 107 122 lastName:"Samples", 123 pass:passClearText, 108 124 password:passwordEncoded, 109 125 email:"user@example.com") … … 115 131 firstName:"Production", 116 132 lastName:"Mann", 133 pass:passClearText, 117 134 password:passwordEncoded, 118 135 email:"user@example.com") -
branches/TaskRewrite/src/grails-app/conf/SecurityConfig.groovy
r71 r73 46 46 alwaysUseDefaultTargetUrl = true 47 47 48 //User caching, turned this off so that password changes take effect. 49 //It would appear that user is still in the session as logout/login 50 // is still required for role changes to take effect. 51 //If this option causes high database load try: 52 // import org.acegisecurity.providers.dao.DaoAuthenticationProvider 53 // import org.acegisecurity.context.SecurityContextHolder 54 // DaoAuthenticationProvider daoAuthenticationProvider 55 // def user = SecurityContextHolder.context.authentication.principal.username 56 // daoAuthenticationProvider.userCache.removeUserFromCache(user) 57 // in logout controller and perhaps on password change and role change. 58 cacheUsers = false 59 48 60 }
Note: See TracChangeset
for help on using the changeset viewer.