フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Rob Hall
Disable link for names in comments
2012/09/24 12:35
答え

Rob Hall

ランク: Junior Member

投稿: 47

参加年月日: 2011/11/30

最近の投稿

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
2012/09/24 21:13
答え

Samuel Kong

LIFERAY STAFF

ランク: Liferay Master

投稿: 957

参加年月日: 2008/03/10

最近の投稿

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
2012/09/25 9:12
答え

Rob Hall

ランク: Junior Member

投稿: 47

参加年月日: 2011/11/30

最近の投稿

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
2012/10/19 2:51
答え

Mazhar Alam

ランク: Regular Member

投稿: 188

参加年月日: 2011/11/25

最近の投稿

Helpful post!!!