Okay, now the forum permissions should be fixed x.x

This commit is contained in:
Azareal 2018-04-24 05:09:31 +01:00
parent d6f6c362f7
commit 894e545973
1 changed files with 6 additions and 2 deletions

View File

@ -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)