diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-06-02 22:55:23 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-06-02 22:55:23 -0600 |
commit | 1df6db45dc569cc6f18a9d1622fce5ebe62f8d30 (patch) | |
tree | e4e8cac619bc2443c3e26d0f87a25c51f8a3b273 /modules/gallery/controllers/move.php | |
parent | 2bd8051c28621f6c25a3f85b73da2f94d62440f2 (diff) | |
parent | dde5fb96ee9db5a67b286ea4ac4f35190453a6ef (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/controllers/move.php')
-rw-r--r-- | modules/gallery/controllers/move.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/controllers/move.php b/modules/gallery/controllers/move.php index 130c247f..93ef05a6 100644 --- a/modules/gallery/controllers/move.php +++ b/modules/gallery/controllers/move.php @@ -20,6 +20,7 @@ class Move_Controller extends Controller { public function browse($source_id) { $source = ORM::factory("item", $source_id); + access::required("view", $source); access::required("edit", $source); $view = new View("move_browse.html"); @@ -33,6 +34,11 @@ class Move_Controller extends Controller { $source = ORM::factory("item", $source_id); $target = ORM::factory("item", $this->input->post("target_id")); + access::required("view", $source); + access::required("edit", $source); + access::required("view", $target); + access::required("edit", $target); + item::move($source, $target); print json_encode( @@ -43,8 +49,11 @@ class Move_Controller extends Controller { public function show_sub_tree($source_id, $target_id) { $source = ORM::factory("item", $source_id); $target = ORM::factory("item", $target_id); + access::required("view", $source); access::required("edit", $source); access::required("view", $target); + // show targets even if they're not editable because they may contain children which *are* + // editable print $this->_get_tree_html($source, $target); } |