Foros de discusión

Liferay 6.1.1 CE GA2 disable Add Application and Manage Page for user

thumbnail
Sunil Rai, modificado hace 11 años.

Liferay 6.1.1 CE GA2 disable Add Application and Manage Page for user

Junior Member Mensajes: 57 Fecha de incorporación: 31/01/12 Mensajes recientes
I want to disable add application and manage page for normal user. It should be only available for administrator . I am using property
layout.user.public.layouts.modifiable=false
in portal-ext.properties, but still it is showing modify options on user public and private pages.

Reference links:

https://www.liferay.com/community/forums/-/message_boards/message/1761995

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/lp-6-1-ugen06-user-personal-sites-0

I tried with settings mentioned in the above links but I am not able to implement it. Other options like hide public page, private page , control panel etc is working fine for me. I am deploying my portal on Ubuntu Server 12.10.
thumbnail
David H Nebinger, modificado hace 11 años.

RE: Liferay 6.1.1 CE GA2 disable Add Application and Manage Page for user

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
You can either do this in your theme (edit portal_normal.vm to put conditional logic around the #dockbar line) or your can do a JSP hook on html/portlet/dockbar.view.jsp to conditionally include the dockbar div.

We use a JSP hook. In our hook we check the roles that a user has, and only include the dockbar div if they are an administrator.

We elected to use the JSP hook because we didn't want to have to remember to duplicate the logic in all of the themes...

P.s the property just defines whether the user can add/remove portlets on their public pages, it has nothing to do w/ whether they can modify options on the pages or not.
thumbnail
Sunil Rai, modificado hace 11 años.

RE: Liferay 6.1.1 CE GA2 disable Add Application and Manage Page for user

Junior Member Mensajes: 57 Fecha de incorporación: 31/01/12 Mensajes recientes
I think creating a hook will be good option. I will check and post the update.

Thanks
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: Liferay 6.1.1 CE GA2 disable Add Application and Manage Page for user

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Modify view.jsp of dockbar portlet in hook. You can create custom role and define required permission on that role.
Check for that role in hook.

<c:if test="<%= (!group.isControlPanel() && (!group.hasStagingGroup() || group.isStagingGroup()) && (GroupPermissionUtil.contains(permissionChecker, group.getGroupId(), ActionKeys.ADD_LAYOUT) || hasLayoutUpdatePermission || (layoutTypePortlet.isCustomizable() && layoutTypePortlet.isCustomizedView() && hasLayoutCustomizePermission))) && hasApplicationRole %>">


See at the end code checking for if use has hasApplicationRole role or not. If user dont have that role then add application menu wont be visible to that user.

You need to define below permission to make add application menu visible to user who has this "ApplicationRole".


General -->Sites -- > Page -- > Customize
General -->Sites -- > Page -- > Update
General -->Sites -- > Site -- > Add Page