O'Reilly logo

Liferay 6.x Portal Enterprise Intranets Cookbook by Katarzyna Ziółkowska, Piotr Filipowicz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking permissions in a custom portlet

Permissions in Liferay are very flexible but very complex to understand. In this recipe, we will show you only the basic use of permissions, but we hope this tutorial will be a start-up to implement more complex permissions. Let's assume that our goal is extending the previous portlet to display a secret message only for the users who have a specific permission. This permission should be configurable in the portlet permissions.

Getting ready…

We assume that you have a ready-to-use Maven portlet generated from Maven archetypes. In Chapter 1, Installation and Basic Configuration, we described how to achieve this.

How to do it…

To achieve our goal, we have to define and add a specific permission to our portlet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required