From c15f02396a3c2b8c987ab74579768a894955c230 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sun, 14 Oct 2018 16:16:42 +1000 Subject: [PATCH] Fixed a bug where a user's tag can get desynced with their group. --- common/routes_common.go | 2 +- routes/profile.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/routes_common.go b/common/routes_common.go index 5eae03bc..9cae6a6c 100644 --- a/common/routes_common.go +++ b/common/routes_common.go @@ -241,7 +241,7 @@ func preRoute(w http.ResponseWriter, r *http.Request) (User, bool) { } var usercpy *User = BlankUser() *usercpy = *userptr - usercpy.InitPerms() + usercpy.Init() // TODO: Can we reduce the amount of work we do here? // TODO: WIP. Refactor this to eliminate the unnecessary query // TODO: Better take proxies into consideration diff --git a/routes/profile.go b/routes/profile.go index 6a95b5a0..682c7840 100644 --- a/routes/profile.go +++ b/routes/profile.go @@ -66,7 +66,7 @@ func ViewProfile(w http.ResponseWriter, r *http.Request, user common.User) commo } else if err != nil { return common.InternalError(err, w, r) } - puser.InitPerms() + puser.Init() } header.Title = common.GetTitlePhrasef("profile", puser.Name) header.Path = common.BuildProfileURL(common.NameToSlug(puser.Name), puser.ID)