Made auth use full ID instead, to support different auth methods in the future.

This commit is contained in:
2017-10-07 12:34:29 +02:00
parent def7189c35
commit 6a3e70b21b
2 changed files with 7 additions and 4 deletions
+2
View File
@@ -11,6 +11,7 @@ import (
// Base is the basic information used to render the page
type Base struct {
User struct {
ID string
Name string
Role string
LoggedIn bool
@@ -23,6 +24,7 @@ func (base *Base) setupBase(user *auth.User, viewTitle string) {
if user != nil {
log.Printf("%+v", user)
base.User.ID = user.FullID()
base.User.Name = user.ID
base.User.Role = user.Data["role"]
base.User.LoggedIn = true