Skip to Content
author's profile photo
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Jun 04, 2004 at 10:05 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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