mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add per-user per-org preferences to database
Summary: Adds preferences to orgs. There are a few flavors: * `userOrgPrefs`: these are specific to a certain user and a certain org. * `orgPrefs`: these are specific to a certain org, and apply to all users. * `userPrefs`: these are specific to a certain user, and apply to all orgs. The three flavors of prefs are reported by `GET` for an org, and can be modified by `PATCH` for an org. The user needs to have UPDATE rights to change `orgPrefs`, but can change `userOrgPrefs` and `userPrefs` without that right since the settings only affect themselves. Test Plan: added tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2572
This commit is contained in:
9
app/common/Prefs.ts
Normal file
9
app/common/Prefs.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// A collection of preferences related to a user or org (or combination).
|
||||
export interface Prefs {
|
||||
// TODO replace this with real preferences.
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
export type UserPrefs = Prefs;
|
||||
export type UserOrgPrefs = Prefs;
|
||||
export type OrgPrefs = Prefs;
|
||||
Reference in New Issue
Block a user