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

refactor(core): allow configuring both local and remote URLs on capability #8950

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

lucasfernog
Copy link
Member

The current capability format allows you to configure either a capability that applies to local URLs or to a list of remote URLs. This forces users to have to define two identical capability files if they choose to enable a set of permissions both locally and to remote URLs.
This PR changes the model from context: local | { remote: { urls: string[] } } to remote: { urls: string[] }, local: bool

@lucasfernog lucasfernog requested a review from a team as a code owner February 22, 2024 17:38
@amrbashir
Copy link
Member

amrbashir commented Feb 22, 2024

Could we maybe change it to

{
  "context": ["local", { "remote": ["https://url.com"] }]
}

Seems like it would allow for future additions if needed

@lucasfernog
Copy link
Member Author

that was my first idea, but that also allows to weird configurations like [local, { remote }, local] and it looks ugly on json/toml formats.

@lucasfernog lucasfernog merged commit a76fb11 into dev Feb 22, 2024
29 checks passed
@lucasfernog lucasfernog deleted the refactor/capability-context branch February 22, 2024 18:15
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