留言板

Guest role permission to view all the public pages want to disable

thumbnail
Nilesh Gundecha,修改在12 年前。

Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Hi Friends,

By default the Guest role has the permission to view all the public pages of any User, any Organization or any Community. I want to disable this feature, I want that Guest role should have a permission to view only the public pages under the Guest Community.

Any help would be highly appreciated.

Many Thanks and Regards,
Nilesh.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Can anyone please help on this please?

Regards,
Nilesh
thumbnail
Jignesh Thakkar,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Junior Member 帖子: 26 加入日期: 10-5-10 最近的帖子
Hi Nilesh

Based on your requirement, you have other option also, like to create the private page of Community and Organization except Guest Community.

In Liferay,by default private pages are not visible to guest.

So you can try this one also.

let me know if you want more information
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Hi Jignesh,

Thanks a lot for your reply.

If I go with the above solution, I think this will also restrict the other logged in users (who are not the member of the particular Organization) from visiting these private pages.

What I am looking for is that I want these pages of Organization to be accessed by all the Logged in users but not by the guest.

Please help.

Thanks and Regards,
Nilesh.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Any solution please?
thumbnail
Jan Gregor,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 224 加入日期: 10-10-20 最近的帖子
Hi Nilesh,

I think the solution was already proposed. By settting the organization or community private, only members and thus logged users can access those pages. You can also create a model-listener hook, which will apply your custom permission logic after adding/updating a new page.

Regards,

Jan.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Hi Jan,

Thanks a lot for your reply.

I am aware about the Communities to be Open/Restricted/Private. But I didnt find same for the Organization. I mean I am not getting any option for mentioning the same for Organization. If I am missing something then please let me know.

Thanks and Regards,
Nilesh.


Jan Gregor:
Hi Nilesh,

I think the solution was already proposed. By settting the organization or community private, only members and thus logged users can access those pages. You can also create a model-listener hook, which will apply your custom permission logic after adding/updating a new page.

Regards,

Jan.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Sorry, I didnt mention the LR version I am using. It is Liferay 6.0.6 CE.
thumbnail
Jan Gregor,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 224 加入日期: 10-10-20 最近的帖子
Hi Nilesh,

Each organization has its private/public pages. For you the best option will be to create only private pages for each organization. These pages have automatically removed the view premission for Guest role. As mentioned before, you can always create your model-listener hook for Layout object, which will set your preffered permissions after each operation done on Layout object.

Regards,

Jan.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Thanks Jan for the reply.

As I already mentioned in this thread, creating all the pages of Organization to be private, does not seem to solve my problem. Just trying to elaborate it little more: -

There are 3 kinds of users in this context : -
1) Organization Members (These are the user who are members in the Organization)
2) Logged-in Users (These all the users having their account in Portal and logged in)
3) Guest Users (These are the non-logged in users)

Now I want to have to pages for an Organization which should be accessed by (1) Organization Members and (2) Logged-in Users.
But not by the (3) Guest Users

If I make the private pages for an Organization, I agree these will not be accessible to (3) Guest Users. But these will neither be accessible by (2) Logged-in Users.

Well, I feel that the only solution seems to be "Model-Listener Hook". But still if there is some easy solution then let me know.

Many Thanks and Regards,
Nilesh.
thumbnail
Dhrutika Parekh,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Expert 帖子: 435 加入日期: 09-2-9 最近的帖子
Nilesh Gundecha:
Thanks Jan for the reply.

As I already mentioned in this thread, creating all the pages of Organization to be private, does not seem to solve my problem. Just trying to elaborate it little more: -

There are 3 kinds of users in this context : -
1) Organization Members (These are the user who are members in the Organization)
2) Logged-in Users (These all the users having their account in Portal and logged in)
3) Guest Users (These are the non-logged in users)

Now I want to have to pages for an Organization which should be accessed by (1) Organization Members and (2) Logged-in Users.
But not by the (3) Guest Users

If I make the private pages for an Organization, I agree these will not be accessible to (3) Guest Users. But these will neither be accessible by (2) Logged-in Users.

Well, I feel that the only solution seems to be "Model-Listener Hook". But still if there is some easy solution then let me know.

Many Thanks and Regards,
Nilesh.



Hi Nilesh,

One solution that might fulfill your requirement.

When you create page, Under Manage pages you will see 'Page' tab
There you will find Save,Permissions and Delete buttons.
Click on permissions and uncheck Guest view permission and Save it.

Regards,
Dhrutika
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Thanks Dhrutika.

This solution looks good. This can fulfill my requirement.

I feel there must be some configuration in Liferay for defining the default permissions for the pages. If I get this, then the task of configuring permissions for every page creation can also be saved.

Will check and post if I get it.

Many Thanks,
Nilesh.
thumbnail
Dhrutika Parekh,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Expert 帖子: 435 加入日期: 09-2-9 最近的帖子
Hi Nilesh,

Good to know it helped you.

it would be nice if we have such configuration for pages. Please share it if you get any other solution.

Regards,
Dhrutika
thumbnail
Jan Gregor,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 224 加入日期: 10-10-20 最近的帖子
Hi Nilesh,

Well, i dont think you fully understand the concept of Liferay.

If you want to access organization pages by logged in users, then you must

1. make pages private (this will disable non-authenticated users and also not members to see those pages)
2. assign users, who should see these pages into that organization.

By using these steps you will be able to have exactly the behaviour you would like to have. Setting permission by hand is no solution, as it will lead to inconsistence and a lot of bugs caused by human factor.

Regards,
Jan.
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Hi Jan,

I appreciate your guidance.

But your suggested solution will force me to assign all the users to that Organization. Because I want every authenticated (logged-in) user to view the Organization Pages.
And assigning all the authenticated users to an Organization will change my business requirement.

To the best of my knowledge of LR permission system - "Organization private pages can be viewed only by the Organization Members".
If my this understanding is wrong then please let me know.

And in my current implementation, I already have public as well as private pages for the Organization, as shown below: -

1) Private Pages : - Only to be viewed by the Organization members.
2) Public Pages : - To be viewed by all the authenticated (logged-in) users. (But not by the Guest users)

I hope you understand my requirement.

Regards,
Nilesh.
Joel Peterson,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

New Member 帖子: 22 加入日期: 10-2-18 最近的帖子
Nilesh,
One possible approach for automating the permissions strategy that you want would be to create a model-listener hook for the Layout model. From that model listener you should be able to specify that after a Layout (Page) is created, remove the Guest role's view access for the page if it belongs to a Group that is not the guest community. Alexey Kakunin has a blog post, http://www.emforge.net/web/akakunin/blogs/-/blogs/225270, where he explains how to create a model listener through hook for Liferay 6.

Joel
thumbnail
Nilesh Gundecha,修改在12 年前。

RE: Guest role permission to view all the public pages want to disable

Regular Member 帖子: 205 加入日期: 09-12-1 最近的帖子
Joel Peterson:
Nilesh,
One possible approach for automating the permissions strategy that you want would be to create a model-listener hook for the Layout model. From that model listener you should be able to specify that after a Layout (Page) is created, remove the Guest role's view access for the page if it belongs to a Group that is not the guest community. Alexey Kakunin has a blog post, http://www.emforge.net/web/akakunin/blogs/-/blogs/225270, where he explains how to create a model listener through hook for Liferay 6.

Joel


Thanks a lot Joel for your help. I will try out this stuff and will comment here once its done.
Suyash Bhalekar,修改在11 年前。

RE: Guest role permission to view all the public pages want to disable

New Member 帖子: 24 加入日期: 12-9-4 最近的帖子
Hi Nilesh,

I am having same requirement. That is to disable view permission of page on creation so that I can proceed with my other logic.
Currently I have to manually disable view option from manage permission tab of page.

Have you got the solution for this, or have you tried with Listener concept mention above?

Please reply as soon as possible.

Thanks.