mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-34585 fix broken blog file access control
This commit is contained in:
parent
470d47f512
commit
faf40ca3e3
@ -3471,15 +3471,15 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('publishstate' === 'public') {
|
if ($entry->publishstate === 'public') {
|
||||||
if ($CFG->forcelogin) {
|
if ($CFG->forcelogin) {
|
||||||
require_login();
|
require_login();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ('publishstate' === 'site') {
|
} else if ($entry->publishstate === 'site') {
|
||||||
require_login();
|
require_login();
|
||||||
//ok
|
//ok
|
||||||
} else if ('publishstate' === 'draft') {
|
} else if ($entry->publishstate === 'draft') {
|
||||||
require_login();
|
require_login();
|
||||||
if ($USER->id != $entry->userid) {
|
if ($USER->id != $entry->userid) {
|
||||||
send_file_not_found();
|
send_file_not_found();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user