source: trunk/grails-app/conf/Config.groovy @ 1588

Last change on this file since 1588 was 1588, checked in by s.h.sikkema@…, 9 years ago

Fixed tests (except webtests); cleaned up Example{Studies,Templates}.groovy; decapitalized injected services; made 'transactional' properties static

  • Property svn:keywords set to Rev Author Date
File size: 4.8 KB
Line 
1 /**
2 * Application Configuration
3 *
4 * @author Jeroen Wesbeek
5 * @since 20100520
6 *
7 * Revision information:
8 * $Rev: 1588 $
9 * $Author: s.h.sikkema@gmail.com $
10 * $Date: 2011-03-04 11:30:52 +0000 (vr, 04 mrt 2011) $
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
15grails.config.locations = [
16        // the default per-environment configuration
17        // (e.g. src/java/config-development.properties)
18        "classpath:config-${grails.util.GrailsUtil.environment}.properties",
19
20        // the external configuration to override the default
21        // configuration (e.g. ~/.grails-config/ci-gscf.properties)
22        "file:${userHome}/.grails-config/${grails.util.GrailsUtil.environment}-${appName}.properties"
23]
24
25grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
26grails.mime.use.accept.header = false
27grails.mime.types = [html: ['text/html', 'application/xhtml+xml'],
28        xml: ['text/xml', 'application/xml'],
29        text: 'text/plain',
30        js: 'text/javascript',
31        rss: 'application/rss+xml',
32        atom: 'application/atom+xml',
33        css: 'text/css',
34        csv: 'text/csv',
35        all: '*/*',
36        json: ['application/json', 'text/json'],
37        form: 'application/x-www-form-urlencoded',
38        multipartForm: 'multipart/form-data'
39]
40// The default codec used to encode data with ${}
41grails.views.default.codec = "none" // none, html, base64
42grails.views.gsp.encoding = "UTF-8"
43grails.converters.encoding = "UTF-8"
44
45// enabled native2ascii conversion of i18n properties files
46grails.enable.native2ascii = true
47
48// log4j configuration
49log4j = {
50        // Example of changing the log pattern for the default console
51        // appender:
52        //
53        //appenders {
54        //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
55        //}
56       
57        // info "grails.app"
58
59        error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
60                'org.codehaus.groovy.grails.web.pages', //  GSP
61                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
62                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
63                'org.codehaus.groovy.grails.web.mapping', // URL mapping
64                'org.codehaus.groovy.grails.commons', // core / classloading
65                'org.codehaus.groovy.grails.plugins', // plugins
66                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
67                'org.springframework',
68                'org.hibernate'
69
70    error stdout:"StackTrace"
71
72        warn 'org.mortbay.log'
73
74        //info 'org.codehaus.groovy.grails.web.servlet',
75        //       'org.codehaus.groovy.grails.plugins'
76        //
77        //debug 'org.codehaus.groovy.grails.plugins'
78}
79
80graphviz {
81        // graphviz installation path is dependent on OS
82        // (requirement for class diagram plugin)
83        switch (System.properties["os.name"]) {
84                case "Mac OS X":
85                        // define mac path to Graphviz dot executable
86                        // (install using macports: sudo port install graphviz)
87                        dot.executable = "/opt/local/bin/dot"
88                        break
89                default:
90                        // assume the linux default path
91                        dot.executable = "/usr/bin/dot"
92        }
93}
94
95// jquery plugin
96grails.views.javascript.library = "jquery"
97
98// Needed for the Spring Security Core plugin:
99grails.plugins.springsecurity.userLookup.userDomainClassName = 'dbnp.authentication.SecUser'
100grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'dbnp.authentication.SecUserSecRole'
101grails.plugins.springsecurity.authority.className = 'dbnp.authentication.SecRole'
102grails.plugins.springsecurity.password.algorithm = 'SHA-256'
103grails.plugins.springsecurity.password.encodeHashAsBase64 = true
104grails.plugins.springsecurity.dao.reflectionSaltSourceProperty = 'username' // Use the persons username as salt for encryption
105grails.plugins.springsecurity.securityConfigType = grails.plugins.springsecurity.SecurityConfigType.Annotation
106grails.plugins.springsecurity.successHandler.targetUrlParameter = 'spring-security-redirect'
107
108// Needed for the (copy of) the Spring Security UI plugin
109grails.plugins.springsecurity.ui.forgotPassword.emailFrom = 'gscf@dbnp.org'
110grails.plugins.springsecurity.ui.forgotPassword.emailSubject = 'Password reset GSCF'
111
112// Make sure the different controllers provided by springsecurity.ui are only accessible by administrators
113// NB: the RegisterController is used for forgotten passwords. It should be accessible by anyone
114grails.plugins.springsecurity.controllerAnnotations.staticRules = [
115        '/user/**': ['ROLE_ADMIN'],
116        '/role/**': ['ROLE_ADMIN'],
117        '/aclclass/**': ['ROLE_ADMIN'],
118        '/aclentry/**': ['ROLE_ADMIN'],
119        '/aclobjectidentity/**': ['ROLE_ADMIN'],
120        '/aclsid/**': ['ROLE_ADMIN'],
121        '/persistentlogin/**': ['ROLE_ADMIN'],
122        '/registrationcode/**': ['ROLE_ADMIN'],
123        '/requestmap/**': ['ROLE_ADMIN'],
124        '/securityinfo/**': ['ROLE_ADMIN']
125]
126
127// Temporary directory to upload files to.
128// If the directory is given relative (e.g. 'fileuploads/temp'), it is taken relative to the web-app directory
129// Otherwise, it should be given as an absolute path (e.g. '/home/user/sequences')
130// The directory should be writable by the webserver user
131uploads.uploadDir = (new File("/tmp")?.canWrite()) ? "/tmp" : "fileuploads"
Note: See TracBrowser for help on using the repository browser.