on 10-12-2006 4:09 AM
All
Am writing code to create ACL's.As part of it am getting the user,groups,Roles as shown below.
umPrincipalUser = WPUMFactory.getUserFactory().getUser(struid);
umPrincipalGroup = WPUMFactory.getGroupFactory().getGroup(struid);
umPrincipalRole = WPUMFactory.getRoleFactory().getRole(struid);
String struid am getting as follows
String struid = null;
IResourceAclEntryListIterator iAclIterator = null;
IResourceAclEntry entry = null
while (iAclIterator.hasNext()){
entry = iAclIterator.next();
struid = entry.getPrincipal().getId()
}
The struid retrieved works fine for umPrincipalUser but umPrincipalGroup and umPrincipalRole returns null for the strUid.
Pl let me know what is the exact id format i should pass for Group and Role.
Immediate correct answers will be awarded with maximum points
Thanks
Hi Steve,
Why do you first call getPrincipal(), retrieve the ID of that, and then "rebuild" that principal via the WPUMFactory? If you really want that "old" (KM) IPricipals (users/groups/roles), just use
umPrincipal = entry.getPrincipal();
if (umPrincipal instanceof ...) {...
This probably could make your life easier?!
Hope it helps
Detlev
PS: Please mark code with the CODE tag of the SDN editor, which makes it much more readable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.