Ejemplo n.º 1
0
  @Override
  public boolean isAllowed(ActionContext context) {
    if (studyId == null) {
      Study study = context.load(Study.class, studyId);
      return PermissionEnum.STUDY_READ.isAllowed(context.getUser(), study);
    }

    return PermissionEnum.STUDY_READ.isAllowed(context.getUser());
  }
 @Override
 public boolean isAllowed(ActionContext context) {
   Clinic clinic = context.load(Clinic.class, clinicId);
   return PermissionEnum.CLINIC_UPDATE.isAllowed(context.getUser(), clinic);
 }