FIxes so that no-one can "login as" users who have "doanything". MDL-8411

This commit is contained in:
moodler
2007-02-13 08:30:25 +00:00
parent 593d5992c0
commit 08f4e03f53
4 changed files with 8 additions and 2 deletions
+3
View File
@@ -53,6 +53,9 @@
if (!has_capability('moodle/course:view', $context, $userid, false)) {
error('This user is not in this course!');
}
if (has_capability('moodle/site:doanything', $context, $userid, false)) {
print_error('nologinas');
}
}
/// User must have permissions