Skip to content

Commit

Permalink
Admin: Session admins can subscribe users to course even if subscript…
Browse files Browse the repository at this point in the history
…ion is only open for teachers - refs BT#20229
  • Loading branch information
NicoDucou committed Oct 11, 2022
1 parent c1fcebf commit 6e607e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/inc/lib/course.lib.php
Expand Up @@ -810,7 +810,7 @@ public static function subscribeUser(
return false;
}

if ($checkTeacherPermission && !api_is_course_admin()) {
if ($checkTeacherPermission && !api_is_course_admin() && !api_is_session_admin()) {
// Check in advance whether subscription is allowed or not for this course.
if ((int) $courseInfo['subscribe'] === SUBSCRIBE_NOT_ALLOWED) {
if ($displayFlashMessages) {
Expand Down

0 comments on commit 6e607e0

Please sign in to comment.