Skip to content

Commit

Permalink
MDL-9168 nested site policy when forcelogin enabled; merged from MOOD…
Browse files Browse the repository at this point in the history
…LE_18_STABLE
  • Loading branch information
skodak committed Apr 2, 2007
1 parent 1aa7b31 commit 90a32fd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion file.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@
} else if ($course->id != SITEID) {
require_login($course->id);
} else if ($CFG->forcelogin) {
require_login();
if (!empty($CFG->sitepolicy)
and ($CFG->sitepolicy == $CFG->wwwroot.'/file.php'.$relativepath
or $CFG->sitepolicy == $CFG->wwwroot.'/file.php?file='.$relativepath)) {
//do not require login for policy file
} else {
require_login();
}
}

// security: only editing teachers can access backups
Expand Down

0 comments on commit 90a32fd

Please sign in to comment.