Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dinesh Balaji
How to Restrict portlets based on the roles ?
October 24, 2011 11:04 PM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi All,

I have two roles created in DB named customer and engineer . I have a condition that the portlets that are visible on the Customer should not appear on to the Engineer page.

TO achieve this, while creating the portlets itself I have given in liferay-portal.xml and portlet.xml as
</role-mapper>
<role-mapper>
<role-name>customer</role-name>
<role-link>customer</role-link>
</role-mapper>

and in portlet.xml as

</security-role-ref>
<security-role-ref>
<role-name>customer</role-name>
</security-role-ref>

But to my surprise I not getting the portlet in the customer page also which i supposed to be available. What could be the reason ?
I saw a similar post but no solution was posted on to date - http://www.liferay.com/community/forums/-/message_boards/message/8338186
Kindly help me on this.

Warm Regards,
Dinesh V
saravanan muniraj
RE: How to Restrict portlets based on the roles ?
October 25, 2011 12:29 AM
Answer

saravanan muniraj

Rank: Junior Member

Posts: 87

Join Date: June 1, 2011

Recent Posts

Hi Dinesh,

login as admin , then you can see the there will be configuration , you can set the permission based on role.

regards
Muniraj.Saravanan
Dinesh Balaji
RE: How to Restrict portlets based on the roles ?
October 25, 2011 12:32 AM
Answer

Dinesh Balaji

Rank: Junior Member

Posts: 52

Join Date: October 6, 2010

Recent Posts

Hi Muni,

Thanks for your reply , but can you elaborate

Warm Regards,
Dinesh V
saravanan muniraj
RE: How to Restrict portlets based on the roles ?
October 25, 2011 12:43 AM
Answer

saravanan muniraj

Rank: Junior Member

Posts: 87

Join Date: June 1, 2011

Recent Posts

Hi Dinesh,

Every portlet has Configuration option along with min,max and remove option , when user logged as admin, So login as admin select Configuration and set permission

regards
Muniraj.saravanan