Pluggable User Settings handling
Summary
=======
Create an abstraction for user settings handling.
Motivation
==========
User settings for Horizon users, such as language and timezone,
are currently saved to cookies and sessions.
This means that any changes to the settings are lost once the user changes
systems and/or browsers or clears browser data.
Normally, a user would expect these changes to persist in such situations,
which would require a more permanent method of storage such as a database.
This would, however, introduce a new dependency to the database components of
Horizon. Since Horizon has been used up to this point without such permanent
storage for user settings, general use cases might not require it, making thhis
dependency redundant.
It would therefore be beneficial to allow Horizon operators to choose which
form of user setting storage would be used in their individual cases.
Description
===========
This proposed change would separate the user handling code into a generic,
abstract access layer (an interface) and the atual implementation (backend).
Horizon could then route all it's user settings operations through the
interface leaving the backend to decide what actual happens.
Specific implementations could then be created to provide different methods of
handling user settings and individual Horizon operators could choose which one
of them best suits their needs. If need be, they could also create their own.
Examples of such implementations could be:
- The aforementioned DB backend
- A network storage solution
As part of this proposal, a default backend implementation mimicking the current
Horizon behaviour would be provided. Additional implementations would be
provided in the future.
To facilitate switching between multiple backends, a setting would be introduced
to the django/horizon settings system.
UX
===
This change would have no impact on user experience.
Testing
=======
The current behavior would need to be confirmed to match that of the default
beckend implementation.
Outside Dependencies
=======
N/A
Requirements Update Required
=======
N/A
Doc Impact
=========
A new settings.py value would need to be added to allow for backend setting.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Low
- Drafter:
- Marek Lyčka
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
An attempt at implementation has already been made:
https:/
https:/