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

Last change on this file since 1443 was 1443, checked in by work@…, 10 years ago
  • refactored the importer to use the dynamic entities of gdt, instead of the hardcoded entities in Config.groovy
  • removed the hardcoded 'importable entities' from Config.groovy
  • added xbean.jar which seems to be required for the importer to be able to import xml
  • updated gdt to 0.0.5 which is required by the refactored importer
  • Property svn:keywords set to Rev Author Date
File size: 5.0 KB
Line 
1import dbnp.rest.common.CommunicationManager
2import org.apache.commons.lang.RandomStringUtils
3
4/**
5 * Application Configuration
6 *
7 * @author Jeroen Wesbeek
8 * @since 20100520
9 *
10 * Revision information:
11 * $Rev: 1443 $
12 * $Author: work@osx.eu $
13 * $Date: 2011-01-26 20:47:40 +0000 (wo, 26 jan 2011) $
14 */
15
16// locations to search for config files that get merged into the main config
17// config files can either be Java properties files or ConfigSlurper scripts
18grails.config.locations = [
19        // the default per-environment configuration
20        // (e.g. src/java/config-development.properties)
21        "classpath:config-${grails.util.GrailsUtil.environment}.properties",
22
23        // the external configuration to override the default
24        // configuration (e.g. ~/.grails-config/ci-gscf.properties)
25        "file:${userHome}/.grails-config/${grails.util.GrailsUtil.environment}-${appName}.properties"
26]
27
28grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format
29grails.mime.use.accept.header = false
30grails.mime.types = [html: ['text/html', 'application/xhtml+xml'],
31        xml: ['text/xml', 'application/xml'],
32        text: 'text/plain',
33        js: 'text/javascript',
34        rss: 'application/rss+xml',
35        atom: 'application/atom+xml',
36        css: 'text/css',
37        csv: 'text/csv',
38        all: '*/*',
39        json: ['application/json', 'text/json'],
40        form: 'application/x-www-form-urlencoded',
41        multipartForm: 'multipart/form-data'
42]
43// The default codec used to encode data with ${}
44grails.views.default.codec = "none" // none, html, base64
45grails.views.gsp.encoding = "UTF-8"
46grails.converters.encoding = "UTF-8"
47
48// enabled native2ascii conversion of i18n properties files
49grails.enable.native2ascii = true
50
51// log4j configuration
52log4j = {
53        // Example of changing the log pattern for the default console
54        // appender:
55        //
56        //appenders {
57        //    console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n')
58        //}
59       
60        // info "grails.app"
61
62        error 'org.codehaus.groovy.grails.web.servlet',  //  controllers
63                'org.codehaus.groovy.grails.web.pages', //  GSP
64                'org.codehaus.groovy.grails.web.sitemesh', //  layouts
65                'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
66                'org.codehaus.groovy.grails.web.mapping', // URL mapping
67                'org.codehaus.groovy.grails.commons', // core / classloading
68                'org.codehaus.groovy.grails.plugins', // plugins
69                'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
70                'org.springframework',
71                'org.hibernate'
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// default mail configuration, see environment specific properties file
129// for real configuration
130grails {
131        mail {
132                host = "smtp.gmail.com"
133                port = 465
134                username = "default_login@gmail.com"
135                password = "default_password"
136                props = [
137                        "mail.smtp.auth": "true",
138                        "mail.smtp.socketFactory.port": '465',
139                        "mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
140                        "mail.smtp.socketFactory.fallback": "false"
141                ]
142        }
143}
Note: See TracBrowser for help on using the repository browser.