Changeset 1635 for trunk/grails-app/conf/dbnp/configuration
- Timestamp:
- Mar 15, 2011, 2:06:25 PM (11 years ago)
- Location:
- trunk/grails-app/conf/dbnp/configuration
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/dbnp/configuration/BootStrapAuthentication.groovy
r1588 r1635 19 19 */ 20 20 public static void initDefaultAuthentication(springSecurityService) { 21 "setting up default authentication".grom() 21 // Grom a development message 22 if (String.metaClass.getMetaMethod("grom")) "setting up default authentication".grom() 22 23 23 24 // user work variable … … 53 54 } 54 55 } 55 56 //package dbnp.configuration57 //import dbnp.authentication.*58 //import org.codehaus.groovy.grails.commons.ConfigurationHolder59 //60 ///**61 // * @Author Jeroen Wesbeek <work@osx.eu>62 // * @Since 2010111163 // *64 // * Revision information:65 // * $Rev$66 // * $Author$67 // * $Date$68 // */69 //class BootStrapAuthentication {70 // /**71 // * set up the initial roles and users if required72 // * @visibility public73 // * @void74 // */75 // public static void initDefaultAuthentication(springSecurityService) {76 // "setting up default authentication".grom()77 //78 // // user work variable79 // def user=null80 //81 // // get configuration82 // def config = ConfigurationHolder.config83 //84 // // create the admin role85 // def adminRole = SecRole.findByAuthority('ROLE_ADMIN') ?: new SecRole(authority: 'ROLE_ADMIN').save()86 //87 // // iterate through default users, see88 // // - grails-app/conf/config-environment.properties89 // // - ~/.grails-config/environment-gscf.properties90 // config.authentication.users.each { key, values ->91 // // make sure we do not add duplicate users92 // if (!SecUser.findAllByUsername(values.username)) {93 // // create user instance94 // user = new SecUser(95 // username:values.username,96 // password:springSecurityService.encodePassword( values.password , values.username ),97 // email:values.email,98 // userConfirmed: true,99 // adminConfirmed: true100 // ).save(failOnError: true)101 //102 // // is this user an administrator?103 // if (values.administrator == 'true') {104 // SecUserSecRole.create(user, adminRole, true)105 // }106 // }107 // }108 // }109 //} -
trunk/grails-app/conf/dbnp/configuration/ExampleStudies.groovy
r1594 r1635 66 66 */ 67 67 public static void addExampleStudies(dbnp.authentication.SecUser owner, dbnp.authentication.SecUser otherUser) { 68 "inserting initial studies".grom() 68 // Grom a development message 69 if (String.metaClass.getMetaMethod("grom")) "inserting initial studies".grom() 69 70 70 71 // get configuration -
trunk/grails-app/conf/dbnp/configuration/ExampleTemplates.groovy
r1604 r1635 23 23 */ 24 24 public static void initTemplateOntologies() { 25 "inserting initial ontologies".grom() 25 // Grom a development message 26 if (String.metaClass.getMetaMethod("grom")) "inserting initial ontologies".grom() 26 27 27 28 // If running in development or test mode, add ontologies manually to speed up development and allow running offline … … 84 85 */ 85 86 public static void initTemplates() { 86 "inserting initial templates".grom() 87 // Grom a development message 88 if (String.metaClass.getMetaMethod("grom")) "inserting initial templates".grom() 87 89 88 90 def genderField = new TemplateField(
Note: See TracChangeset
for help on using the changeset viewer.