function update($entity) { $allowed_entity = $this->authorize_write($entity); return parent::update($allowed_entity); }