Changeset 1615
- Timestamp:
- Mar 10, 2011, 11:33:08 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/application.properties
r1607 r1615 1 1 #Grails Metadata file 2 # Wed Mar 09 10:16:56CET 20112 #Thu Mar 10 11:32:59 CET 2011 3 3 app.build.display.info=0 4 4 app.build.svn.revision=1079 … … 13 13 plugins.db-util=0.4 14 14 plugins.famfamfam=1.0.1 15 plugins.gdt=0.0.2 115 plugins.gdt=0.0.22 16 16 plugins.grom=0.2.2 17 17 plugins.hibernate=1.3.7 -
trunk/grails-app/conf/BaseFilters.groovy
r1570 r1615 15 15 */ 16 16 class BaseFilters { 17 def authenticationService 18 17 19 // define filters 18 20 def filters = { … … 27 29 // set session lifetime to 1 week 28 30 session.setMaxInactiveInterval(604800) 31 } 32 } 33 34 // we need secUser in GDT::Template*, but we do not want GDT 35 // to rely on authentication. Therefore we handle it through 36 // a filter and store the loggedInUser in the session instead 37 templateEditor(controller: 'templateEditor', action: '*') { 38 // before every execution 39 before = { 40 // set the secUser in the session 41 def secUser = authenticationService.getLoggedInUser() 42 if (secUser) { 43 session.loggedInUser = secUser 44 } else { 45 // remove session variable 46 session.removeAttribute('loggedInUser') 47 48 // and redirect to login page 49 redirect(controller: 'login', action: 'auth') 50 } 29 51 } 30 52 }
Note: See TracChangeset
for help on using the changeset viewer.