Skip to content

feat(store): namespace settings by scope and domain - #2456

Open
sofiazcoaga wants to merge 2 commits into
0xMiden:nextfrom
sofiazcoaga:add-domain-to-settings
Open

feat(store): namespace settings by scope and domain#2456
sofiazcoaga wants to merge 2 commits into
0xMiden:nextfrom
sofiazcoaga:add-domain-to-settings

Conversation

@sofiazcoaga

Copy link
Copy Markdown

Motivation

The settings table had one flat keyspace shared by the client and its users, so client.set_setting() let a user overwrite the client's own state with no error. Also, list_setting_keys() returned the client's internal keys to the caller.

Changes

This PR adds a scope and a domain to the settings table, with (scope, domain, name) as the primary key. SettingDomain::new() is public and always builds a user domain. The client's own domains cannot be built from outside the crate.

Existing stores are not compatible and must be recreated.

Closes #1352.

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.

Add namespace or domain to settings

1 participant