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

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