Hey people,
I'm extending TerminalPost
on the frontend. For some reason I cannot access the groups on the discussion's user
or lastPostedUser
when browsing the forum as a guest. This works fine when authenticated.
extend(TerminalPost.prototype, "view", function (vnode) {
const user = this.attrs.discussion.user();
if (!user) {
return;
}
const groups = user.groups();
});
In this example above, groups
is undefined ☹️
Is this intended behaviour? Is there another way for me to access the user's group when browsing unauthenticated?
Thanks
EDIT: In fact this is also happening when logged in as another user. Seems to only work when logged in with my original admin user. How strange, perhaps there's something I'm missing? It's like I can't access the groups of another user?
Yeah, just to confirm, the client can't seem to access the groups of another user
. Doesn't matter whether I use this.attrs.discussion.lastPostedUser();
or this.attrs.discussion.user();