Navigate users to a custom page other than access denied page
My requirement is to restrict a category content only to be accessible by Administrators and I got it done with roles and permissions.
When a user other than Administrator have a conversation/thread Id from that private category (lets say some 1234) and tries to navigate to that content, obviously the user is shown "Access Denied Page". I want to navigate that user to a "custom page" other than "Access Denied page".
I tried to achive my requirement with page initialisation script like follows, But the user is still navigated to "Access Denied page"
<#if coreNode.id = “1234” />
<#if !(coreNode.permissions.hasPermission("update_community"))>
${http.response.setRedirectUrl(webuisupport.urls.page.name.get(“custom-page”).build())}
</#if>
</#if>
Is there any way to achieve my requirement?