cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with getting role from UMFactory in EP7SP13

Former Member
0 Kudos

Hello,

I have trouble with getting role from UMFactory after upgrade to (EP 7) SP13. I'm using this code "

UMFactory.getRoleFactory().getRoleByUniqueName(g_check_role);

" Now I get only information that the role cannot be found (works in previous version of portal). Really I don't know where can be problem... Do you have any suggestion or information about this?

Thanks !

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Roman,

the problem may take place in string definition of role unique name - g_check_role. An suggestion:

Try to add this role to your user in EP. Then call

IUserFactory uf = UMFactory.getUserFactory();

String s[] = UMFactory.getRoleFactory().getRolesOfUser(uf.getUserByLogonID(<your user logon id>).getUniqueID(),true);

<b>s</b> is an String[] array containing all unique names of all roles assigned to the given user. Then just check the value of the role you are interested in.

mz