Add a "can_edit" field to the Item_Model's REST output. It's

applicable to the current user.
This commit is contained in:
Bharat Mediratta
2010-06-08 20:59:24 -07:00
parent 9ec600fd45
commit b40057283e
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -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",