留言板

requirement

kumar g,修改在11 年前。

requirement

Junior Member 帖子: 95 加入日期: 12-9-3 最近的帖子
There is a requirement from the client that out of 4 portlets that you have written only 2 should be visible to a particular category of users. How will you achieve that? What if some fields in the remaining 2 portlets have also to be controlled based on user role
thumbnail
David H Nebinger,修改在11 年前。

RE: requirement

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
You can control user portlet visibility by defining special roles, assigning the roles to users that should be able to see the portlet, then on the portlet remove the guest view permission and grant the view permission to the new role.

Internal portlet changes you would want to use a similar sort of role check whether to include the information on the generated page or not.
thumbnail
Priyanka Dhingra,修改在11 年前。

RE: requirement

Liferay Master 帖子: 501 加入日期: 11-12-20 最近的帖子
you can use RoleLocalServiceUtil for the Internal portlet changes.