Combination View Flat View Tree View
Threads [ Previous | Next ]
Vikas V
How to obtain Role in navigation.vm file?
June 27, 2013 11:49 PM

Vikas V

Rank: Junior Member

Posts: 83

Join Date: September 28, 2011

Recent Posts

Am using Liferay 6.0

I want to get Role of the logged in User in navigation.vm file. permissionChecker.isOmniadmin() checks if its Omniadmin.

My requirement is something like this - if($portalUtil.userRoleIn("someRole")
David H Nebinger
RE: How to obtain Role in navigation.vm file?
June 28, 2013 6:29 AM

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11618

Join Date: September 1, 2006

Recent Posts

omni admin is not a role, it is an attribute of the user, if I remember correctly...
Wilson Man
RE: How to obtain Role in navigation.vm file?
June 28, 2013 11:38 AM

Wilson Man


Rank: Liferay Master

Posts: 580

Join Date: June 21, 2006

Recent Posts

 1    #
 2    # Omniadmin users can administer the portal's core functionality: gc,
 3    # shutdown, etc. Omniadmin users must belong to the default company.
 4    #
 5    # Multiple portal instances might be deployed on one application server, and
 6    # not all of the administrators should have access to this core
 7    # functionality. Input the ids of users who are omniadmin users.
 8    #
 9    # Leave this field blank if users who belong to the right company and have
10    # the Administrator role are allowed to administer the portal's core
11    # functionality.
12    #
13    omniadmin.users=

if your either don't explicitly set this attribute or if it is left blank like the above, then you can simply check for the "Administrator" role in your navigation.vm.