Users with insufficient privileges are now unable to use oekaki.

This commit is contained in:
pachuco 2012-06-24 23:21:22 +03:00
parent 4535299b2a
commit e1c04facdb

View file

@ -10,12 +10,10 @@ class Oekaki extends Extension {
global $user, $page;
if($event->page_matches("oekaki")) {
if(!$user->can("create_image")) {
$this->theme->display_permission_denied();
}
if($event->get_arg(0) == "create") {
if($event->get_arg(0) == "create" and $user->can("create_image")){
$this->theme->display_page();
}else{
$this->theme->display_permission_denied();
}
if($event->get_arg(0) == "upload") {
// FIXME: this allows anyone to upload anything to /data ...