-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
v3.0.9
Feature type
Change to existing functionality
Proposed functionality
Introduce a new Python class for representing individual user preferences. This would supplant the current user preferences structure, which is limited in function and offers no real validation mechanism. Currently, only the following preferences are manageable:
- UI color preference (light/dark)
- Page length
- Table columns (per table)
This would likely follow the pattern introduced by the ConfigParam class in v3.1, with each instance declaring a name, default value, and acceptable choices/validation rules.
Use case
This would enable more robust validation around user preferences, and allow more dynamic rendering of the user preferences form. It would also enable us to expose more default values as user-configurable preferences. (See #7702 as an example.)
Database changes
This likely won't require any database changes, as we'll be able to continue using the UserConfig model to store saved user preferences.
External dependencies
No response