AnsweredAssumed Answered

we want to customize global/unauth.ftl through a plugin

Question asked by hymavathi on Feb 9, 2015

Hi everyone,

We need to customize global/unauth.ftl through a plugin where if a user is not a member of a particular permission group then he should be seen a dynamic message instead of the attached one. How can I achieve loading user defined template for unauthorized content.



I tried the following way to override view blogpost action class  but when I do a mvn clean package it wiped of this from the struts.xml. Can anyone let me know how I can accomplish this.


<package name="pfs-security-plugin-custom-actions" namespace="/" extends="community-actions-include">


         <action name="view-blog-post" class="com.jivesoftware.allscripts.pfssecurity.action.ASViewBlogPostAction">

            <interceptor-ref name="defaultStack"/>

            <interceptor-ref name="blogpostViewCount"/>

            <result name="success">/template/blogs/view-blog-post.ftl</result>

            <result name="moderated">/template/blogs/view-blog-post.ftl</result>

            <result name="pdf" type="pdf">/template/pdf/view-blog-post.ftl</result>

            <result name="unauthorized" type="unauthorized">plugins/pfs-security-plugin/resources/templates/unauth.ftl</result>