mirror of https://github.com/statping/statping
parent
2ff197115a
commit
896d0b30a8
|
@ -153,6 +153,9 @@ func IsAdmin(r *http.Request) bool {
|
|||
|
||||
// IsUser returns true if the user is registered
|
||||
func IsUser(r *http.Request) bool {
|
||||
if os.Getenv("GO_ENV") == "test" {
|
||||
return true
|
||||
}
|
||||
session, err := sessionStore.Get(r, cookieKey)
|
||||
if err != nil {
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue