Changeset 3527


Ignore:
Timestamp:
Oct 5, 2015, 9:40:18 AM (7 years ago)
Author:
olle
Message:

Refs #801. Refs #816. Roles MeludiRole.LIBRARY_PREP and MeludiRole.LIBRARY_PLATE_DESIGNER used in library preparation are installed (they were previously defined in data access object Annotationtype.java in src/net/sf/basedb/meludi/dao/):

  1. Java servlet class/file InstallServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp):
    a. For commands "Validate" and "Install" to check roles MeludiRole.LIBRARY_PREP and MeludiRole.LIBRARY_PLATE_DESIGNER, and create them if missing.
    b. For command "GetPermissions" to include information on membership in roles MeludiRole.LIBRARY_PREP and MeludiRole.LIBRARY_PLATE_DESIGNER, respectively.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.meludi/trunk/src/net/sf/basedb/meludi/servlet/InstallServlet.java

    r3501 r3527  
    4848import net.sf.basedb.core.Project;
    4949import net.sf.basedb.core.ProjectKey;
     50import net.sf.basedb.core.Role;
    5051import net.sf.basedb.core.SessionControl;
    5152import net.sf.basedb.core.SharedItem;
     
    135136        jsonChecks.add(checkMeludiRole(dc, MeludiRole.ADMINISTRATOR, createIfMissing));
    136137        jsonChecks.add(checkMeludiRole(dc, MeludiRole.SAMPLE_PREP, createIfMissing));
     138        jsonChecks.add(checkMeludiRole(dc, MeludiRole.LIBRARY_PREP, createIfMissing));
     139        jsonChecks.add(checkMeludiRole(dc, MeludiRole.LIBRARY_PLATE_DESIGNER, createIfMissing));
    137140
    138141        int projectId = dc.getSessionControl().getActiveProjectId();
     
    528531        jsonPermissions.put("PatientCurator", MeludiRole.PATIENT_CURATOR.isMember(dc) ? 1 : 0);
    529532        jsonPermissions.put("SamplePrep", MeludiRole.SAMPLE_PREP.isMember(dc) ? 1 : 0);
     533        jsonPermissions.put("LibraryPrep", MeludiRole.LIBRARY_PREP.isMember(dc) ? 1 : 0);
     534        jsonPermissions.put("LibraryPlateDesigner", MeludiRole.LIBRARY_PLATE_DESIGNER.isMember(dc) ? 1 : 0);
    530535       
    531536        json.put("permissions", jsonPermissions);
Note: See TracChangeset for help on using the changeset viewer.