2024-04-12 09:23:13 +02:00
|
|
|
package helpers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
2024-10-26 14:56:17 +02:00
|
|
|
"github.com/semaphoreui/semaphore/db"
|
2024-04-12 09:23:13 +02:00
|
|
|
"github.com/gorilla/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
func UserFromContext(r *http.Request) *db.User {
|
|
|
|
return context.Get(r, "user").(*db.User)
|
|
|
|
}
|