diff --git a/src/main/java/org/olat/course/nodes/BlogCourseNode.java b/src/main/java/org/olat/course/nodes/BlogCourseNode.java index c6c44480fcfe173cbff6cdd0aacf36738785e619..df8a3d59235b997215aafe467944da87309d5a70 100644 --- a/src/main/java/org/olat/course/nodes/BlogCourseNode.java +++ b/src/main/java/org/olat/course/nodes/BlogCourseNode.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Locale; import org.olat.basesecurity.GroupRoles; -import org.olat.basesecurity.OrganisationRoles; import org.olat.core.CoreSpringFactory; import org.olat.core.commons.services.notifications.SubscriptionContext; import org.olat.core.gui.UserRequest; @@ -136,9 +135,7 @@ public class BlogCourseNode extends AbstractFeedCourseNode { RepositoryService repositoryService = CoreSpringFactory.getImpl(RepositoryService.class); boolean isGuest = roles.isGuestOnly(); - boolean isAdmin = (roles.isAdministrator() || roles.isLearnResourceManager()) - && repositoryService.hasRoleExpanded(ureq.getIdentity(), entry, - OrganisationRoles.administrator.name(), OrganisationRoles.learnresourcemanager.name()); + boolean isAdmin = userCourseEnv.isAdmin(); boolean isOwner = !isGuest && repositoryService.hasRole(ureq.getIdentity(), entry, GroupRoles.owner.name()); callback = new FeedNodeSecurityCallback(ne, isAdmin, isOwner, isGuest); } diff --git a/src/main/java/org/olat/course/nodes/PodcastCourseNode.java b/src/main/java/org/olat/course/nodes/PodcastCourseNode.java index 2a875e4208a2d4988f8ca8bfedd861523f244bc7..fec01884183997188c2d141f5baeb8276e30b443 100644 --- a/src/main/java/org/olat/course/nodes/PodcastCourseNode.java +++ b/src/main/java/org/olat/course/nodes/PodcastCourseNode.java @@ -24,7 +24,6 @@ import java.util.List; import java.util.Locale; import org.olat.basesecurity.GroupRoles; -import org.olat.basesecurity.OrganisationRoles; import org.olat.core.CoreSpringFactory; import org.olat.core.commons.services.notifications.SubscriptionContext; import org.olat.core.gui.UserRequest; @@ -131,9 +130,7 @@ public class PodcastCourseNode extends AbstractFeedCourseNode { Roles roles = ureq.getUserSession().getRoles(); boolean isGuest = roles.isGuestOnly(); - boolean isAdmin = (roles.isAdministrator() || roles.isLearnResourceManager()) - && repositoryService.hasRoleExpanded(ureq.getIdentity(), entry, - OrganisationRoles.administrator.name(), OrganisationRoles.learnresourcemanager.name()); + boolean isAdmin = userCourseEnv.isAdmin(); boolean isOwner = !isGuest && repositoryService.hasRole(ureq.getIdentity(), entry, GroupRoles.owner.name()); FeedSecurityCallback callback; if(userCourseEnv.isCourseReadOnly()) {