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

Allow exact matches in download tokens #53

Closed

Conversation

jameswestman
Copy link
Collaborator

When downloading a ref, use the 'repo' field of the token for exact matches, in addition to the existing 'prefix' field which allows downloading a ref and its children.

This does not add any restrictions to existing download tokens.

Copy link

@danielsilverstone-ct danielsilverstone-ct left a comment

Choose a reason for hiding this comment

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

I've had a good rummage through the code and I see no reason that this wouldn't be OK. We never seem to check sub for download though, so perhaps we ought to add that in?

@jameswestman
Copy link
Collaborator Author

I'd assume if you have a "build" or "build/{id}" sub you should also have permission to download the repo.

When downloading a ref, use the 'repo' field of the token for exact
matches, in addition to the existing 'prefix' field which allows
downloading a ref and its children.

This does not add any restrictions to existing download tokens.
@jameswestman jameswestman force-pushed the exact-download-tokens branch from 0b80f76 to 56afba1 Compare April 21, 2022 17:03
@jameswestman
Copy link
Collaborator Author

We should probably use a different field rather than overloading the repos field.

@jameswestman jameswestman marked this pull request as draft June 17, 2022 17:25
@jameswestman
Copy link
Collaborator Author

Superseded by #77.

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