Beispiel #1
0
 public function authorizePost($forum, $topic)
 {
     if (Authorize::canPost(Auth::user(), $forum, $topic) === false) {
         abort(403);
     }
 }
Beispiel #2
0
 public function canBeRepliedBy($user)
 {
     $key = $user === null ? '-1' : "{$user->user_id}";
     if (!isset($this->_canBeRepliedBy[$key])) {
         $this->_canBeRepliedBy[$key] = Authorize::canPost($user, $this->forum, $this);
     }
     return $this->_canBeRepliedBy[$key];
 }