show nothing if user is not employee

This commit is contained in:
fred-fri 2012-08-03 12:30:32 +09:00
parent aa219ceb8c
commit 23a73b2f5c

@ -20,6 +20,7 @@ import se.su.dsv.scipro.reusable.SafeLongToIntService;
import se.su.dsv.scipro.springdata.services.EmployeeService;
import se.su.dsv.scipro.springdata.services.GenericService;
import se.su.dsv.scipro.springdata.services.ProjectIdeaService;
import se.su.dsv.scipro.supervisor.panels.SupervisorMyProjectsPanel;
import se.su.dsv.scipro.supervisor.panels.WatsonInfoPanel;
import java.util.Iterator;
@ -53,6 +54,7 @@ public class SupervisorMyProjectIdeasPage extends AbstractSupervisorProjectIdeaP
dialog.add(new EmptyPanel("dialogPanel"));
add(dialog);
if (employeeService.findByUser(SciProSession.get().getUser()) != null){
add(new GenericDataPanel<ProjectIdea>("dp") {
@Override
@ -98,6 +100,11 @@ public class SupervisorMyProjectIdeasPage extends AbstractSupervisorProjectIdeaP
}
});
} else {
add(new EmptyPanel("dp"));
}
}
}