Skip to content

add support for hidden collections parameter for applying auth #874

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

Merged
merged 4 commits into from
Apr 7, 2025

Conversation

philvarner
Copy link
Collaborator

Related Issue(s):

Proposed Changes:

  1. add "hidden" parameter _collections for restricting visible collections, for example, in a proxy

PR Checklist:

  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@philvarner philvarner requested a review from tylanderson April 4, 2025 22:16
Copy link
Collaborator

@tylanderson tylanderson left a comment

Choose a reason for hiding this comment

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

Tested and was able to confirm behavior working as expected. Only question here would be if this should be controlled through a param to allow deployments to enable / disable this behavior as it's non-standard

@philvarner philvarner enabled auto-merge April 7, 2025 19:47
@philvarner philvarner added this pull request to the merge queue Apr 7, 2025
Merged via the queue into main with commit f8dbacc Apr 7, 2025
3 checks passed
@philvarner philvarner requested a review from Copilot April 8, 2025 15:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • package.json: Language not supported
Comments suppressed due to low confidence (1)

src/lib/api.js:517

  • [nitpick] Consider clarifying or removing the 'TODO' comment to explicitly state the intended behavior for encoding the collections parameter in pagination links once finalized.
} else if (p === 'collections') { // TODO

const { collectionId } = t.context

// disable collections filtering
process.env['ENABLE_COLLECTIONS_AUTHX'] = 'not true'
Copy link
Preview

Copilot AI Apr 8, 2025

Choose a reason for hiding this comment

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

Using the string 'not true' to disable the collections filtering may be error-prone; consider using a clear boolean string ('true' to enable and 'false' to disable) or resetting the variable after the test to prevent side effects.

Suggested change
process.env['ENABLE_COLLECTIONS_AUTHX'] = 'not true'
process.env['ENABLE_COLLECTIONS_AUTHX'] = 'false'

Copilot uses AI. Check for mistakes.

@philvarner philvarner deleted the pv/hidden-collections-parameter branch April 8, 2025 16:00
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.

None yet

2 participants