* Returns whether the given company can be joined by this client. * @param company_id The id of the company. * @return \c true when this company is allowed to join, otherwise \c false. */
| 130 | * @return \c true when this company is allowed to join, otherwise \c false. |
| 131 | */ |
| 132 | bool NetworkClientInfo::CanJoinCompany(CompanyID company_id) const |
| 133 | { |
| 134 | Company *c = Company::GetIfValid(company_id); |
| 135 | return c != nullptr && c->allow_list.Contains(this->public_key); |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Returns whether the given company can be joined by this client. |
no test coverage detected