authority = $authority; } protected function isReadAllowed() { return $this->authority->isAllowed( 'read' ); } protected function isWriteAllowed() { return $this->authority->isAllowed( 'writeapi' ); } }