Add comment to AuthorizedUser
parent
3430eeb84b
commit
0517a87954
|
@ -47,6 +47,9 @@ func AuthorizedToken(auth oauth2.Authenticator, logger chronograf.Logger, next h
|
|||
})
|
||||
}
|
||||
|
||||
// AuthorizedUser extracts the user name and provider from context. If the user and provider can be found on the
|
||||
// context, we look up the user by their name and provider. If the user is found, we verify that the user has at
|
||||
// at least the role supplied.
|
||||
func AuthorizedUser(store chronograf.UsersStore, useAuth bool, role string, logger chronograf.Logger, next http.HandlerFunc) http.HandlerFunc {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if !useAuth {
|
||||
|
|
Loading…
Reference in New Issue