diff --git a/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallback.java b/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallback.java index 12a810ea7a06cf66a2bc746a75b1801579ef05d7..393441f4c3f9e982306c71985aca66cf30275eba 100644 --- a/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallback.java +++ b/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallback.java @@ -46,6 +46,8 @@ public interface LecturesSecurityCallback { public boolean canAddNoticeOfAbsences(); public boolean canAddDispensations(); + + public boolean canEditAbsenceNotices(); public boolean canDeleteAbsenceNotices(); diff --git a/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallbackFactory.java b/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallbackFactory.java index d80fec01668716582c196951f97ccd9ec9d4a0af..e8d6c524dc441649043af45f7118a20439cbca67 100644 --- a/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallbackFactory.java +++ b/src/main/java/org/olat/modules/lecture/ui/LecturesSecurityCallbackFactory.java @@ -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; diff --git a/src/main/java/org/olat/modules/lecture/ui/coach/AbsenceNoticesListController.java b/src/main/java/org/olat/modules/lecture/ui/coach/AbsenceNoticesListController.java index c2372700e8491b27e301c8ee9ca79310d8246475..c9318b78dcb48d41fb394b29608b8e69b4e96a43 100644 --- a/src/main/java/org/olat/modules/lecture/ui/coach/AbsenceNoticesListController.java +++ b/src/main/java/org/olat/modules/lecture/ui/coach/AbsenceNoticesListController.java @@ -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