Changeset 40 for trunk/src/grails-app/controllers
- Timestamp:
- Jan 29, 2009, 8:31:15 PM (16 years ago)
- Location:
- trunk/src/grails-app/controllers
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/grails-app/controllers/EntryController.groovy
r21 r40 1 class EntryController { 2 1 class EntryController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/EntryTypeController.groovy
r21 r40 1 class EntryTypeController { 2 1 class EntryTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/ModificationController.groovy
r21 r40 1 class ModificationController { 2 1 class ModificationController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/ModificationTypeController.groovy
r21 r40 1 class ModificationTypeController { 2 1 class ModificationTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/PersonController.groovy
r21 r40 1 class PersonController { 2 1 class PersonController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth,except:['login', 'logout']] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 … … 80 82 } 81 83 } 84 85 def login = { 86 if (request.method == "GET") { 87 session.userId = null 88 def person = new Person() 89 } 90 else { 91 def person = Person.findByUserIdAndPassword(params.userId,params.password) 92 if (person) { 93 session.userId = person.userId 94 def redirectParams = 95 session.originalRequestParams ? 96 session.originalRequestParams : [controller:'task'] 97 redirect(redirectParams) 98 } 99 else { 100 flash['message'] = 'Please enter a valid user ID and password' 101 } 102 } 103 } 104 105 def logout = { 106 session.userId = null 107 flash['message'] = 'Successfully logged out' 108 redirect(controller:'person', action:'login') 109 } 110 111 def admin = { 112 render(view:'admin') 113 } 114 82 115 } -
trunk/src/grails-app/controllers/PersonGroupController.groovy
r19 r40 1 class PersonGroupController { 2 1 class PersonGroupController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/PersonGroupTypeController.groovy
r21 r40 1 class PersonGroupTypeController { 2 1 class PersonGroupTypeController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/TaskController.groovy
r21 r40 1 class TaskController { 2 1 class TaskController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6 -
trunk/src/grails-app/controllers/TaskGroupController.groovy
r21 r40 1 class TaskGroupController { 2 1 class TaskGroupController extends BaseController { 2 3 def beforeInterceptor = [action:this.&auth] 4 3 5 def index = { redirect(action:list,params:params) } 4 6
Note: See TracChangeset
for help on using the changeset viewer.