cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Role Ids for the portal logged in user

Former Member
0 Kudos

Hi,

I am using usermenagement to find out the roleids for the looged in user.

I found the method below to retrieve all names of roles assigned to the looged in user.

IUser loggedOnUser = (IUser)compRequest.getUser().getUser();

String strRoles[]=null;

strRoles=loggedOnUser.getRoles();

strRole[0]...

But this name is displayed rolename.prefix. But i need to check with the role id only.

So how role ids can be found.

Thanks & Regards

Markandeya

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Ep 5 or EP 6 ?

For EP6

Looking at the javadocs for the ume service http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/ume/index.html

There is a method public java.lang.String[] getRolesOfUser(java.lang.String uniqueIdOfUser,boolean recursive) in the IRoleFactory.

You can get an instance of this by calling UMFactory.getRoleFactory

Former Member
0 Kudos

Hi,

We are using EP5.

It seems the in EP6 the IRolefactory getRolesOfUser(java.lang.String uniqueIdOfUser,boolean recursive) returns ids of the Roles.

But in EP5 com.sapportals.portal.security.usermanagement

Interface IRoleFactory dosenot have any method for getRole ids.

Thanks & Regards

Markandeya