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

Revision 1922, 5.4 KB (checked in by work@…, 3 years ago)

- removed all default instance configuration in favor of just one default.properties file. Instance configuration should be on the server side, not within the code. The setup wizard will help you generate a configuration file...
- removed obsolete references to searchable
- removed obsolete references to grails melody

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