docs: public String[] getDestinationRoles(Map<String, ?> destinationPermissions, String dest, String user) {
          SibTr.debug(tc,  " dest: " + dest + " user: " + user);
          if (user.startsWith("cn=")) {
              user = user.substring(3, user.indexOf(","));
              SibTr.debug(tc, CLASS_NAME + " user truncated to: " + user);
          }
          ArrayList<String> roleList = new ArrayList();
          int element = 0;
          Set<String> destinations = destinationPermissions.keySet();
          
          if (dest.indexOf("/") != -1) {
              dest = dest.substring(0,  dest.indexOf("/"));
          }
  
          for (String destination : destinations) {
              SibTr.debug(tc, CLASS_NAME + " Destination: " + destination + " dest: " + dest);
              if (destination.equals(dest)) {
                  Permission permission = (Permission) destinationPermissions.get(destination);
                  Map<String, Set<String>> userRoles = permission.getRoleToUserMap();
                  Set<String> uRoles = userRoles.keySet();
                  for (String role : uRoles) {
                      SibTr.debug(tc, CLASS_NAME + " role: " + role);
                      SibTr.debug(tc, CLASS_NAME + "    users: " + userRoles.get(role));
                      Set<String> rs = userRoles.get(role);
                      for (String r : rs) {
                          SibTr.debug(tc, CLASS_NAME + "     user: " + r);
                          if (r.equals(user)) {
                              roleList.add(role);
                          }
                       }
                  }
                  
                  Map<String, Set<String>> groupRoles = permission.getRoleToGroupMap();
                  Set<String> gRoles = groupRoles.keySet();
                  for (String role : gRoles) {
                      SibTr.debug(tc, CLASS_NAME + " role: " + role);
                      SibTr.debug(tc, CLASS_NAME + "    groups: " + groupRoles.get(role));
                     
                      Set <String> rs = groupRoles.get(role);
                      
                      if (rs != null) {
                          List<String> groups = MessagingSecurityUtility
                                          .getGroupsAssociatedToUser(user,
                                                                     this);
                          if (groups != null) {
                              for (String g : groups) {
                                  if (rs.contains(g)) {
                                      if (!roleList.contains(role)) {
                                          roleList.add(role);
                                      }
                                  }
                              }
                          }
                         
                      }
                  }                
                                 
              }
          }
          if (roleList != null)
              SibTr.debug(tc,  CLASS_NAME + " roles: " + roleList.toArray().toString());
          else 
              SibTr.debug(tc, CLASS_NAME + " no roles identified for user " + user);
          
          Object[] roleListAsObjectArray = roleList.toArray();
          String[] roleListAsStrArray = Arrays.copyOf(roleListAsObjectArray, roleListAsObjectArray.length, String[].class);
          
          SibTr.exit(tc, CLASS_NAME);
          return (roleListAsStrArray);
      }