Foros de discusión

Portlet Configuration

thumbnail
Joseph Wolfe, modificado hace 13 años.

Portlet Configuration

Regular Member Mensajes: 103 Fecha de incorporación: 22/02/11 Mensajes recientes
Searched for an answer to this one to no avail.

Need to deploy portlets that are available on a role level basis. For example:

I have things configured so that

Role A - has permission to view Portlet A
Role B - has permission to view Portlet B

However when a Role A logs on he sees:

Portlet A in the correct manner
Portlet B with an error embedded in the portlet stating:
You do not have the roles required to access this portlet.

I need things to work as follows:

Role A logs on and only sees Portlet A - Portlet B is not visible at all
Role B logs on and only sees Portlet B - Portlet A is not visible at all.

I assume that this is possible but I am at a loss for an answer.

Thanks
thumbnail
Minhchau Dang, modificado hace 13 años.

RE: Portlet Configuration

Liferay Master Mensajes: 598 Fecha de incorporación: 22/10/07 Mensajes recientes
Joseph Wolfe:
I assume that this is possible but I am at a loss for an answer.

You would need to set the "layout.show.portlet.access.denied" property, as mentioned in portal properties, and you would need to make sure that your portlet doesn't have the show-portlet-access-denied set to true in your liferay-portlet.xml (for example, calendar is one portlet that has that set to true and thus ignores the property value).

#
# Set this to true if users are shown that they do not have access to a
# portlet. The portlet init parameter "show-portlet-access-denied" will
# override this setting.
#
layout.show.portlet.access.denied=true
thumbnail
Joseph Wolfe, modificado hace 13 años.

RE: Portlet Configuration

Regular Member Mensajes: 103 Fecha de incorporación: 22/02/11 Mensajes recientes
Minhchau Dang:
Joseph Wolfe:
I assume that this is possible but I am at a loss for an answer.

You would need to set the "layout.show.portlet.access.denied" property, as mentioned in portal properties, and you would need to make sure that your portlet doesn't have the show-portlet-access-denied set to true in your liferay-portlet.xml (for example, calendar is one portlet that has that set to true and thus ignores the property value).

#
# Set this to true if users are shown that they do not have access to a
# portlet. The portlet init parameter "show-portlet-access-denied" will
# override this setting.
#
layout.show.portlet.access.denied=true


Thanks for the information - it was just what the doctor ordered emoticon
thumbnail
Hitoshi Ozawa, modificado hace 13 años.

RE: Portlet Configuration

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
The easiest way seems to just create two pages - one for portlet A and another page for portlet B and assign permission to pages.

May be, you can just create communities for two different users and create private pages with community A private page containing portlet A and community B private page containing portlet B.
Sushruth P, modificado hace 12 años.

RE: Portlet Configuration

New Member Mensajes: 7 Fecha de incorporación: 21/05/11 Mensajes recientes
Joseph Wolfe:
Searched for an answer to this one to no avail.

Need to deploy portlets that are available on a role level basis. For example:

I have things configured so that

Role A - has permission to view Portlet A
Role B - has permission to view Portlet B

However when a Role A logs on he sees:

Portlet A in the correct manner
Portlet B with an error embedded in the portlet stating:
You do not have the roles required to access this portlet.

I need things to work as follows:

Role A logs on and only sees Portlet A - Portlet B is not visible at all
Role B logs on and only sees Portlet B - Portlet A is not visible at all.

I assume that this is possible but I am at a loss for an answer.

Thanks


Hi Joseph!

I tried doing the same thing, in my case both portlets get shown irrespective of whether role A or role B logs on. The portlets dont get hidden nor do I get an error message saying you dont have access to view this portlet. Anything else I need to do?