on 07-26-2007 4:59 PM
Hi experts,
how can I create a webdynpro avaliable only for certains roles?
thanks in advance,
david
thanks very much
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
besides defining roles for web dynpro iviews, you can also check if current user belongs
to the specified role from code and if doesn't, you can then take appropriate actions (hide buttons, controls, display message etc):
For example with this function:
/**
* Method checks if current user belongs to role.
* @param roleUniqueID unique role id (eg. "pcd:portal_content/Company_Content/Project/Roles/com.company.project.rolename")
* @return true if user belongs to role, false if not
*/
public boolean checkCurrentUserBelongsToRole(String roleUniqueID)
{
boolean userMemberOfRole = false;
IUser sapUser = null;
try
{
//get role from role unique id
IRole sapRole = UMFactory.getRoleFactory().getRoleByUniqueName(roleUniqueID);
// get webdynpro user
IWDClientUser wdcu = WDClientUser.getCurrentUser();
// get sap WAS user for WD user
sapUser = wdcu.getSAPUser();
// check if user is member of role
userMemberOfRole = sapRole.isUserMember(sapUser.getUniqueID(), true);
}
catch (Exception e)
{
wdComponentAPI.getMessageManager().reportException(e.getMessage(), false);
}
return userMemberOfRole;
}
Hope this helps,
Ladislav
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
can I make this without the Portal?
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for yours anwers.
I can create a iview from portal and assign this to certains users. But the webdynpro is accessible for everyone.
thanks in advance,
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is something called as roles in portal as well. If u have multiple applicatios, say 4 in number. and you want 1 person to access just 3 appplications, u can create a user for that and create iviews for different roles under one user. or u can have multiple users if you want to make each of your application secure. Make 1 user for each application and create an iview for that user in the default role.
Hi
1) Create a webdynpro iview
2) Assign that iview to only role which you want,
Regards
Hemant
Message was edited by:
Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
What is your actual requirement.
With Regards
Balaram Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.