private void addGrantedActionsToPrivilegeSet(XMLValue xmlValue, ObjectNode object, Enumeration actions) throws ServiceAccessException, ObjectNotFoundException, RevisionDescriptorNotFoundException {
while (actions.hasMoreElements()) {
Uri aNodeUri = nsaToken.getUri(sToken, (String)actions.nextElement());
ObjectNode oNode = aNodeUri.getStore().retrieveObject(aNodeUri);
if (oNode.hasChildren()) {
addGrantedActionsToPrivilegeSet(xmlValue, object, oNode.enumerateChildren());
} else {
ActionNode aNode = ActionNode.getActionNode(oNode.getUri());
if (nsaToken.getSecurityHelper().hasPermission(sToken, object, aNode)) {
xmlValue.add(createPrivilege(aNode, aNodeUri));
}