MDL-34585 fix broken blog file access control

This commit is contained in:
Petr Škoda 2012-07-31 16:02:54 +02:00
parent 470d47f512
commit faf40ca3e3

View File

@ -3471,15 +3471,15 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
}
}
if ('publishstate' === 'public') {
if ($entry->publishstate === 'public') {
if ($CFG->forcelogin) {
require_login();
}
} else if ('publishstate' === 'site') {
} else if ($entry->publishstate === 'site') {
require_login();
//ok
} else if ('publishstate' === 'draft') {
} else if ($entry->publishstate === 'draft') {
require_login();
if ($USER->id != $entry->userid) {
send_file_not_found();