Skip to content
Snippets Groups Projects
Commit f62e58cd authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixed roles

parent f5bdee10
Branches
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import (
"time"
"database/sql"
"github.com/go-redis/redis"
"strings"
)
type UserInfo struct {
......@@ -49,12 +50,11 @@ type Album struct {
}
func parseUser(r *http.Request) UserInfo {
println(r.Header.Get("X-Auth-Roles"))
return UserInfo{
r.Header.Get("X-Auth-Subject"),
r.Header.Get("X-Auth-Username"),
r.Header.Get("X-Auth-Email"),
[]string{},
strings.Split(r.Header.Get("X-Auth-Roles"), ","),
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment