Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Rob Hall
Disable link for names in comments
24 de Setembro de 2012 12:35
Resposta

Rob Hall

Ranking: Junior Member

Mensagens: 47

Data de entrada: 30 de Novembro de 2011

Mensagens recentes

We are working with Liferay EE 6.1 GA1 and have comments enabled on various articles. However, when a user posts a comment to those articles, it attaches their picture (if available) and name in profile links that expose a security hole and gives the user access to the Control Panel and other Liferay features. Is there a configuration setting to disable the link (i.e. just show the commentor's name without a link to their profile) or can something be overwritten w/ a hook to accompllsh this?
Samuel Kong
RE: Disable link for names in comments
24 de Setembro de 2012 21:13
Resposta

Samuel Kong

LIFERAY STAFF

Ranking: Liferay Master

Mensagens: 982

Data de entrada: 10 de Março de 2008

Mensagens recentes

Yes, you should create a JSP hook. Specifically, you'll probably want to look into /html/taglib/ui/discussion/page.jsp
Rob Hall
RE: Disable link for names in comments
25 de Setembro de 2012 09:12
Resposta

Rob Hall

Ranking: Junior Member

Mensagens: 47

Data de entrada: 30 de Novembro de 2011

Mensagens recentes

That worked. I created a hook for page.jsp and replaced this

<liferay-ui:user-display
userId="<%= message.getUserId() %>"
userName="<%= HtmlUtil.escape(message.getUserName()) %>"
displayStyle="<%= 2 %>"
/>

with
<% String userName = message.getUserName(); %>
<b> <%= userName %> </b>
Mazhar Alam
RE: Disable link for names in comments
19 de Outubro de 2012 02:51
Resposta

Mazhar Alam

Ranking: Regular Member

Mensagens: 188

Data de entrada: 25 de Novembro de 2011

Mensagens recentes

Helpful post!!!