Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix console_preferences update #7423

Open
wants to merge 1 commit into
base: v3.33
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions pkg/identityserver/bunstore/user_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,16 +598,29 @@ func (s *userStore) updateUserModel( //nolint:gocyclo
case "console_preferences":
updateConsolePreferences = true
consolePreferences = pb.ConsolePreferences
case "console_preferences.dashboard_layouts.api_key",
"console_preferences.dashboard_layouts.application",
"console_preferences.dashboard_layouts.collaborator",
"console_preferences.dashboard_layouts.end_device",
"console_preferences.dashboard_layouts.gateway",
"console_preferences.dashboard_layouts.organization",
"console_preferences.dashboard_layouts.overview",
"console_preferences.dashboard_layouts.user":
updateConsolePreferences = true
consolePreferences.DashboardLayouts = pb.ConsolePreferences.GetDashboardLayouts()
case "console_preferences.console_theme":
updateConsolePreferences = true
consolePreferences.ConsoleTheme = pb.ConsolePreferences.ConsoleTheme
case "console_preferences.dashboard_layouts":
updateConsolePreferences = true
consolePreferences.DashboardLayouts = pb.ConsolePreferences.GetDashboardLayouts()
case "console_preferences.sort_by":
case "console_preferences.sort_by.api_key",
"console_preferences.sort_by.application",
"console_preferences.sort_by.collaborator",
"console_preferences.sort_by.end_device",
"console_preferences.sort_by.gateway",
"console_preferences.sort_by.organization",
"console_preferences.sort_by.user":
Comment on lines +601 to +620
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it without this change and it works for me. Did you test this already?

Screenshot 2024-12-20 at 11 38 25

updateConsolePreferences = true
consolePreferences.SortBy = pb.ConsolePreferences.GetSortBy()
case "console_preferences.tutorials":
case "console_preferences.tutorials.seen":
updateConsolePreferences = true
consolePreferences.Tutorials = pb.ConsolePreferences.GetTutorials()
case "universal_rights":
Expand Down
Loading