Detected 1 occurrence(s) of ‘\s*pass[word]+\s*[:=]\s*["'][a-z0-9\-_\!\$]+["']‘: adminRole = Role.findByAuthority('ROLE_ADMIN') ?:(new Role(authority: 'ROLE_ADMIN').save(flush:true)) def admin = (User.findByUsername("julio.collado")) if(!admin){ admin= new User( username:"julio.collado", password: "julio" ).save(flush:true) } if(!admin.authorities.contains(adminRole)){ UserRole.create admin, adminRole, true } } def destroy = { } } Source: http://pastie.org/pastes/9335352/download
↧