Statistics
| Revision:

root / hci / trunk / eneraptor-web-app / grails-app / controllers / com / eneraptor / hci / LoginController.groovy @ 11

History | View | Annotate | Download (485 Bytes)

1
package com.eneraptor.hci
2

    
3
class LoginController {
4

    
5
    def index = {
6
                
7
        }
8
        
9
        def sendLoginData = {
10
                
11
                if(params['username'] && params['password']) {
12
                        if(params['username'] == "test" && params['password'] == "test") {
13
                                session['loggedIn'] = true
14
                                redirect(controller:'sysState', action:'main')
15
                                return true
16
                        }
17
                }
18
                redirect(action: 'index')
19
                
20
        }
21
        
22
        def logout = {
23
                
24
                session.invalidate()
25
                redirect(action:'index')
26
                return true
27
                
28
        }
29
        
30
}