Commit f62e58cd authored by Janne Koschinski's avatar Janne Koschinski

Fixed roles

parent f5bdee10
......@@ -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"), ","),
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment