refer to user
This commit is contained in:
parent
253d75ae82
commit
8d478b9c39
@ -188,7 +188,7 @@ class Upload extends Extension
|
|||||||
|
|
||||||
if ($event->page_matches("upload/replace")) {
|
if ($event->page_matches("upload/replace")) {
|
||||||
if (!$user->can(Permissions::REPLACE_IMAGE)) {
|
if (!$user->can(Permissions::REPLACE_IMAGE)) {
|
||||||
$this->theme->display_error(403, "Error", "You don't have permission to replace images");
|
$this->theme->display_error(403, "Error", "{$user->name} doesn't have permission to replace images");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->is_full) {
|
if ($this->is_full) {
|
||||||
@ -228,7 +228,7 @@ class Upload extends Extension
|
|||||||
}
|
}
|
||||||
} elseif ($event->page_matches("upload")) {
|
} elseif ($event->page_matches("upload")) {
|
||||||
if (!$user->can(Permissions::CREATE_IMAGE)) {
|
if (!$user->can(Permissions::CREATE_IMAGE)) {
|
||||||
$this->theme->display_error(403, "Error", "You don't have permission to upload images");
|
$this->theme->display_error(403, "Error", "{$user->name} doesn't have permission to upload images");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->is_full) {
|
if ($this->is_full) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user