Skip to content

Commit 99e5633

Browse files
authored
Update apigee_edge_apiproduct_rbac.module (#1101)
Changed from neutral to forbidden so that API Products do not show up on the assign operation or Create App when using the RBAC service to control access to API Products.
1 parent 777ebfc commit 99e5633

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/apigee_edge_apiproduct_rbac/apigee_edge_apiproduct_rbac.module

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
6767

6868
if (empty($entity->getAttributeValue($rbac_attribute_name))) {
6969
if ('assign' === $operation) {
70-
$result = AccessResult::neutral("{$operation} is not allowed on {$entity->label()} API product.");
70+
$result = AccessResult::forbidden("{$operation} is not allowed on {$entity->label()} API product.");
7171
}
7272
elseif ($config->get('grant_access_if_attribute_missing')) {
7373
$result = AccessResult::allowed();
@@ -94,7 +94,7 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
9494
// Displaying these products should be solved on the form level always.
9595
if (empty(array_intersect($roles, $account->getRoles()))) {
9696
if ('assign' === $operation) {
97-
$result = AccessResult::neutral("{$operation} is not allowed on {$entity->label()} API product.");
97+
$result = AccessResult::forbidden("{$operation} is not allowed on {$entity->label()} API product.");
9898
}
9999
else {
100100
$result = _apigee_edge_user_has_an_app_with_product($entity->id(), $account, TRUE);

0 commit comments

Comments
 (0)