code: public boolean userInGroup(CmsDbContext dbc, String username, String groupname, boolean readRoles)
      throws CmsException {
  
          List<CmsGroup> groups = getGroupsOfUser(dbc, username, readRoles);
          for (int i = 0; i < groups.size(); i++) {
              CmsGroup group = groups.get(i);
              if (groupname.equals(group.getName()) || groupname.substring(1).equals(group.getName())) {
                  return true;
              }
          }
          return false;
      }
docs: Returns <code>true</code> if a user is member of the given group.<p>
  
  @param dbc the current database context
  @param username the name of the user to check
  @param groupname the name of the group to check
  @param readRoles if to read roles or groups
  
  @return <code>true</code>, if the user is in the group, <code>false</code> otherwise
  
  @throws CmsException if something goes wrong