Skip to content

Commit

Permalink
Merge pull request #1 from urbanenomad/urbanenomad-bug-issue1098-patch-1
Browse files Browse the repository at this point in the history
Update apigee_edge_apiproduct_rbac.module to fix bug issue 1098
  • Loading branch information
urbanenomad authored Dec 12, 2024
2 parents 1e480cf + 84bcd07 commit 8e599d0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,

if (empty($entity->getAttributeValue($rbac_attribute_name))) {
if ('assign' === $operation) {
$result = AccessResult::neutral("{$operation} is not allowed on {$entity->label()} API product.");
$result = AccessResult::forbidden("{$operation} is not allowed on {$entity->label()} API product.");
}
elseif ($config->get('grant_access_if_attribute_missing')) {
$result = AccessResult::allowed();
Expand All @@ -94,7 +94,7 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
// Displaying these products should be solved on the form level always.
if (empty(array_intersect($roles, $account->getRoles()))) {
if ('assign' === $operation) {
$result = AccessResult::neutral("{$operation} is not allowed on {$entity->label()} API product.");
$result = AccessResult::forbidden("{$operation} is not allowed on {$entity->label()} API product.");
}
else {
$result = _apigee_edge_user_has_an_app_with_product($entity->id(), $account, TRUE);
Expand Down

0 comments on commit 8e599d0

Please sign in to comment.