• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Permission problem


Well-known member
I have a custom permission (Create private thread) and it is set to 'Yes' for a specific forum node...

In the template I've tried to check it with both of these...
<xf:if is="{{ $xf.visitor.hasPermission('forum', 'snog_create_private') }}">


<xf:if is="$xf.visitor.hasPermission('forum', 'snog_create_private')">
But, neither one works.

When I check the data at the template level (dump $xf.visitor), the permission combination is missing for the user...

This is in the forum_post_thread template, if that makes a difference.

The specific place it's being checked is immediately after
<xf:macro template="helper_thread_options" name="thread_status" arg-thread="{$thread}" />
Last edited:


Well-known member
I just discovered if I set the permission at the user group level, it works.

So, node level permissions are where the problem is.

Chris D

XenForo developer
Staff member
Well, if you want to be checking a node permission, then you don't use the hasPermission method. You'd use the hasContentPermission method instead.