Users with insufficient privileges are now unable to use oekaki.
This commit is contained in:
parent
4535299b2a
commit
e1c04facdb
@ -10,12 +10,10 @@ class Oekaki extends Extension {
|
|||||||
global $user, $page;
|
global $user, $page;
|
||||||
|
|
||||||
if($event->page_matches("oekaki")) {
|
if($event->page_matches("oekaki")) {
|
||||||
if(!$user->can("create_image")) {
|
if($event->get_arg(0) == "create" and $user->can("create_image")){
|
||||||
$this->theme->display_permission_denied();
|
|
||||||
}
|
|
||||||
|
|
||||||
if($event->get_arg(0) == "create") {
|
|
||||||
$this->theme->display_page();
|
$this->theme->display_page();
|
||||||
|
}else{
|
||||||
|
$this->theme->display_permission_denied();
|
||||||
}
|
}
|
||||||
if($event->get_arg(0) == "upload") {
|
if($event->get_arg(0) == "upload") {
|
||||||
// FIXME: this allows anyone to upload anything to /data ...
|
// FIXME: this allows anyone to upload anything to /data ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user