Skip to content

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

Merged
lucasfernog merged 1 commit intodevfrom
refactor/capability-context
Feb 22, 2024
Merged

refactor(core): allow configuring both local and remote URLs on capability#8950
lucasfernog merged 1 commit intodevfrom
refactor/capability-context

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
@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.

2 participants