Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jay C
Documents and Media Portlet - Disable Action Buttons?
February 5, 2013 8:59 AM
Answer

Jay C

Rank: New Member

Posts: 10

Join Date: December 4, 2012

Recent Posts

Is their anyway to make a document and media portlet behave like a Guest User... meaning the logged in users wouldn't see the action buttons (add, sort, modify).

I have tried updating permissions with no luck as the action buttons always appear.

Any help is appreciated.
Jitendra Rajput
RE: Documents and Media Portlet - Disable Action Buttons?
February 5, 2013 9:42 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 647

Join Date: January 7, 2011

Recent Posts

Modify html/portlet/document_library/toolbar.jsp using hook. You just need to place permission check on above this line

1<liferay-ui:icon-menu align="left" cssClass="actions-button aui-helper-hidden" direction="down" icon="" id="actionsButtonContainer" message="actions" showExpanded="<%= false %>" showWhenSingleIcon="<%= true %>">
Jay C
RE: Documents and Media Portlet - Disable Action Buttons?
February 5, 2013 9:58 AM
Answer

Jay C

Rank: New Member

Posts: 10

Join Date: December 4, 2012

Recent Posts

Can you provide an example? Not sure what you mean by 'permission check'

Thanks,
Sharana Basavaraj Ballari
RE: Documents and Media Portlet - Disable Action Buttons?
February 5, 2013 11:16 AM
Answer

Sharana Basavaraj Ballari

Rank: Regular Member

Posts: 136

Join Date: September 9, 2007

Recent Posts

Hi there,

Create a new role and define only view permission on document library. Assign the created role to the user. Done.

HTH,
Sharana
Jay C
RE: Documents and Media Portlet - Disable Action Buttons?
February 5, 2013 11:45 AM
Answer

Jay C

Rank: New Member

Posts: 10

Join Date: December 4, 2012

Recent Posts

Just tried this and still see the buttons.

Does it work for you? Have you tried? Wondering if this may be a bug.....
Sharana Basavaraj Ballari
RE: Documents and Media Portlet - Disable Action Buttons?
February 6, 2013 8:03 AM
Answer

Sharana Basavaraj Ballari

Rank: Regular Member

Posts: 136

Join Date: September 9, 2007

Recent Posts

Hi Jay,

I have tried it and it works fine for me.

When you go to the control panel--> Roles--> yourCustomRole-->actions-->Define Permissions-->

Then check for Document Library in the dropdown. You will find it nearly three times i guess. Click on them and assign view permissions

Cheers,
Sharana
Jay C
RE: Documents and Media Portlet - Disable Action Buttons?
February 6, 2013 8:36 AM
Answer

Jay C

Rank: New Member

Posts: 10

Join Date: December 4, 2012

Recent Posts

Sharana Basavaraj Ballari:
Hi Jay,

I have tried it and it works fine for me.

When you go to the control panel--> Roles--> yourCustomRole-->actions-->Define Permissions-->

Then check for Document Library in the dropdown. You will find it nearly three times i guess. Click on them and assign view permissions

Cheers,
Sharana


Assigned view only permissions but the user still sees the add, sort by and manage. The 'Actions" button is removed though.

Can the other three be removed too?