Question

Is it possible to restrict access of Site public pages for a few Users through configuration?

Now by default in liferay anybody can access the Public pages [that is the reason they are named Public Pages :-) ] of any Site whether Open, Restricted or Private.

In our system we force login to access even Public pages, but once logged-in the User can see the public-page of any Site if he has the URL for it.

To make the requirement more clear:

I have 3 users in the system, User01, User02, User03. I have 3 Sites - Site01 (open), Site02 (restricted), Site03 (private) These Sites have only one User respectively.

All these 3 users can see public-pages of all three Sites. So now what I want is that only User02 should be an exception, that is User02 should not be able to access the Public-pages of Site01 and Site03.

Is this possible through configuration? Or will it require changes in liferay code (possibly through hook)?

Even if we can limit access to Public-pages for all Users who are not member of that Site that will also work?

Any ideas or help is much appreciated. Thanks.

Was it helpful?

Solution 2

For your last question

Even if we can limit access to Public-pages for all Users who are not member of that Site that will also work?

This can be achieved by removing VIEW permission for Guest role for each of Public pages of site.

HTH,

Thanks,

OTHER TIPS

Here are few steps to achieve this:

  1. You can remove view permission from guest role(or all role as per your requirement) to specified page(here from public pages as per your requirement) from manage permission tab of page.

  2. Create a new role(which will allow view permission) and from manage permission of page assign this role view permission.

  3. Now assign these newly created role to users to whom you want to have view access to pages

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top