Skip to content
Snippets Groups Projects
Commit b0b87175 authored by srosse's avatar srosse
Browse files

OO-4150: participants cannot edit absence notices

parent a57020a0
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,8 @@ public interface LecturesSecurityCallback {
public boolean canAddNoticeOfAbsences();
public boolean canAddDispensations();
public boolean canEditAbsenceNotices();
public boolean canDeleteAbsenceNotices();
......
......@@ -162,6 +162,11 @@ public class LecturesSecurityCallbackFactory {
return false;
}
@Override
public boolean canEditAbsenceNotices() {
return viewAs == LectureRoles.teacher || viewAs == LectureRoles.lecturemanager || viewAs == LectureRoles.mastercoach;
}
@Override
public boolean canDeleteAbsenceNotices() {
return viewAs == LectureRoles.lecturemanager || viewAs == LectureRoles.mastercoach;
......
......@@ -610,7 +610,10 @@ public class AbsenceNoticesListController extends FormBasicController {
VelocityContainer mainVC = createVelocityContainer("tools_notices");
// edit absence, notice of absence, dispensation
String editI18nKey = AbsenceNoticeHelper.getEditKey(row.getAbsenceNotice());
addLink(editI18nKey, "edit", "o_icon o_icon_edit", mainVC);
if(secCallback.canEditAbsenceNotices()) {
addLink(editI18nKey, "edit", "o_icon o_icon_edit", mainVC);
}
// open profile
addLink("profile", "profile", "o_icon o_icon_user", mainVC);
// contact teacher
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment