You are here

public function Security::untrustedRoles in Security Review 8

Returns the IDs of untrusted roles.

If the module hasn't been configured yet, it returns the default untrusted roles.

Return value

string[] Untrusted roles' IDs.

2 calls to Security::untrustedRoles()
Security::trustedRoles in src/Security.php
Returns the trusted roles.
Security::untrustedPermissions in src/Security.php
Returns the permission strings that untrusted roles have.

File

src/Security.php, line 77

Class

Security
Provides frequently used security-related data.

Namespace

Drupal\security_review

Code

public function untrustedRoles() {

  // If the module hasn't been manually configured yet, return the untrusted
  // roles depending on Drupal's actual configuration.
  if (!$this->securityReview
    ->isConfigured()) {
    return static::defaultUntrustedRoles();
  }

  // Else return the stored untrusted roles.
  return $this->securityReview
    ->getUntrustedRoles();
}