Skip to Content
author's profile photo Former Member
Former Member

Dynamically changing the Roles and Menu options??

HI all,

I am working on a requirement where i need to change the roles and all the options dynamically(like the detailed navigation bar and dynamic navigation bar).

For example, User A logs in (who is an admin) and wants to see what user B is able to see when he logs in. So I will have a text box where user A(admin) gives the user id of the user B and then all the options (roles,the detailed level navigation bar options etc.) will be shown as it will appear for user B.

So for this, how will I dynamically ensure that the screen looks exactly simillar to what user B would see if he logs in ( i mean - roles, different options etc.)

If any one has any idea on this, please help me.

Regards,

Narahari

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2005 at 01:15 PM

    Hi Narahari

    You can get the details of the other user in portal.

    import com.sap.security.api.*;

    IUserFactory userfact=UMFactory.getUserFactory();

    IUser user = getUserFactory().getUserByLogonID(String logonidofuserB);

    Information about the name of the user,their unique id,Ldap attrs,display name,role membership etc are available from the IUser object.

    You can use the methods isMemberOfGroup()

    isMemberOfrole() for getting the details and also this link by prakash

    Create a SITEMAP for your portal

    Regards

    Geogi

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Narahari

      The access of the screens is based on the roles and the groups assigned to the user. You can compare the roles and groups of user A and B by getting it and storing in an array. If both are having the same roles and group then the screens are same.

      Regards

      Geogi

  • Posted on Oct 06, 2005 at 05:22 AM

    Hi Narahari,

    I wouldn;t want to change the roles and permissions of the current user.

    You could have a test user. When you select user B from the list, you can give the test user all the groups and roles that user B has.

    You would also need to give the test user all the permissions -- ACL -- that user B has. But you would only have to duplicate any special permissions. The permissions received via groups/roles would be given automatically.

    Hope this helps.

    Do you need the specific APIs?

    Daniel

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Daniel Wroblewski

      Daniel,

      Now as you said, if i create a "test user" dynamically who has all roles/groups/permissions simillar to that of an existing user (for example "User B") which the admin has selected, is there a way of creating another session dynamically, log in directly with out showing the initial screen (that means show the roles directly)??

      Regards,

      Narahari

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.