/** * Returns if the client has access to this form. * * @return boolean */ public function authorize() { // Ban check. $ban = Ban::getBan($this->ip(), $this->board->board_uri); if ($ban) { $this->ban = $ban; return false; } ## TODO ## // Separate these permsisions. return $this->user->canPostThread() || $this->user->canPostReply(); }
/** * Returns if the client has access to this form. * * @return boolean */ public function authorize() { // Ban check. $ban = Ban::getBan($this->ip(), $this->board->board_uri); if ($ban) { $this->ban = $ban; return false; } // Locked thread check. if ($this->thread instanceof Post && $this->thread->isLocked() && !$this->user->canPostInLockedThreads($this->board)) { return false; } ## TODO ## // Separate these permsisions. return $this->user->canPostThread() || $this->user->canPostReply(); }