root/trunk/grails-app/conf/Config.groovy @ 1106

Revision 1106, 6.9 KB (checked in by work@…, 3 years ago)

- added environments used by build scripts (e.g. ci, test and www)

  • Property svn:keywords set to Author Date Rev
Line 
1/**
2 * Application Configuration
3 *
4 * @author Jeroen Wesbeek
5 * @since 20100520
6 *
7 * Revision information:
8 * $Rev$
9 * $Author$
10 * $Date$
11 */
12
13// locations to search for config files that get merged into the main config
14// config files can either be Java properties files or ConfigSlurper scripts
15
16// grails.config.locations = [ "classpath:${appName}-config.properties",
17//                             "classpath:${appName}-config.groovy",
18//                             "file:${userHome}/.grails/${appName}-config.properties",
19//                             "file:${userHome}/.grails/${appName}-config.groovy"]
20
21// if(System.properties["${appName}.config.location"]) {
22//    grails.config.locations << "file:" + System.properties["${appName}.config.location"]
23// }
24grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
25grails.mime.use.accept.header = false
26grails.mime.types = [html: ['text/html', 'application/xhtml+xml'],
27        xml: ['text/xml', 'application/xml'],
28        text: 'text/plain',
29        js: 'text/javascript',
30        rss: 'application/rss+xml',
31        atom: 'application/atom+xml',
32        css: 'text/css',
33        csv: 'text/csv',
34        all: '*/*',
35        json: ['application/json', 'text/json'],
36        form: 'application/x-www-form-urlencoded',
37        multipartForm: 'multipart/form-data'
38]
39// The default codec used to encode data with ${}
40grails.views.default.codec = "none" // none, html, base64
41grails.views.gsp.encoding = "UTF-8"
42grails.converters.encoding = "UTF-8"
43
44// enabled native2ascii conversion of i18n properties files
45grails.enable.native2ascii = true
46
47// set per-environment serverURL stem for creating absolute links
48environments {
49        development {
50                grails.serverURL = "http://localhost:8080/${appName}"
51        }
52        ci {
53                // used by build script
54                grails.serverURL = "http://ci.gscf.nmcdsp.org"
55        }
56        test {
57                // used by build script
58                grails.serverURL = "http://test.gscf.nmcdsp.org"
59        }
60        production {
61                grails.serverURL = "http://www.nmcdsp.org"
62        }
63        www {
64                // used by build script
65                grails.serverURL = "http://www.nmcdsp.org"
66        }
67}
68
69// log4j configuration
70log4j = {
71        // Example of changing the log pattern for the default console
72        // appender:
73        //
74        //appenders {
75        //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
76        //}
77
78        error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
79                'org.codehaus.groovy.grails.web.pages', //  GSP
80                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
81                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
82                'org.codehaus.groovy.grails.web.mapping', // URL mapping
83                'org.codehaus.groovy.grails.commons', // core / classloading
84                'org.codehaus.groovy.grails.plugins', // plugins
85                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
86                'org.springframework',
87                'org.hibernate'
88
89        warn 'org.mortbay.log'
90
91        //debug 'org.codehaus.groovy.grails.plugins'
92}
93
94graphviz {
95        // graphviz installation path is dependent on OS
96        // (requirement for class diagram plugin)
97        switch (System.properties["os.name"]) {
98                case "Mac OS X":
99                        // define mac path to Graphviz dot executable
100                        // (install using macports: sudo port install graphviz)
101                        dot.executable = "/opt/local/bin/dot"
102                        break
103                default:
104                        // assume the linux default path
105                        dot.executable = "/usr/bin/dot"
106        }
107}
108
109// cryptography settings
110// @see WizardTaglib.groovy (encrypt)
111// @see TemplateEditorController.groovy (decrypt)
112crypto {
113        shared.secret = "U73reG*mE^\$t@7s!e%"
114}
115
116// GSCF specific configuration
117gscf {
118        domain = [
119                // importable entities
120                // use: grailsApplication.config.gscf.domain.entities
121                entities: [
122                        // dbnp.data
123                        'dbnp.data.FeatureBase',
124                        'dbnp.data.FeatureType',
125                        'dbnp.data.Ontology',
126                        'dbnp.data.Term',
127
128                        // dbnp.studycapturing
129                        'dbnp.studycapturing.Assay',
130                        'dbnp.studycapturing.AssayModule',
131                        'dbnp.studycapturing.AssayType',
132                        'dbnp.studycapturing.Compound',
133                        'dbnp.studycapturing.Event',
134                        'dbnp.studycapturing.EventGroup',
135                        'dbnp.studycapturing.Person',
136                        'dbnp.studycapturing.PersonAffilitation',
137                        'dbnp.studycapturing.PersonRole',
138                        'dbnp.studycapturing.Publication',
139                        'dbnp.studycapturing.Sample',
140                        'dbnp.studycapturing.SamplingEvent',
141                        'dbnp.studycapturing.Study',
142                        'dbnp.studycapturing.StudyPerson',
143                        'dbnp.studycapturing.Subject',
144                        'dbnp.studycapturing.Template',
145                        'dbnp.studycapturing.TemplateEntity',
146                        'dbnp.studycapturing.TemplateField',
147                        'dbnp.studycapturing.TemplateFieldListItem',
148                        'dbnp.studycapturing.TemplateFieldType'
149                ],
150
151                // importable entities
152                // use: grailsApplication.config.gscf.domain.importableEntities
153                // @see ImporterController
154                importableEntities: [
155                        event: [name: 'Event', entity: 'dbnp.studycapturing.Event'],
156                        sample: [name: 'Sample', entity: 'dbnp.studycapturing.Sample'],
157                        study: [name: 'Study', entity: 'dbnp.studycapturing.Study'],
158                        subject: [name: 'Subject', entity: 'dbnp.studycapturing.Subject'],
159                        samplingevent: [name: 'SamplingEvent', entity: 'dbnp.studycapturing.SamplingEvent']
160
161                ]
162        ]
163}
164
165// jquery plugin
166grails.views.javascript.library = "jquery"
167
168// Needed for the Spring Security Core plugin:
169grails.plugins.springsecurity.userLookup.userDomainClassName = 'dbnp.authentication.SecUser'
170grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'dbnp.authentication.SecUserSecRole'
171grails.plugins.springsecurity.authority.className = 'dbnp.authentication.SecRole'
172grails.plugins.springsecurity.password.algorithm = 'SHA-256'
173grails.plugins.springsecurity.password.encodeHashAsBase64 = true
174grails.plugins.springsecurity.dao.reflectionSaltSourceProperty = 'username' // Use the persons username as salt for encryption
175grails.plugins.springsecurity.securityConfigType = grails.plugins.springsecurity.SecurityConfigType.Annotation
176grails.plugins.springsecurity.successHandler.targetUrlParameter = 'spring-security-redirect'
177
178// Needed for the (copy of) the Spring Security UI plugin
179grails.plugins.springsecurity.ui.forgotPassword.emailFrom = 'gscf@dbnp.org'
180grails.plugins.springsecurity.ui.forgotPassword.emailSubject = 'Password reset GSCF'
181
182// Make sure the different controllers provided by springsecurity.ui are only accessible by administrators
183// NB: the RegisterController is used for forgotten passwords. It should be accessible by anyone
184grails.plugins.springsecurity.controllerAnnotations.staticRules = [
185        '/user/**': ['ROLE_ADMIN'],
186        '/role/**': ['ROLE_ADMIN'],
187        '/aclclass/**': ['ROLE_ADMIN'],
188        '/aclentry/**': ['ROLE_ADMIN'],
189        '/aclobjectidentity/**': ['ROLE_ADMIN'],
190        '/aclsid/**': ['ROLE_ADMIN'],
191        '/persistentlogin/**': ['ROLE_ADMIN'],
192        '/registrationcode/**': ['ROLE_ADMIN'],
193        '/requestmap/**': ['ROLE_ADMIN'],
194        '/securityinfo/**': ['ROLE_ADMIN']
195]
196
197// Needed for sending emails
198grails {
199        mail {
200                host = "smtp.gmail.com"
201                port = 465
202                username = "gscfproject@gmail.com"
203                password = "gscf2010"
204                props = [
205                        "mail.smtp.auth": "true",
206                        "mail.smtp.socketFactory.port": '465',
207                        "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
208                        "mail.smtp.socketFactory.fallback": "false"
209                ]
210        }
211}
Note: See TracBrowser for help on using the browser.