summaryrefslogtreecommitdiff
path: root/lib/exe/mediamanager.php
diff options
context:
space:
mode:
authorGina Haeussge <gina@foosel.net>2010-06-27 14:50:49 +0200
committerGina Haeussge <gina@foosel.net>2010-06-27 14:50:49 +0200
commit0b34c70fcb312d38e6110e2ca1432779ffb73a8a (patch)
treed13b3272fa5c0c3b6f1d875d60766bcf203eb869 /lib/exe/mediamanager.php
parentc8f80b4e70ee1b73ecc08cac583d021979af9359 (diff)
downloadrpg-0b34c70fcb312d38e6110e2ca1432779ffb73a8a.tar.gz
rpg-0b34c70fcb312d38e6110e2ca1432779ffb73a8a.tar.bz2
FS#1795: Restrict media manager to users with at least read access
on the supplied namespace.
Diffstat (limited to 'lib/exe/mediamanager.php')
-rw-r--r--lib/exe/mediamanager.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index 1fe363985..c79a25c08 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -34,6 +34,12 @@
// check auth
$AUTH = auth_quickaclcheck("$NS:*");
+ // do not display the manager if user does not have read access
+ if($AUTH < AUTH_READ) {
+ header('HTTP/1.0 403 Forbidden');
+ die($lang['accessdenied']);
+ }
+
// create the given namespace (just for beautification)
if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); }