• No replies
1 Post

Pinned topic Accessing Privilege Set For User Group

‏2013-09-13T17:13:28Z |

I am using CM  I am trying to get the Privilege Set for a User Group.  The User Group is obtain from a specified ACL.  Here is some code:

DKAuthorizationMgmtICM authorizationMgmt = new DKAuthorizationMgmtICM(connection.getDatastore());
dkAccessControlList acl = authorizationMgmt.getAccessControlList(aclData.getName());
String[] userGroupNames =  acl.listGroups();

The needed User Group is obtained and an attempt is made to get Privilege Set:

DKPrivilegeSetICM privilegeSet = (DKPrivilegeSetICM)authorizationMgmt.retrieveUserGroupPrivilegeSet(foundUserGroupName);
authorizationMgmt.addACLRule(aclData.getCode(), userName, DKConstant.DK_CM_PATRON_TYPE_USER, privilegeSet.getID());

When executing the line with the statement, authorizationMgmt.retrieveUserGroupPrivilegeSet the following error is given:

[9/13/13 11:10:47:959 EDT] 00000026 ContentServic E com.syscom.content.servlet.DocRouting addUserToACL: Exception:
                        DGL3819A: User does not exist[Name=USERGROUP1]

Looking at the error and the stacktrace, it looks like it is trying to access a User object instead of accessing the UserGroup object.

I would appreciate any help or information on how I might be this resolved?