Package com.eaglegenomics.simlims.core

Examples of com.eaglegenomics.simlims.core.SecurityProfile


    s.setIdentificationBarcode("SAM1::RD_S1_MockSample");
    s.setLocationBarcode("Freezer1");
    s.setSampleType("GENOMIC");
    s.setReceivedDate(new Date());

    s.setSecurityProfile(new SecurityProfile());

    Project p = new ProjectImpl();
    p.setProjectId(1L);
    p.setAlias("MockInputProject");
    s.setProject(p);
View Full Code Here


                          }
                  )
  )
  public SecurityProfile get(long id) throws IOException {
    List results = template.query(PROFILE_SELECT_BY_ID, new Object[]{id}, new SecurityProfileMapper());
    SecurityProfile sp = results.size() > 0 ? (SecurityProfile) results.get(0) : null;

    if (sp != null) {
      fillOutSecurityProfile(sp);
    }
    else {
      sp = new SecurityProfile();
    }

    return sp;
  }
View Full Code Here

    sp.getWriteGroups().addAll(securityManager.listGroupsByIds(wgIds));
  }

  public class SecurityProfileMapper implements RowMapper<SecurityProfile> {
    public SecurityProfile mapRow(ResultSet rs, int rowNum) throws SQLException {
      SecurityProfile sp = new SecurityProfile();
      sp.setProfileId(rs.getLong("profileId"));
      sp.setAllowAllInternal(rs.getBoolean("allowAllInternal"));

      try {
        sp.setOwner(securityManager.getUserById(rs.getLong("owner_userId")));
      }
      catch (IOException e) {
        e.printStackTrace();
      }
View Full Code Here

      if (studyId != null) {
        Study study = requestManager.getStudyById(studyId);
        model.addAttribute("study", study);
        experiment.setStudy(study);
        if (Arrays.asList(user.getRoles()).contains("ROLE_TECH")) {
          SecurityProfile sp = new SecurityProfile(user);
          LimsUtils.inheritUsersAndGroups(experiment, study.getSecurityProfile());
          experiment.setSecurityProfile(sp);
        }
        else {
          experiment.inheritPermissions(study);
View Full Code Here

      Project project = requestManager.getProjectById(projectId);
        model.addAttribute("project", project);
        study.setProject(project);
        if (Arrays.asList(user.getRoles()).contains("ROLE_TECH")) {
            SecurityProfile sp = new SecurityProfile(user);
            LimsUtils.inheritUsersAndGroups(study, project.getSecurityProfile());
            study.setSecurityProfile(sp);
        } else {
            study.inheritPermissions(project);
        }
View Full Code Here

          model.put("autogeneratedLibraryAlias", autogenLibAlias);
        }
       
        library.setSample(sample);
        if (Arrays.asList(user.getRoles()).contains("ROLE_TECH")) {
          SecurityProfile sp = new SecurityProfile(user);
          LimsUtils.inheritUsersAndGroups(library, sample.getSecurityProfile());
          library.setSecurityProfile(sp);
        }
        else {
          library.inheritPermissions(sample);
View Full Code Here

          Project project = requestManager.getProjectById(projectId);
          model.addAttribute("project", project);
          sample.setProject(project);

          if (Arrays.asList(user.getRoles()).contains("ROLE_TECH")) {
            SecurityProfile sp = new SecurityProfile(user);
            LimsUtils.inheritUsersAndGroups(sample, project.getSecurityProfile());
            sample.setSecurityProfile(sp);
          }
          else {
            sample.inheritPermissions(project);
View Full Code Here

TOP

Related Classes of com.eaglegenomics.simlims.core.SecurityProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.