From 894e5459739c6537dcd2fb68078f54122a90d43f Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 24 Apr 2018 05:09:31 +0100 Subject: [PATCH] Okay, now the forum permissions should be fixed x.x --- common/routes_common.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/routes_common.go b/common/routes_common.go index 8975f29f..ccd6a7bd 100644 --- a/common/routes_common.go +++ b/common/routes_common.go @@ -36,7 +36,9 @@ func simpleForumUserCheck(w http.ResponseWriter, r *http.Request, user *User, fi } fperms, err := FPStore.Get(fid, user.Group) - if err != nil && err != ErrNoRows { + if err == ErrNoRows { + fperms = BlankForumPerms() + } else if err != nil { return headerLite, InternalError(err, w, r) } cascadeForumPerms(fperms, user) @@ -61,7 +63,9 @@ func forumUserCheck(w http.ResponseWriter, r *http.Request, user *User, fid int) } fperms, err := FPStore.Get(fid, user.Group) - if err != nil && err != ErrNoRows { + if err == ErrNoRows { + fperms = BlankForumPerms() + } else if err != nil { return header, InternalError(err, w, r) } cascadeForumPerms(fperms, user)