Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
Joseph Wolfe
Portlet Configuration
18 de marzo de 2011 11:07
Respuesta

Joseph Wolfe

Ranking: Regular Member

Mensajes: 103

Fecha de incorporación: 22 de febrero de 2011

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
Minhchau Dang
RE: Portlet Configuration
19 de marzo de 2011 0:36
Respuesta

Minhchau Dang

LIFERAY STAFF

Ranking: Expert

Mensajes: 349

Fecha de incorporación: 22 de octubre de 2007

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).

1#
2# Set this to true if users are shown that they do not have access to a
3# portlet. The portlet init parameter "show-portlet-access-denied" will
4# override this setting.
5#
6layout.show.portlet.access.denied=true
Joseph Wolfe
RE: Portlet Configuration
22 de marzo de 2011 10:48
Respuesta

Joseph Wolfe

Ranking: Regular Member

Mensajes: 103

Fecha de incorporación: 22 de febrero de 2011

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).

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


Thanks for the information - it was just what the doctor ordered emoticon
Hitoshi Ozawa
RE: Portlet Configuration
19 de marzo de 2011 16:18
Respuesta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensajes: 7949

Fecha de incorporación: 23 de marzo de 2010

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
RE: Portlet Configuration
25 de mayo de 2011 9:28
Respuesta

Sushruth P

Ranking: New Member

Mensajes: 7

Fecha de incorporación: 20 de mayo de 2011

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?