Foren

Permissions on public and private pages

Jörg Draeger, geändert vor 14 Jahren.

Permissions on public and private pages

New Member Beiträge: 9 Beitrittsdatum: 14.07.09 Neueste Beiträge
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
thumbnail
Parul Seth, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Junior Member Beiträge: 83 Beitrittsdatum: 18.12.08 Neueste Beiträge
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.
thumbnail
Aarti Jain, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Regular Member Beiträge: 116 Beitrittsdatum: 02.09.08 Neueste Beiträge

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
thumbnail
Reice Robinson, geändert vor 14 Jahren.

RE: Permissions on public and private pages

New Member Beiträge: 7 Beitrittsdatum: 13.07.09 Neueste Beiträge
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, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Junior Member Beiträge: 78 Beitrittsdatum: 17.03.09 Neueste Beiträge
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
thumbnail
Aarti Jain, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Regular Member Beiträge: 116 Beitrittsdatum: 02.09.08 Neueste Beiträge
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, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Junior Member Beiträge: 78 Beitrittsdatum: 17.03.09 Neueste Beiträge
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?
thumbnail
Aarti Jain, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Regular Member Beiträge: 116 Beitrittsdatum: 02.09.08 Neueste Beiträge
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, geändert vor 14 Jahren.

RE: Permissions on public and private pages

Junior Member Beiträge: 78 Beitrittsdatum: 17.03.09 Neueste Beiträge
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
thumbnail
Rajesh Chaurasia, geändert vor 12 Jahren.

RE: Permissions on public and private pages

Regular Member Beiträge: 183 Beitrittsdatum: 18.08.11 Neueste Beiträge
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 ?
thumbnail
Rajesh Chaurasia, geändert vor 12 Jahren.

RE: Permissions on public and private pages

Regular Member Beiträge: 183 Beitrittsdatum: 18.08.11 Neueste Beiträge
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