Fórumok

How to set Layout Permissions

thumbnail
Yves LeGrand, módosítva 12 év-val korábban

How to set Layout Permissions

Regular Member Bejegyzések: 156 Csatlakozás dátuma: 2009.11.18. Legújabb bejegyzések
Hi Liferay.

Actually i am struggling with this little problem emoticon:

How one can set the permissions for a certain layout, maybe a layout within a site which is called "page1"?
I will have to create a new role "page1admin" which should be available on the layout permission dialogue and which should have the correct permissions set without user interaction. So this role should have the permissions to update the page ... . How can i set these permissions on this page programmatically?

Can someone post a piece of code which could clearify this?

Thanks a lot.

Best regards,
Yves
Oliver Bayer, módosítva 12 év-val korábban

RE: How to set Layout Permissions

Liferay Master Bejegyzések: 894 Csatlakozás dátuma: 2009.02.18. Legújabb bejegyzések
Hi Yves,

afaik you can only set permission portal wide or community/website wide but not on a page level for a giveen role. You can try grouping the pages in another way so that one role is allowed to modify all pages in a website (at least in my use-cases it worked that way).

HTH Oli
thumbnail
Yves LeGrand, módosítva 12 év-val korábban

RE: How to set Layout Permissions

Regular Member Bejegyzések: 156 Csatlakozás dátuma: 2009.11.18. Legújabb bejegyzések
Hi again.

As far as i can see, you can set the "View"-Permission of a certain Layout according to different Roles:
Guest, Owner, Power User, ...

Per default the "View"-Permission for the role Guest is set to true for new added page in the public pages.
I need to reset these Permissions for the roles. For example I need to set false for guest for a new added page.

So can someone help me with this?

Thanks a lot,
Yves
Oliver Bayer, módosítva 12 év-val korábban

RE: How to set Layout Permissions

Liferay Master Bejegyzések: 894 Csatlakozás dátuma: 2009.02.18. Legújabb bejegyzések
Hi,

the easiest solution would be to switch to private pages where the guest users don't have view permissions already by default. Otherwise I think you have to modify the "portal-impl \ resource-actions \ sites.xml" and remove the VIEW action-key from the guest-defaults of the layout model resource. But this change will only apply for newly created pages, for each existing page you have to remove the guest-view-permission manually.

Greets Oli