Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sarah Tsang
How to manage user's private site by site admin
May 27, 2013 7:19 PM
Answer

Sarah Tsang

Rank: New Member

Posts: 16

Join Date: May 7, 2013

Recent Posts

We would like to provide limited feature to end user, just allowing them to relocate the existing portlet in the layout, saved preference in user level.
For deleting and adding portlet is owned by site admin.

Based on portal architecture, user's personal site is controlled by user, except to creating user group to inherit page. However, we allow user to relocate the portlet, if inherit user group page, its portlet cannot be adjusted by user.

Anyone have idea how to setup it?

Thanks.
Oliver Bayer
RE: How to manage user's private site by site admin
May 28, 2013 1:11 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 881

Join Date: February 18, 2009

Recent Posts

Hi Sarah,

I'm sure there are several possible solutions on how to achieve this requirement but I would try it with a custom theme. There you can override the portlet.vm file and put a condition around "$theme.iconClose()" to hide the close icon if the user isn't allowed to remove the portlet.

HTH Oli
Sarah Tsang
RE: How to manage user's private site by site admin
May 28, 2013 1:24 AM
Answer

Sarah Tsang

Rank: New Member

Posts: 16

Join Date: May 7, 2013

Recent Posts

Hi Oliver,

Thanks for your idea.
If the theme can remove the close icon, then it can fulfill the user not allow to remove portlet.

In user usage, I expected the home page is user's private site. This action I can read other posts which is needed to create custom class to change redirect path based on user's ID after login.

However, how can we manage(add/remove) portlet into user's private site by site admin? using permission in role?
Also, if some portlets are displayed in specific group user, then we also setup it by role permission in site level?
Sarah Tsang
RE: How to manage user's private site by site admin
May 28, 2013 1:59 AM
Answer

Sarah Tsang

Rank: New Member

Posts: 16

Join Date: May 7, 2013

Recent Posts

Hi Oliver,

I have tried to move "$theme.iconClose()" in portlet.vm. The layout is not showed out the close icon. Thanks a lot.

Do you know how to set condition only site admin user would be showed this icon?
Thanks.
Oliver Bayer
RE: How to manage user's private site by site admin
May 29, 2013 1:40 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 881

Join Date: February 18, 2009

Recent Posts

Hi Sarah,

yes, if you need to redirect the users based on their login or their group membership you have to create a custom class for it.

For your question regarding the management of user private pages maybe you can use the import of group pages. For each user group you can set up public and/ or private group pages, create a page structure, add portlets to specific sites. Newly added users will get this page structure imported. Maybe you have to customize come code to get the sync process of group pages and user pages to fit your requirements. Other than that I think that if I remember right only the omni admin can directly access user private pages (besides the user of course).

You can use the following snippet to check if a user is the so-called omni-admin or a community admin:
1#if ($permissionChecker.isOmniadmin() || $permissionChecker.isCommunityAdmin($layout.getGroup().getGroupId()))
2...
3#end

I've used this code in Liferay v5.2.3 so you should check if the methods and their parameters are the same for Liferay v6 but at least it should be similar.

Greets Oli
Sarah Tsang
RE: How to manage user's private site by site admin
May 29, 2013 7:41 PM
Answer

Sarah Tsang

Rank: New Member

Posts: 16

Join Date: May 7, 2013

Recent Posts

Hi Oliver,

Thanks for your solution.
User group overrride page feature is easy to manage which page can visit by group of user. However, it cannot edit by user so that user cannot relocate the portlet based on preference.

In these few days, I found that Liferay 6 has Page Customization function which may fulfill the requirement. When site admin setup the porlets in page, and enable the page customization function to set which column can edit by end user, then the perference is saved in user level.
Then, we no need to enable public and private site of user and handle the default landing page to redirect to priviate site.
One thing I have concern about page customization, once site admin is be careless to disable the some columns of page layout which is currently enabled to end user to edit, the user customization page is disappeared then displays the default page again.

Any comments for this idea?
Thanks.


Sarah
Traolly Xiong
RE: How to manage user's private site by site admin
September 15, 2014 6:29 PM
Answer

Traolly Xiong

Rank: Regular Member

Posts: 115

Join Date: December 30, 2011

Recent Posts

Permission Checker seems to only check for "Regular Roles". Any ideas on how to check for "Site Roles"?

Thanks.