You are here

protected function ApiProductRoleBasedAccessTestBase::getRolesWithAccess in Apigee Edge 8

Returns roles (role ids) with access to an API product.

Parameters

\Drupal\apigee_edge\Entity\ApiProductInterface $product: API product.

Return value

array Array of role ids.

Overrides ApiProductAccessTest::getRolesWithAccess

File

modules/apigee_edge_apiproduct_rbac/tests/src/FunctionalJavascript/ApiProductRoleBasedAccessTestBase.php, line 97

Class

ApiProductRoleBasedAccessTestBase
Base calls for validating role based access control on API products.

Namespace

Drupal\Tests\apigee_edge_apiproduct_rbac\FunctionalJavascript

Code

protected function getRolesWithAccess(ApiProductInterface $product) : array {
  $value = $product
    ->getAttributeValue($this->rbacAttributeName) ?? '';
  return explode(APIGEE_EDGE_APIPRODUCT_RBAC_ATTRIBUTE_VALUE_DELIMITER, $value);
}