フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
shahab mahtab
portlet access control by user role
2012/01/12 7:03
答え

shahab mahtab

ランク: New Member

投稿: 5

参加年月日: 2011/12/12

最近の投稿

Hi:

I would like to grant access to a portlet ("add to page" and "view") based on few custom roles only, which are imported from LDAP.
I have defined the roles in portlet.xml and liferay-portlet.xml of the portlet.

However, it looks like any user can view the portlet. What is the correct way to enforce it?

I have tried adding the permission file (resource-actions\....xml). I can restrict guests from viewing the portlet this way. But, it looks like "resource-action-mapping" DTD does not support custom roles.

Is there a way to enfore role based access control without using the built-in Permissions GUI?

Thanks.
David H Nebinger
RE: portlet access control by user role
2012/01/12 8:02
答え

David H Nebinger

Community Moderator

ランク: Liferay Legend

投稿: 11060

参加年月日: 2006/09/01

最近の投稿

Sure...

Drop the portlet on the page, go to the configuration page for the portlet, to the permissions tab, and set the permissions there. Disable guest perms on the portlet, and you should be golden...
shahab mahtab
RE: portlet access control by user role
2012/01/12 8:37
答え

shahab mahtab

ランク: New Member

投稿: 5

参加年月日: 2011/12/12

最近の投稿

Hi:

Can I configure it from any configuration file other than the "Permissions" tab?

Thanks
Mauro Almeida
RE: portlet access control by user role
2012/05/03 8:58
答え

Mauro Almeida

ランク: Junior Member

投稿: 32

参加年月日: 2012/03/15

最近の投稿

Hi Shahab.

Did you manage to overcome this?

Best regards,
MJA
Thomas Berg
RE: portlet access control by user role
2012/05/03 9:09
答え

Thomas Berg

ランク: Regular Member

投稿: 134

参加年月日: 2009/09/07

最近の投稿

Hello Shahab,
You should be able to achieve what you need by reading the information in this thread

HTH

Regards / Thomas
shahab mahtab
RE: portlet access control by user role
2012/05/03 16:17
答え

shahab mahtab

ランク: New Member

投稿: 5

参加年月日: 2011/12/12

最近の投稿

Hi HTH,

I believe, resource-action-mapping takes some pre-defined roles only (guest, community etc.). I ended up writing a filter to checks user's role, and show appropriate message if user is not authorized.

My use case is slightly different. Users are accessing some pre-configured pages with bunch of portlets, and they can view portlets that they are entitled to. (users' entitlement can change dynamically)

Thanks
Shahab
Pablo Martin
RE: portlet access control by user role
2015/02/02 9:46
答え

Pablo Martin

ランク: New Member

投稿: 5

参加年月日: 2015/01/20

最近の投稿

Hi,

I have 2 instances on my liferay
and some portlets deployment and list of portlets in dockbar on adding cannot be seen to another neither the administrator of the another instance.

create a hook to some .jsp is it good ?
How i suppose to do that?

Regards,
Pablo M.