掲示板

Retrieve Site users in portlet

7年前 に Scott G によって更新されました。

Retrieve Site users in portlet

New Member 投稿: 9 参加年月日: 16/01/21 最新の投稿
Background: Using vaadin portlets for a private site. I have a custom role for additional administration/configuration for this site that is checked in the init() method of portlet. Assuming user is either an Administrator or belongs to the custom admin role I created, they have the ability to configure the portlet. I also want to give these admin users the ability to impersonate users for that portlet (not to be confused with impersonating users portal-wide in the Liferay control panel) . This is so they have the ability to debug user issues within the portlet itself. Switching the user at the portlet level is easy to do manually if you know a user's screen-name (AD username to be precise), but the chances are rare and I'd like to have them choose from a drop-down or something similar. Which leads me to my main question: how do I retrieve all the users for the site within the portlet? In my case, everyone that belongs to the site other than the omniadmin only has view rights across the site. I am not quite sure of the hierarchical steps to just get all users, regardless of role or user-group, that belongs to the site in which that particular portlet ID exists.

Thanks,
Scott
thumbnail
7年前 に David H Nebinger によって更新されました。

RE: Retrieve Site users in portlet (回答)

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
A site is still basically a group. Site members are therefore group members. You just need to get the group for the site and then you can retrieve the list of group members.

If you need to filter out by role, well that's likely going to be some sort of custom query or DQ.







Come meet me at the LSNA!
7年前 に Scott G によって更新されました。

RE: Retrieve Site users in portlet

New Member 投稿: 9 参加年月日: 16/01/21 最新の投稿
Thanks David! That was the nudge in the direction I needed.

Thanks,
Scott