Skip to content

feat(schema): make acl permissions schema unique - #9999

Merged
lucasfernog merged 9 commits into
tauri-apps:devfrom
Legend-Master:permission-schema-unique-item
Jun 26, 2024
Merged

feat(schema): make acl permissions schema unique#9999
lucasfernog merged 9 commits into
tauri-apps:devfrom
Legend-Master:permission-schema-unique-item

Conversation

@Legend-Master

@Legend-Master Legend-Master commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

Reference from Discord chat: https://discord.com/channels/616186924390023171/986184094050316358/1233987058213716019

I think our schema file is missing an uniqueItems on permissions (maybe also windows and webviews)

image

@Legend-Master
Legend-Master requested a review from a team as a code owner June 6, 2024 10:48
@amrbashir

Copy link
Copy Markdown
Member

should we just switch to use a HashSet instead of Vec? that should produce a schema with uniqueItems: true, and makes defining a capability in Rust have same semantics as the JSON capability cc @lucasfernog

@amrbashir
amrbashir requested a review from lucasfernog June 26, 2024 05:30
lucasfernog
lucasfernog previously approved these changes Jun 26, 2024
This reverts commit 778d316.
This reverts commit cfc0e39.
@lucasfernog

Copy link
Copy Markdown
Member

not worth the trouble of using HashSet, since our snapshot tests rely on a deterministic order :|

@lucasfernog
lucasfernog merged commit 8781987 into tauri-apps:dev Jun 26, 2024
@Legend-Master
Legend-Master deleted the permission-schema-unique-item branch June 27, 2024 00:55
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.

3 participants