harbor/controllers/signup.go

20 lines
416 B
Go
Raw Normal View History

package controllers
2016-05-06 14:37:44 +02:00
import (
"net/http"
)
// SignUpController handles requests to /sign_up
2016-05-06 14:37:44 +02:00
type SignUpController struct {
BaseController
}
2016-05-23 09:43:15 +02:00
// Get renders sign up page
2016-05-06 14:37:44 +02:00
func (suc *SignUpController) Get() {
2016-08-03 09:43:43 +02:00
if suc.AuthMode != "db_auth" || !suc.SelfRegistration {
suc.CustomAbort(http.StatusUnauthorized, "Status unauthorized.")
}
suc.Data["AddNew"] = false
2016-06-28 17:42:05 +02:00
suc.Forward("page_title_sign_up", "sign-up.htm")
2016-05-06 14:37:44 +02:00
}