掲示板

Restrict default permissions on a custom portlet

thumbnail
13年前 に Pierre Henri によって更新されました。

Restrict default permissions on a custom portlet

New Member 投稿: 11 参加年月日: 09/12/04 最新の投稿
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
13年前 に Hitoshi Ozawa によって更新されました。

RE: Restrict default permissions on a custom portlet

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
WEB-INF\liferay-portlet.xml

<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
thumbnail
13年前 に Pierre Henri によって更新されました。

RE: Restrict default permissions on a custom portlet

New Member 投稿: 11 参加年月日: 09/12/04 最新の投稿
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
12年前 に Dinesh Balaji によって更新されました。

RE: Restrict default permissions on a custom portlet

Junior Member 投稿: 51 参加年月日: 10/10/06 最新の投稿
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
11年前 に Mauro Almeida によって更新されました。

RE: Restrict default permissions on a custom portlet

Junior Member 投稿: 32 参加年月日: 12/03/15 最新の投稿
Hi Julien.

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

Best regards,
MJA