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

Fix(authServ): repair auth server page in BO #34106

Closed

Conversation

tleon
Copy link
Contributor

@tleon tleon commented Sep 29, 2023

Questions Answers
Branch? develop
Description? A field in the ApiAccess entity has been renamed in another PR. The experimental BO page was broken because of this change. This PR fixes this.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
How to test? Activate the experimental Auth Server page. Then access it.
UI Tests https://github.com/tleon/ga.tests.ui.pr/actions/runs/6353483501
Related PRs #33833
Sponsor company PrestaShop SA

@tleon tleon self-assigned this Sep 29, 2023
@prestonBot
Copy link
Collaborator

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

@prestonBot prestonBot added develop Branch Bug fix Type: Bug fix labels Sep 29, 2023
@tleon tleon marked this pull request as ready for review September 29, 2023 12:56
@tleon tleon requested a review from a team as a code owner September 29, 2023 12:56
nicosomb
nicosomb previously approved these changes Sep 29, 2023
@ps-jarvis ps-jarvis added the Waiting for QA Status: action required, waiting for test feedback label Sep 29, 2023
jolelievre
jolelievre previously approved these changes Sep 29, 2023
@tleon tleon force-pushed the Issue-33765-fix-auth-server-page branch from 228b28f to f0a53be Compare September 29, 2023 14:00
@tleon tleon requested a review from a team as a code owner September 29, 2023 14:00
nicosomb
nicosomb previously approved these changes Sep 29, 2023
@jolelievre jolelievre changed the title fix(authServ): repair auth server page in BO Fix(authServ): repair auth server page in BO Sep 29, 2023
jolelievre
jolelievre previously approved these changes Sep 29, 2023
@tleon tleon dismissed stale reviews from jolelievre and nicosomb via ace7709 September 29, 2023 15:04
@tleon tleon force-pushed the Issue-33765-fix-auth-server-page branch from f0a53be to ace7709 Compare September 29, 2023 15:04
boherm
boherm previously approved these changes Sep 29, 2023
Progi1984
Progi1984 previously approved these changes Sep 29, 2023
PululuK
PululuK previously approved these changes Sep 29, 2023
@tleon tleon dismissed stale reviews from PululuK, Progi1984, and boherm via c386cce October 2, 2023 09:06
@tleon tleon force-pushed the Issue-33765-fix-auth-server-page branch 2 times, most recently from c386cce to 5e9be28 Compare October 2, 2023 12:46
boherm
boherm previously approved these changes Oct 2, 2023
@AureRita AureRita self-assigned this Oct 2, 2023
@AureRita
Copy link
Contributor

AureRita commented Oct 2, 2023

Hello @tleon

Thank you for your PR, I tried it and unfortunately, I can't go on auth serv when I install your PR as you can see :

Untitled_.Oct.2.2023.3_07.PM.webm

Waiting for your feedback

@AureRita AureRita added the Waiting for author Status: action required, waiting for author feedback label Oct 2, 2023
@@ -108,10 +108,9 @@ private function applyAssociatedQueries(QueryBuilder $queryBuilder): void
private function appendActiveApiAccessQuery(QueryBuilder $queryBuilder): void
{
$shopQueryBuilder = $this->getQueryBuilder()
->select('count(api.active)')
->select('count(api.enabled)')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
->select('count(api.enabled)')
->select('count(api.id_api_access)')

Seems like it makes more sense to test the count of IDs no? Like in the other method

->from($this->dbPrefix . 'api_access', 'api')
->where('api.id_authorized_application = aa.id_authorized_application')
->andWhere('api.active = 1');
->Where('api.enabled = 1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed this condition because the relationship has been removed in the ApiAccess entity right? This changes the behavior of the grid, but it's supposed to be completely removed soon anyway so as long as tests do not shout I guess we don't really care

@jolelievre
Copy link
Contributor

Closed in favor of #34146

@jolelievre jolelievre closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug fix Type: Bug fix develop Branch Waiting for author Status: action required, waiting for author feedback Waiting for QA Status: action required, waiting for test feedback
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

10 participants