You are here

public function AdminPermissions::getMessage in Security Review 8

Converts a result integer to a human-readable result message.

Parameters

int $result_const: The result integer.

Return value

string The human-readable result message.

Overrides Check::getMessage

File

src/Checks/AdminPermissions.php, line 135

Class

AdminPermissions
Checks whether untrusted roles have restricted permissions.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::SUCCESS:
      return $this
        ->t('Untrusted roles do not have administrative or trusted Drupal permissions.');
    case CheckResult::FAIL:
      return $this
        ->t('Untrusted roles have been granted administrative or trusted Drupal permissions.');
    default:
      return $this
        ->t("Unexpected result.");
  }
}