Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Consumers (Authenticated Users) are getting incorrect Teams(Companies) #408

Closed
Dhaneshmonds opened this issue May 5, 2020 · 7 comments · Fixed by #419
Closed

API Consumers (Authenticated Users) are getting incorrect Teams(Companies) #408

Dhaneshmonds opened this issue May 5, 2020 · 7 comments · Fixed by #419
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Dhaneshmonds
Copy link

Dhaneshmonds commented May 5, 2020

Incorrect Teams(List of Teams which user does not belong to) are displaying for API Consumers(Authenticated Users) on Team(Company) List

Steps to reproduce the behavior:

  API Consumers API Providers Administrators
Issue occurring for Yes No No

To Reproduce

To reproduce the issue, we need two users.

Let's Consider ConsumerOne and ConsumerTwo as two API Consumers(Authenticated user) in the portal.

API Consumers have permission to create teams on the portal.

When ConsumerOne created a new team; the team list for the user ConsumerOne can see valid teams (list of the teams which belong to ConsumerOne). But other API Consumers are getting the same list of ConsumerOne. For Other API Consumers(including ConsumerTwo), those are invalid teams(Companies).

Notes:

  1. This issue is happening only when API Consumers(Authenticated users) creating a new team.
  2. When we are clearing the Drupal Portal cache the issue is disappearing.
  3. Apigee Edge Team Caching set as 0/-1, still, the issue persists.

Expected behavior
API Consumers(Authenticated users) should get relevant teams which he/she created or he/she belongs to.

Version Info
Drupal : 8.7.12
Apigee Edge : 8.x-1.8

@Dhaneshmonds Dhaneshmonds added the bug Something isn't working label May 5, 2020
@Dhaneshmonds Dhaneshmonds changed the title API Consumers (Authenticated Users) are getting incorrect Teams API Consumers (Authenticated Users) are getting incorrect Teams(Companies) May 5, 2020
@mxr576
Copy link
Contributor

mxr576 commented May 11, 2020

Isn't it caused by the the "API consumer" role has "View any Teams" permission? Without granting this permission I could not reproduce this issue, which means, works as designed. There is no "View own Teams" permission because the owner/author/created information is not stored on Apigee for teams/companies.

@arunz6161 arunz6161 added this to the 8.x-1.11 milestone May 12, 2020
@Dhaneshmonds
Copy link
Author

Dhaneshmonds commented May 18, 2020

Isn't it caused by the the "API consumer" role has "View any Teams" permission? Without granting this permission I could not reproduce this issue, which means, works as designed. There is no "View own Teams" permission because the owner/author/created information is not stored on Apigee for teams/companies.

Hi Dezső BICZÓ mxr576,
Thanks for the reply. We didn't configure "View any Teams" in the permission for "API Consumers".
But still getting the issue. We had a discussion with apigee support team and shared the permissions as well. We received feedback like it might be a bug in apigee-edge-drupal.

We found a workaround for the same by disabling the dynamic caching. After disabled dynamic caching "API Consumers" are getting proper teams.

@varuntit101
Copy link

Hi I also faced the same issue and found a workaround by disabling dynamic cache

@arunz6161
Copy link
Collaborator

Thanks @varuntit101 for sharing the workaround. @Dhaneshmonds Can you try disabling dynamic cache and let us know if that works and if it a acceptable workaround ?

@Dhaneshmonds
Copy link
Author

@arunz6161 I have mentioned the same in my previous comment. After disabling the dynamic cache, working as expected. I believe this is a temporary fix, after disabled dynamic cache; a couple of other functionalities got affected.

@arunz6161
Copy link
Collaborator

thanks @Dhaneshmonds - we will prioritize this soon

@arlina-espinoza
Copy link
Contributor

I've posted a PR that could fix this: #419

arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 8, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 9, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 11, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 11, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 11, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 22, 2020
arlina-espinoza added a commit to arlina-espinoza/apigee-edge-drupal that referenced this issue Jun 24, 2020
arlina-espinoza added a commit that referenced this issue Jun 29, 2020
* [#408] Fix team lists cache errors.

* [#408] Fix team lists cache errors - updated cache tags.

* [#408] Fix team lists cache errors - updates and test.

* [#408] Fix team lists cache errors - updates and test.

* [#408] Fix team lists cache errors - fixing phpcs.

* [#408] Fix tests.

* [#408] Fix tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants