mirror of
https://github.com/h44z/wg-portal.git
synced 2025-12-14 02:26:19 +00:00
validate user in session (#32)
This commit is contained in:
@@ -192,3 +192,10 @@ func (s *Server) setFormInSession(c *gin.Context, formData interface{}) (Session
|
||||
|
||||
return currentSession, nil
|
||||
}
|
||||
|
||||
func (s *Server) isUserStillValid(email string) bool {
|
||||
if s.users.GetUser(email) == nil {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user