Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
naveen chevuri
Roles
June 28, 2012 4:40 AM
Answer

naveen chevuri

Rank: New Member

Posts: 13

Join Date: December 22, 2010

Recent Posts

In Liferay 6.1 Roles are 3 types
Regular Role
Site Role
Organization Role

So plz explain these roles and diffrences
Muzakir Khan
RE: Roles
June 28, 2012 5:00 AM
Answer

Muzakir Khan

Rank: Regular Member

Posts: 112

Join Date: March 14, 2012

Recent Posts

Hi
There are three kinds of Roles:
-Portal Roles
-Organization Roles
-Community Roles

Roles are used to define permissions across their scope(Portal, Organization or Community)

Example:
Consider a Role granting access to create a Message Board Category
-> A Portal role would grant that access across the portal, whereever there was a Message Board Portlet.
-> A Community role would grant that access only within Community.
-> An Organization role would grant that access only within an Organization.

For further reference, I recommend you to buy Liferay Portlets in Action Book..

Regards
Khan
Hitoshi Ozawa
RE: Roles
June 28, 2012 5:44 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

If you already haven't read it, Liferay's online Administation guide offers a simple explanation.Just search for "regular role", "site role", and "organizational role" in the page.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/managing-users-user-groups-organizations-sites-teams-and-roles
Priyanka Dhingra
RE: Roles
June 28, 2012 8:21 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi,
There are three kinds of roles:

Portal Roles
Organization Roles
Site Roles
We refer to these three kinds of roles as role scopes. Roles are used to define permissions across their scopes: across the portal, across an organization, or across a site. For example, consider a role which grants access to create a Message Board category. A portal role would grant that access across the portal, wherever there was a Message Board portlet. An organization role would grant that access within a site attached to the organization. A site role would grant that access within a site
Muzakir Khan
RE: Roles
June 28, 2012 9:52 PM
Answer

Muzakir Khan

Rank: Regular Member

Posts: 112

Join Date: March 14, 2012

Recent Posts

Priyanka Dhingra:
Hi,
There are three kinds of roles:

Portal Roles
Organization Roles
Site Roles
We refer to these three kinds of roles as role scopes. Roles are used to define permissions across their scopes: across the portal, across an organization, or across a site. For example, consider a role which grants access to create a Message Board category. A portal role would grant that access across the portal, wherever there was a Message Board portlet. An organization role would grant that access within a site attached to the organization. A site role would grant that access within a site

Yes, Community Roles is referred as Site Roles from Liferay 6.1 onwards..
Hitoshi Ozawa
RE: Roles
June 30, 2012 7:02 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Community Roles is referred as Site Roles from Liferay 6.1 onwards..


"Community" has been renamed to "Sites" in 6.1. More on how this came to be in Jorge's blog:
http://www.liferay.com/web/jorge.ferrer/blog/-/blogs/7858337
Tanaji Londhe
RE: Roles
July 17, 2012 6:49 AM
Answer

Tanaji Londhe

Rank: Regular Member

Posts: 196

Join Date: April 25, 2012

Recent Posts

Muzakir Khan:
Priyanka Dhingra:
Hi,
There are three kinds of roles:

Portal Roles
Organization Roles
Site Roles
We refer to these three kinds of roles as role scopes. Roles are used to define permissions across their scopes: across the portal, across an organization, or across a site. For example, consider a role which grants access to create a Message Board category. A portal role would grant that access across the portal, wherever there was a Message Board portlet. An organization role would grant that access within a site attached to the organization. A site role would grant that access within a site

Yes, Community Roles is referred as Site Roles from Liferay 6.1 onwards..



Hi,
How to access that Community roles in my jsp file or portlet class ?
which is used to check particular user is Site Administrator or Site Content Reviewer.........
Thanks,
Tanaji.
Priyanka Dhingra
RE: Roles
July 17, 2012 10:03 PM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi Tanaji,
Using RoleLocalServiceUtil you can check for roles
It has a method hasUserRole()
Tanaji Londhe
RE: Roles
July 18, 2012 1:43 AM
Answer

Tanaji Londhe

Rank: Regular Member

Posts: 196

Join Date: April 25, 2012

Recent Posts

Priyanka Dhingra:
Hi Tanaji,
Using RoleLocalServiceUtil you can check for roles
It has a method hasUserRole()



Hi Priyanka,

I go through your code using RoleLocalServiceUtil class
List<Role> siteRole = RoleLocalServiceUtil.getUserRoles(userId);
I use above code it gives roles list but only Regular Roles I want Site or Community Roles (like Site Administrator, Site Owner, Site Content Reviewer)
So please help, how to access that site roles.

Thanks & regards,
Tanaji.
Priyanka Dhingra
RE: Roles
July 18, 2012 4:00 AM
Answer

Priyanka Dhingra

Rank: Liferay Master

Posts: 501

Join Date: December 19, 2011

Recent Posts

Hi,
for that use com.liferay.portal.model.RoleConstants
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portal/model/RoleConstants.html
Tanaji Londhe
RE: Roles
July 18, 2012 5:08 AM
Answer

Tanaji Londhe

Rank: Regular Member

Posts: 196

Join Date: April 25, 2012

Recent Posts

Priyanka Dhingra:
Hi,
for that use com.liferay.portal.model.RoleConstants
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portal/model/RoleConstants.html



Hi Priyanka,

It works properly. Thanks for reply.

Thanks & regards,
Tanaji.