"Password-protect" specific (private) pages in liferay

203 Views Asked by At

I want to implement a mechanism in Liferay 6.2.5 GA6 that if a (private) page has a specific custom field value, the user needs to enter a password to view the page. The problem is not the implementation of the custom field for the pages; the problem is that I do not know how to modify the render-mechanism of a page (or maybe layout) in Liferay.

Maybe I can realize it with the hook- or ext-plugin, but I do not find the action for the render-mechanism.

1

There are 1 best solutions below

0
On

I would go for a service pre actions. You can create it in a hook. Google for how it's done. It's quite straightforward.

Just note few things.

  • Run your pre-action after the ServicePreAction from Liferay. If you want to have all the nice things like ThemeDisplay at your disposal then (if you need it).
  • The pre-actions are triggered a couple of times per one request.Make sure your code can cope with it.