Statistics
| Revision:

root / hci / trunk / eneraptor-web-app / grails-app / conf / com / eneraptor / hci / LoginFilters.groovy @ 66

History | View | Annotate | Download (614 Bytes)

1 11 alexbesir
package com.eneraptor.hci
2
3
class LoginFilters {
4
5
    def filters = {
6
        notLogin(controller:'login', invert:true) {
7
            before = {
8
9
                                if(!session["loggedIn"]) {
10 66 alexbesir
11 11 alexbesir
                                        redirect(controller: 'login');
12 66 alexbesir
                                        return false
13
14
                                } else if (!session["hwSet"] && params.controller != 'chooseHwSet') {
15
16
                                        redirect(controller: 'chooseHwSet', action: 'main')
17
                                        return false
18
19 11 alexbesir
                                }
20 66 alexbesir
21 11 alexbesir
                                return true;
22
23
            }
24
            after = {
25
26
            }
27
            afterView = {
28
29
            }
30
        }
31
    }
32
33
}