mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
13 lines
210 B
Go
13 lines
210 B
Go
package helpers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/ansible-semaphore/semaphore/db"
|
|
"github.com/gorilla/context"
|
|
)
|
|
|
|
func UserFromContext(r *http.Request) *db.User {
|
|
return context.Get(r, "user").(*db.User)
|
|
}
|