Forums

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

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jörg Draeger
Permissions on public and private pages
July 14, 2009 6:17 AM
Answer

Jörg Draeger

Rank: New Member

Posts: 10

Join Date: July 14, 2009

Recent Posts

Hi,

I'm new to Liferay and so I've a few basic questions about understandig how Liferay works.

First of all, is it possible to give different permissions to an user for public and private pages of an organization? For example, is there a way to let him manage private but not public pages.

As I've seen right now the configuration of my account for the forum is just like I want it to be. No manage pages rights for th public pages of "My Community" and manages pages rights for the private ones.

Also I'm interested in no private pages for the Guest community like here for my account.

What kind of configuration settings/options do I have to choose.

Thanks,
Jörg
Parul Seth
RE: Permissions on public and private pages
July 14, 2009 6:53 AM
Answer

Parul Seth

Rank: Junior Member

Posts: 83

Join Date: December 18, 2008

Recent Posts

Hi Jorg

Yes these things are very much possible. emoticon

You can set permissions for public and private pages (go to Manage Pages>Permissions), for individual portlets (Configuration>>permissions). You can do this via control panel also .

There are various types of roles like Guest (for unauthenticated users), community members etc which will limit the scope of a user in your portal. So for not letting unauthenticated users view your, say. "forum" you can uncheck the "View" permission for "Guests" via the permissions tab of the forum portlet.

To have a general information about permissioning refer this

HTH

Thanks & Regards
Parul Seth
Impetus Infotech (India) Pvt. Ltd.
Aarti Jain
RE: Permissions on public and private pages
July 14, 2009 8:32 AM
Answer

Aarti Jain

Rank: Regular Member

Posts: 116

Join Date: September 2, 2008

Recent Posts


As I've seen right now the configuration of my account for the forum is just like I want it to be. No manage pages rights for th public pages of "My Community" and manages pages rights for the private ones.


Newer versions of liferay provide a personal community, that is, My Community, for each registered user. In My Community, users can have a set of public and private pages.

If you want that users should not modify their public pages then in portal-ext.properties add:

layout.user.public.layouts.modifiable=false

By adding this users will not have the option to manage public pages just as in liferay site.


Also I'm interested in no private pages for the Guest community like here for my account


If any community has 0 private pages or 0 public pages and you don't want to display in my places then this can be done by adding

following properties to portal-ext.properties file:

my.places.show.community.private.sites.with.no.layouts=false
my.places.show.community.public.sites.with.no.layouts=false

portal-ext.properties needs to be created in folder webapps/ROOT/WEB-INF/classes. This file overrides the actual configurations done in portal.properties

Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
Reice Robinson
RE: Permissions on public and private pages
July 15, 2009 6:53 PM
Answer

Reice Robinson

Rank: New Member

Posts: 7

Join Date: July 12, 2009

Recent Posts

I have a question about the layout.user.public.layouts.modifiable property it seems that with this set to false in order to stop users editing there public pages I as the administrator can not modify their or my pages either through the control panel. The Users - Actions - Manage pages selection gives the message that I don't have permission. Can anyone help me here I was under the impression administrators have full permission to everything.
Sreeranj S
RE: Permissions on public and private pages
July 16, 2009 1:36 AM
Answer

Sreeranj S

Rank: Junior Member

Posts: 78

Join Date: March 17, 2009

Recent Posts

Hi Aarati,



Do you know any option to make the private and public pages available to only a few set of users(for eg: managers), Can we define a custom role and make the users part of that particular role and make the private and public pages available to them. I also want all the users to be part of power user role.

So all users assigned to power user role without user private and public page.
Managerial users assigned to power user role and a custom role which have the user private and public page.

Please let me know if you have a solution for this.


Thanks,
Sreeranj.S
Aarti Jain
RE: Permissions on public and private pages
July 17, 2009 8:18 AM
Answer

Aarti Jain

Rank: Regular Member

Posts: 116

Join Date: September 2, 2008

Recent Posts

Hi Sreeranj,

From version 5.1.0 , Personal Community is for everyone. No Power User role required for this.

Refer to this post Personal Community

In ServicePreAction, instead of Power User role you can check for any other role for which you want personal community ie public and private pages.

Hope That Helps !!!

Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
Sreeranj S
RE: Permissions on public and private pages
July 20, 2009 2:10 AM
Answer

Sreeranj S

Rank: Junior Member

Posts: 78

Join Date: March 17, 2009

Recent Posts

Thank you Aarti,


I think we can just hide the My community(User pages) for power user role by adding the given below codes in portal-ext.properties insted of modifying code in ServicePreAction.

layout.user.public.layouts.power.user.required=true
layout.user.private.layouts.power.user.required=true


But how can we do this for a custom role like Managers, any ideas?
Aarti Jain
RE: Permissions on public and private pages
July 20, 2009 6:10 AM
Answer

Aarti Jain

Rank: Regular Member

Posts: 116

Join Date: September 2, 2008

Recent Posts

Hi Sreeranj,

You can define the property in portal-ext.properties only for power user role not for any other role.

This is because in earlier versions of liferay it was mandatory for a user to have this role to own a personal community and in newer versions it is not so. So in newer versions this property was made so that anyone can proceed with their old logic of only Power Users receiving a personal community.

If you want that users with your custom role owns personal community you have to modify updateUserLayouts(User user) method in ServicePreAction.java. Here you can check if the user is assigned the custom role then add the default private and public layouts.Just like it is implemented for power user role you can implement it for your custom role too.


Regards,
Aarti Jain
Impetus Infotech Pvt. Ltd.
Noida
Sreeranj S
RE: Permissions on public and private pages
July 21, 2009 1:45 AM
Answer

Sreeranj S

Rank: Junior Member

Posts: 78

Join Date: March 17, 2009

Recent Posts

Thank you for your help and quick response, Aarti.

Actually, why I need to do this was due to another issue, I will brief it.

I need only mangers to get the My community(User pages), so I have removed all users from power user role and added some people to the power user role to get the private and public pages. Then an issue popped up, ie when a document in the document library is linked to the Web content( Web content display) that link was only accessed by the power user, If a user try to access it an error is generated in the catalina.out (Invalid URL) and it the link is redirected to the home page. It happens only when the user is assigned with user role and any custom role, but the document url works perfect with power user, administrator and guest role. But user can access the document from document library directly without any issue, issue occurs only when a document is linked as a link through web content.


I thought it was permission issue, but when I checked the permission for document is given view for all roles and same is the case for page and web content.

I have posted this issue in the Liferay forum and I did not get any answer, now I found a work around, add all users to guest community so that all users can access the document link from Web content without any issue,but still the reason is unknown to me .

The same issue also happens with any document in document library linked as web content in any organization created. and the work around works for it.

Given below is the error generated when an user access the document linked through web content.

12:36:14,942 ERROR [RequestProcessor:676] Invalid path was requested /common/error
12:36:14,944 ERROR [PortalRequestProcessor:480] User ID 14019
12:36:14,945 ERROR [PortalRequestProcessor:481] Current URL /c/document_library/get_file?uuid=9128d76e-2bec-4b01-b126-10141fac0ae1&groupId=16712
12:36:14,947 ERROR [PortalRequestProcessor:482] Referer http://192.168.x.x:8080/web/guest
12:36:14,949 ERROR [PortalRequestProcessor:483] Remote address 192.168.x.x
12:36:14,950 ERROR [PortalRequestProcessor:485] Invalid path was requested /common/error



If you can guess something that would be great and will be helpful.



Thanks and Have a great day!

Sreeranj.S
Rajesh Chaurasia
RE: Permissions on public and private pages
January 17, 2012 10:59 PM
Answer

Rajesh Chaurasia

Rank: Regular Member

Posts: 119

Join Date: August 18, 2011

Recent Posts

have created a screen with changes done to organization creation screen of liferay.I get the details of organziation with their id and name from another application.Based onb thsoe ids i insert organiation objects.

While creating organization with a custom id (rather than auto generated ids of liferay ) ,i insert following with new cjurrently applivcable id
groups_, assetentry_,layout_,layoutset,resourcepermission.

After insert when i go tlo pages screen of organization create screen , I have link for opening public pages in new window.
When I click on it it opens the page template screen of site for an organization.

My probelm is that I am able to open page template screen in new windiow ,but this happens sometimes and other times it fails to open .It says that too many redirects are being generated and response cant be geenrated.

Can you let me know what could be the reasons behind this ?
Rajesh Chaurasia
RE: Permissions on public and private pages
January 18, 2012 2:28 AM
Answer

Rajesh Chaurasia

Rank: Regular Member

Posts: 119

Join Date: August 18, 2011

Recent Posts

This is the url that is being formed on clicking the page templates link thnat opens the new window with folowing url in address bar:
http://localhost:8080/group/control_panel/manage?p_auth=ouuhc4jV&p_p_auth=tVkD8Uul&p_p_id=49&p_p_lifecycle=1&p_p_state=maximized&p_p_mode=view&doAsGroupId=10157&refererPlid=10450&_49_struts_action=%2Fmy_places%2Fview&_49_groupId=1&_49_privateLayout=true