You are on page 1of 14

Roles Quick

Start Guide
Liferay Portal 6.2 EE

ROLES QUICK START GUIDE

Introduction
Roles are a very powerful feature in Liferay Portal. They allow you to take advantage of the
fine-grained permissioning system and control what users or groups of users have access to
resources in large and very small scopes. This guide will help you get started in creating and
applying the basics of Liferay roles.
WHAT EXACTLY IS A ROLE?
A role is a collection of permissions. A role can be applied to a user or group of users. It can even
be applied to a Site or an Organization.
IS A ROLE EQUIVALENT WITH A GROUP?
No, because a role can exist and not have any users associated with it at all. A role is a collection
of permissions. A role can be applied to a group of users, affecting every user that belongs to,
or becomes a member of, that user group.
ARE THERE DIFFERENT TYPES OF ROLES?
Yes, they differ in scope. There are site roles, organization roles, and regular roles. Regular roles
have the largest scope and are applied portal-wide.
WHAT ROLES COME OUT OF THE BOX?
Administrator
Owner
Guest
User
Power User
Site Administrator
Site Owner
Site Member
Organization Administrator
Organization Owner
Organization User
You can also create custom roles very easily through the Roles administration in the Control Panel.

www.liferay.com

ROLES QUICK START GUIDE

Creating A Role
Lets create a regular role and define its permissions.
CHOOSE THE TYPE AND THE NAME
Navigate to the Control Panel and click on Roles. Use the Add button to create a Regular role.
A Regular role is a role that has a portal-wide scope.
Name the role, and save.

www.liferay.com

ROLES QUICK START GUIDE


DEFINE THE PERMISSIONS ASSOCIATED WITH THIS ROLE
Now that weve created and named the role, we need to define the permissions that the role is
composed of. You can think of a role as a collection of permissions.

www.liferay.com

ROLES QUICK START GUIDE


Lets give this role permissions for access via the Control Panel. Click on the Actions button and
choose Define Permissions from the drop-down menu.

www.liferay.com

ROLES QUICK START GUIDE


For this example, we will limit the access of this role to Web Content. There are many aspects that
are available to be defined for this.

www.liferay.com

ROLES QUICK START GUIDE


Check all of the actions pertaining to Web Content creation to add them to the role.

Click Save. You now have a role with access to the Liferay WCM in the Control Panel, as well as the
ability to do the above Actions that have been checked.

www.liferay.com

ROLES QUICK START GUIDE

Applying A Role
Now that we have created a role and defined its permissions, we can apply this role to a user.
ASSIGN MEMBERS TO THIS ROLE
Go to the Roles section on the Control Panel, find the role that you created and click on
Assign Members.

www.liferay.com

ROLES QUICK START GUIDE


You can assign the role at the User, Site, Organization, and User Group granularities.
For this example, lets assign this role to a regular (non-Admin) user. Make sure to click on the
Available tab to find your user, check the check box, and click Update Associations in order to
save the role to the user.
TIP: Check to see that the role was applied and that it can be unapplied. In our example, we can
log in as the regular user to check their privileges. If you click on Content under the Admin menu,
you will notice that Web Content is the only administrative function visible to you.

To remove this access, you can go back to the Roles section to either unassign the user from that
role in the Assign Members section, or the Role can be modified using the Define Permissions
section and removing (unchecking) the resources added earlier.
ROLE SCOPE
We have created a role with Regular scope. It is also possible to create roles that are scoped to a
Liferay Organization and to a Liferay Site. This is particularly helpful when the Liferay Portal Omni
Admin finds it useful to delegate different users to be the administrator for an Organization or Site.

www.liferay.com

ROLES QUICK START GUIDE

Roles in Action
In addition to defining permissions for a role, you can limit access to different resources from the
resource itself.
APPLY THE ROLE TO A RESOURCE
Perhaps you have deployed and/or placed a portlet on a page and wish to limit its access.
Lets create some web content and limit the View access to only the newly created Role.

Click on the Permissions tab and use the permissions and roles matrix to remove and give
View access. Make sure to remove View access from the Guest role and Site Member Role,
and to grant View access to the role you created earlier, then save.

www.liferay.com

ROLES QUICK START GUIDE


In order to test if these settings have taken effect, log out of the portal. Without logging back in
(using the Guest role access), access the page with the portlet in which you limited View access.

You can see that the portlet does not appear.

However, when you log in with the user that has the previously created role, it is visible.
In addition to portlets, you can also limit access to pages, buttons, and anything else in Liferay
Portal that has been designated as a resource and has a permissions configuration icon (the gear).

10

www.liferay.com

ROLES QUICK START GUIDE


USERS CAN HAVE MULTIPLE ROLES
Perhaps you have deployed and/or placed a portlet on a page and wish to limit its access.
Lets give View access only to the role you created. You can do this from the portlets
configuration page, which is accessible via the wrench and gear.

ORGANIZATION

COMMUNITY

User
Pages

Roles

Teams

Roles

User Groups
User

Pages

Teams

11

www.liferay.com

ROLES QUICK START GUIDE

Additional Resources
The definitive resources on Liferay Portal, including the configurations discussed in this guide, are:
Liferay Portal User Guide (online):
http://www.liferay.com/documentation/liferay-portal/6.2/user-guide
Mastering Liferay Fundamentals (course):
http://www.liferay.com/services/training/topics/fundamentals
Administering Liferay Systems (course):
http://www.liferay.com/services/training/topics/system-admin
Liferay Roles (online):
http://www.liferay.com/documentation/liferay-portal/6.2/user-guide/-/ai/roles-and-permissionsliferay-portal-6-2-user-guide-16-en

Summary
In this guide, we outlined some quick ways to create and apply Liferay Roles after downloading
a Liferay Portal bundle. This is by no means a complete guide, but the best practices presented
here can help you start out on the right foot and avoid some common pitfalls.

Disclaimer
Liferay can only give you initial recommendations based on best practices and the experience
of professionals working with Liferay customers. Ultimately, it is your responsibility as system
architects and business analysts to come up with the scenarios that your system will need to
address and to run the appropriate tests on your system before production deployment, so that
you can identify significant circumstances and other unforeseen system and network issues.
Please use these settings at your own risk.

Moving Forward
Get a Free Demo
A Liferay team member is available to give you an in-depth look into the Liferay Portal features
and solutions that are helping enterprises worldwide realize their goals. Our customers include
top companies across industries such as Allianz, Cisco Systems, Dominos Pizza, Rolex and Toyota.
Request a free demo today at www.liferay.com/top-5-things-62/request-a-demo.

12

www.liferay.com

Liferay is a provider of leading enterprise open source portal


and collaboration software products, used by major enterprises
worldwide including Allianz, Carrefour, Cisco Systems, Danone,
Lufthansa Flight Training, Rolex, Siemens, Socit Gnrale,
Toyota and the United Nations. Liferay, Inc. offers professional services,
technical support, custom development, and professional training to
ensure successful deployment in the most demanding IT environments.
2014, Liferay, Inc. All rights reserved.

140625

You might also like