code: private List<String> getActiveModules(List<Profile> activeProfiles, Model model) {
  		List<String> modules = model.getModules();
  
  		for (Profile profile : model.getProfiles()) {
  			Boolean found = false;
  			for (Profile p : activeProfiles) {
  				if (p.getId().equals(profile.getId())) {
  					found = true;
  					break;
  				}
  			}
  			if (!found) continue;
  
  			for (String module : profile.getModules()) {
  				if (modules.indexOf(module) < 0) {
  					modules.add(module);
  				}
  			}
  		}
  
  		return modules;
  	}
docs: /* modules