forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: make UI customizations work for non-admin users
Summary table: | Time frame | R/W of UI customization | different customizations per user | |-------------|-------------------------|-----------------------------------| | Pre-cockroachdb#42563 | all users | broken (shared between users) | | Post-cockroachdb#42563 | admin only (regression) | broken | | This commit | all users | yes - each user has its own | The separation of customization between users is done by mixing the username with the key with a `$` character when looking up rows in `system.ui`. This approach can look perhaps baroque when SQL would prefer us to have two separate *columns* in the PK of `system.ui` and use that for lookups and updates. Unfortunately PK changes are not yet supported, and a PK change would incur a complex story in mixed-version clusters. Additionally, this approach is suitable for backporting in 2.1, 19.1 and 19.2 clusters where the functionality was broken by cockroachdb#42563. Release note (admin ui change): The display options are now saved separately for each authenticated user. Note: when upgrading to a version with this change, all current display customizations for admin users are lost. Release note (bug fix): Customizations of the Admin UI are again properly saved across sessions. Release justification: low risk, high benefit changes to existing functionality
- Loading branch information
Showing
3 changed files
with
157 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters