Skip to content

Commit

Permalink
Relax access for Controller_Rest_Comments::post_entity() to match std…
Browse files Browse the repository at this point in the history
… UI.
  • Loading branch information
shadlaws committed Jun 13, 2013
1 parent 1fc3a7a commit 5409b45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/comment/classes/Comment/Controller/Rest/Comments.php
Expand Up @@ -61,7 +61,10 @@ static function post_entity($id, $params) {
}

$item = ORM::factory("Item", $i_id);
Access::required("edit", $item);
Access::required("view", $item);
if (!Comment::can_comment()) {
throw Rest_Exception::factory(403);
}

// Build the comment model.
$comment = ORM::factory("Comment");
Expand Down

0 comments on commit 5409b45

Please sign in to comment.