From f62e58cdb1b45b36ddc3bbbb7e8abdb606c65a48 Mon Sep 17 00:00:00 2001
From: Janne Koschinski <janne@kuschku.de>
Date: Sun, 18 Mar 2018 06:27:15 +0100
Subject: [PATCH] Fixed roles

---
 util.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util.go b/util.go
index 9d1979d..cdaf5a5 100644
--- a/util.go
+++ b/util.go
@@ -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"), ","),
 	}
 }
 
-- 
GitLab