cancel
Showing results for 
Search instead for 
Did you mean: 

define login user

Former Member
0 Kudos

Hai every one ,

i have one issue that is in appliaction when ever the user log in to application.

we need to identify weather he is user or administrator .

if he is administator the ui element is became up as Dropdown by key. and he can select different users.

if user is login to application , the field is became fix with his name.

how to do it is ...

i writen code in wdinit method of component controler.. that is identifying login user

IWDClientUser user =WDClientUser.getLoggedInClientUser();
    IUser name = user.getSAPUser();

from this step onwards in view level what i need to do..

if any one know tell me...

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

Hi

try to get the role using this code

IUser user = clientUser.getSAPUser();

Iterator role = user.getRoles(true);

String str = "";

while (role.hasNext())

{

String rolestr = (String) role.next();

try {

IRole r = UMFactory.getRoleFactory().getRole(rolestr);

str = str "\n" r.getDisplayName();

}

catch (UMException e1)

{

wdComponentAPI.getMessageManager().reportException(e1.getMessage(),false);

}

then put the if codtion by checking if(rolestr .equalIgnoreCase(AdminRole)) then put ur logic inside this loop

thanks

Answers (1)

Answers (1)

Former Member
0 Kudos