3134 Allow authors to see their own opposition points and feedback

This commit is contained in:
Andreas Svanberg 2023-10-09 12:39:23 +02:00
parent d128048c13
commit b45cdb57d9

@ -35,6 +35,7 @@ import se.su.dsv.scipro.util.JavascriptEventConfirmation;
import javax.inject.Inject;
import java.util.Date;
import java.util.List;
import java.util.Objects;
public class SeminarOppositionPanel extends Panel {
@ -131,7 +132,9 @@ public class SeminarOppositionPanel extends Panel {
protected void onConfigure() {
super.onConfigure();
FinalSeminarGrade grade = opposition.getGrade();
setVisibilityAllowed(grade != null && opposition.getPoints() != null && opposition.getFeedback() != null && isEmployee());
boolean isGraded = grade != null && opposition.getPoints() != null && opposition.getFeedback() != null;
boolean isMine = Objects.equals(SciProSession.get().getUser(), opposition.getUser());
setVisibilityAllowed(isGraded && (isEmployee() || isMine));
}
};
}