apigee / apigee-api-catalog-drupal

Manage your API catalog within Drupal's content management approach
https://www.drupal.org/project/apigee_api_catalog
GNU General Public License v2.0
17 stars 16 forks source link

ApiDocAccessControlHandler.php uses invalid permission. #231

Closed dpagini closed 10 months ago

dpagini commented 10 months ago

Description

This is not a valid permission... https://github.com/apigee/apigee-api-catalog-drupal/blob/33d1aa2a0ea613b3bacd723b5ffdfe89bd539a74/src/Entity/Access/ApiDocAccessControlHandler.php#L88

It looks to me like at one point, apidoc was a custom entity, but that seems like it was changed to a node.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'

Actual Behavior

What happened after the steps to reproduce.

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Notes

Add any other context about the problem here.

Version Info

Drupal 10 Module 3.0.4

shishir-intelli commented 10 months ago

@dpagini , Thank you for addressing this issue, We will certainly investigate it.

shishir-intelli commented 10 months ago

@dpagini The custom apidoc entity is deprecated so it will be removed in the next release. see https://github.com/apigee/apigee-api-catalog-drupal/pull/84

dpagini commented 10 months ago

I'm using 3.x already in my project... it seems to me the apidoc entity was removed a long time ago. The issue is that you're still using an "entity" permission in the above referenced file, and not the new "node permission". Does that make sense?

shishir-intelli commented 10 months ago

Correct, custom apidoc entity was removed long back however, there are still a few deprecated apidoc files present in 3x which are removed in this PR https://github.com/apigee/apigee-api-catalog-drupal/pull/233 Please use node apidoc. see https://github.com/apigee/apigee-api-catalog-drupal/pull/84