Fórumok

Restrict default permissions on a custom portlet

thumbnail
Pierre Henri, módosítva 13 év-val korábban

Restrict default permissions on a custom portlet

New Member Bejegyzések: 11 Csatlakozás dátuma: 2009.12.04. Legújabb bejegyzések
Hello,

I'm developping a custom porlet, and I would like this portlet to be only visible from the Power Users.

I can naturally configure it on every instance of the porlet, but it's not really practical (and one forgets would be dangerous).

Ideally, I would like to configure it in an xml file, but I don't know if it is possible. The portlet must be really hidden, and not render an error message (I have already set the show-portlet-access-denied and show-portlet-inactive to false).

Anyone would have a solution?
Thanx
thumbnail
Hitoshi Ozawa, módosítva 13 év-val korábban

RE: Restrict default permissions on a custom portlet

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
WEB-INF\liferay-portlet.xml

<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
thumbnail
Pierre Henri, módosítva 13 év-val korábban

RE: Restrict default permissions on a custom portlet

New Member Bejegyzések: 11 Csatlakozás dátuma: 2009.12.04. Legújabb bejegyzések
I don't think it works, with these modification, the portlet is always visible from guest or user.

I have this code in my files :

liferay-portlet.xml
<role-mapper>
	<role-name>power-user</role-name>
	<role-link>Power User</role-link>
</role-mapper>


And portlet.xml :
<security-role-ref>
	<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
	<role-name>guest</role-name>
</security-role-ref>
<security-role-ref>
	<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
	<role-name>user</role-name>
</security-role-ref>

---- OR only -----

<security-role-ref>
	<role-name>power-user</role-name>
</security-role-ref>


All these solutions don't work.

I have also tried to do the restriction in a ressource-action file, unsuccessfully.
thumbnail
Dinesh Balaji, módosítva 12 év-val korábban

RE: Restrict default permissions on a custom portlet

Junior Member Bejegyzések: 51 Csatlakozás dátuma: 2010.10.06. Legújabb bejegyzések
Dear All,

I have developed a portlet which should be visibile to one particular role.

In Portal-ext I have added this portlet- default.user.private.layout.column-1=quickfind_WAR_QuickFindportlet and this is coming in all private pages.

To restrict the same I tried restricting by liferay-portal.xml where I can given only
<role-mapper>
<role-name>customer</role-name>
<role-link>Customer</role-link>
</role-mapper>

and I have chnaged also the portlet.xml also. But still I am not able to restrict the same. Already questions are raised on this but no reply were there - http://www.liferay.com/community/forums/-/message_boards/message/8338186

Kinldy help.

Warm Regards,
Dinesh V
thumbnail
Mauro Almeida, módosítva 11 év-val korábban

RE: Restrict default permissions on a custom portlet

Junior Member Bejegyzések: 32 Csatlakozás dátuma: 2012.03.15. Legújabb bejegyzések
Hi Julien.

Did you manage to find the solution to this? I'm having the same problem here.

Best regards,
MJA