summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-06-08 20:59:24 -0700
committerBharat Mediratta <bharat@menalto.com>2010-06-08 20:59:24 -0700
commitb40057283e1dfbb3bbb41a6dfc8ccc8e2111d810 (patch)
tree7874b8363f0992ecc8f1b294b06474b7a50d1927 /modules/gallery/models
parent9ec600fd459ab16008f6ced11e55778505b2a099 (diff)
Add a "can_edit" field to the Item_Model's REST output. It's
applicable to the current user.
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index f59caa65..a0866934 100644
--- a/modules/gallery/models/item.php
+++ b/modules/gallery/models/item.php
@@ -951,6 +951,7 @@ class Item_Model extends ORM_MPTT {
$data["resize_url"] = $tmp;
}
$data["thumb_url"] = $this->thumb_url(true);
+ $data["can_edit"] = access::can("edit", $this);
// Elide some internal-only data that is going to cause confusion in the client.
foreach (array("relative_path_cache", "relative_url_cache", "left_ptr", "right_ptr",