Skip to content

Commit 67dd871

Browse files
author
Riari
committed
Add canView attribute to Category model
1 parent afefa7f commit 67dd871

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Riari/Forum/Models/Category.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@ public function getNewThreadRouteAttribute()
7979
return $this->getRoute('forum.post.create.thread');
8080
}
8181

82+
public function getCanViewAttribute()
83+
{
84+
return AccessControl::check($this, 'access_category', FALSE);
85+
}
86+
8287
public function getCanPostAttribute()
8388
{
8489
return AccessControl::check($this, 'create_threads', FALSE);

0 commit comments

Comments
 (0)