Skip to content

auth.can(): simplify SQL#1504

Merged
alxndrsn merged 7 commits intogetodk:masterfrom
alxndrsn:weird-count
Jun 5, 2025
Merged

auth.can(): simplify SQL#1504
alxndrsn merged 7 commits intogetodk:masterfrom
alxndrsn:weird-count

Conversation

@alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Jun 3, 2025

Current code seems odd.

Noted while working on #1502

What has been done to verify that this works as intended?

  • existing tests pass

Why is this the best possible solution? Were any other approaches considered?

This introduces some formatting change which IMO improve readability. A simpler changeset could be achieved by maintaining existing formatting.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Potential for breaking existing authZ, but test coverage should ensure it's fine. Also reading the code, it seems low-risk.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

No.

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

@alxndrsn alxndrsn marked this pull request as ready for review June 4, 2025 09:26
@alxndrsn alxndrsn marked this pull request as draft June 4, 2025 09:27
@alxndrsn
Copy link
Contributor Author

alxndrsn commented Jun 4, 2025

Tests in test/integration/api/users.js:

Current returning Promise(true)

  62 passing (3m)
  9 failing

Current returning Promise(false)

  37 passing (19s)
  34 failing

@alxndrsn alxndrsn marked this pull request as ready for review June 4, 2025 12:11
@alxndrsn alxndrsn requested a review from matthew-white June 4, 2025 12:11
@alxndrsn alxndrsn merged commit d327893 into getodk:master Jun 5, 2025
6 checks passed
@alxndrsn alxndrsn deleted the weird-count branch June 5, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants