留言板
Restrict default permissions on a custom portlet
Pierre Henri,修改在13 年前。
Restrict default permissions on a custom portlet
New Member 帖子: 11 加入日期: 09-12-4 最近的帖子
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
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
Hitoshi Ozawa,修改在13 年前。
RE: Restrict default permissions on a custom portlet
Liferay Legend 帖子: 7942 加入日期: 10-3-24 最近的帖子
WEB-INF\liferay-portlet.xml
<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
Pierre Henri,修改在13 年前。
RE: Restrict default permissions on a custom portlet
New Member 帖子: 11 加入日期: 09-12-4 最近的帖子
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
And portlet.xml :
All these solutions don't work.
I have also tried to do the restriction in a ressource-action file, unsuccessfully.
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.
Dinesh Balaji,修改在12 年前。
RE: Restrict default permissions on a custom portlet
Junior Member 帖子: 51 加入日期: 10-10-6 最近的帖子
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
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
Mauro Almeida,修改在11 年前。
RE: Restrict default permissions on a custom portlet
Junior Member 帖子: 32 加入日期: 12-3-15 最近的帖子
Hi Julien.
Did you manage to find the solution to this? I'm having the same problem here.
Best regards,
MJA
Did you manage to find the solution to this? I'm having the same problem here.
Best regards,
MJA