cancel
Showing results for 
Search instead for 
Did you mean: 

Role of the user

former_member322327
Participant
0 Kudos

Hi everyone:

it is possible to obtain the role of the user?

Thanks.

Regards.

Eduardo Campos

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Eduardo,

of which role are you thinking? In WebDynpro it's not mandatory to have a role. If you think of portal roles, you can have different roles, so the question wouldn't be quite right. Anyhow, you could ask from within which role context a WebDynpro iView has been called...?!

Before going into the details, we'll better wait for the concrete question...

Best regards

Detlev

former_member322327
Participant
0 Kudos

Hi Detlev:

you are right, I think of portal roles.

within which role context a WebDynpro iView has been called?

Thanks

Eduardo

detlev_beutner
Active Contributor
0 Kudos

Hi Eduardo,

from your other answer I think it is enough to check if the user has got a role (or not). This can be done very easily if you have got the IUser object; for this see https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/web dynpro security.pdf page 11/12

Now you can use the isMemberOfRole method, that's all. See https://media.sdn.sap.com/javadocs/NW04/SP9/ume/index.html for details.

Hope it helps

Detlev

former_member322327
Participant
0 Kudos

Thanks Detlev, this is all I need, ten points for you.

Regards

Eduardo

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Eduardo,

As per my knowledge the role of the user is being specified in the portal.In webDynpro it has to be explicity programmed.

Correct me if I'm wrong.

Regards

Nouf

former_member322327
Participant
0 Kudos

Hi Noufal

Yes you are correct.

I need to know what's the role of the user (role portal), for to show or hide some uicomponents.

Regards.

Eduardo