mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 09:43:51 -04:00
Create a new "add" permission and require it at the controller level
when adding photos/movies/albums
This commit is contained in:
@@ -32,6 +32,7 @@ class server_add_task_Core {
|
||||
$file = $context["files"][$path][$context["position"]];
|
||||
$parent = ORM::factory("item", $file["parent_id"]);
|
||||
access::required("server_add", $parent);
|
||||
access::required("add", $parent);
|
||||
if (!$parent->is_album()) {
|
||||
throw new Exception("@todo BAD_ALBUM");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user