mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 10:59:16 -04:00
Fix for 641... extend viewable functionality to comments. Viewable unit test is not working.
This commit is contained in:
@@ -80,4 +80,14 @@ class Comment_Model extends ORM {
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a set of restrictions to any following queries to restrict access only to items
|
||||
* viewable by the active user.
|
||||
* @chainable
|
||||
*/
|
||||
public function viewable() {
|
||||
$this->join("items", "items.id", "comments.item_id");
|
||||
return item::viewable($this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user